Description
The lesson viewer at /courses/[id]/lessons/[lessonId] shows basic data with no real video embedding, no markdown rendering, and no lesson navigation. A bite-sized learning platform depends on the quality of its lesson experience. This issue upgrades the lesson viewer into a proper interactive interface.
Background
- Lesson entity has
title, content (markdown), videoUrl (YouTube embed URL), videoStartTimestamp, duration, type (text/video/interactive)
- After Issues 32-33 lesson data comes from the real backend
- Libraries needed:
react-markdown, remark-gfm, rehype-highlight
Implementation Guide
Install react-markdown remark-gfm rehype-highlight.
Create VideoPlayer: responsive iframe with aspect-ratio: 16/9, YouTube URL with ?start={videoStartTimestamp} appended.
Create MarkdownContent: ReactMarkdown with remarkGfm and rehypeHighlight, custom code block with copy button, links opening in new tab.
Create LessonNavigation: prev/next buttons computed from sorted lesson list, disabled at first/last lesson.
Create QuizPromptCard: shown when hasQuiz: true, links to the quiz page with quiz ID.
Add duration badge in the lesson header. Mark Complete button with loading state calling the backend (from Issue 33).
Acceptance Criteria
Complexity: High - 200 points
Join: https://t.me/ByteChainAcademy | Contact: contact@nexacore.org
Description
The lesson viewer at
/courses/[id]/lessons/[lessonId]shows basic data with no real video embedding, no markdown rendering, and no lesson navigation. A bite-sized learning platform depends on the quality of its lesson experience. This issue upgrades the lesson viewer into a proper interactive interface.Background
title,content(markdown),videoUrl(YouTube embed URL),videoStartTimestamp,duration,type(text/video/interactive)react-markdown,remark-gfm,rehype-highlightImplementation Guide
Install
react-markdown remark-gfm rehype-highlight.Create
VideoPlayer: responsive iframe withaspect-ratio: 16/9, YouTube URL with?start={videoStartTimestamp}appended.Create
MarkdownContent:ReactMarkdownwithremarkGfmandrehypeHighlight, custom code block with copy button, links opening in new tab.Create
LessonNavigation: prev/next buttons computed from sorted lesson list, disabled at first/last lesson.Create
QuizPromptCard: shown whenhasQuiz: true, links to the quiz page with quiz ID.Add duration badge in the lesson header. Mark Complete button with loading state calling the backend (from Issue 33).
Acceptance Criteria
hasQuizis trueComplexity: High - 200 points
Join: https://t.me/ByteChainAcademy | Contact: contact@nexacore.org