ApiDataSource maps the Go API onto the existing DataSource, so the screens are unchanged. Build with NEXT_PUBLIC_LMS_API=https://api.rezina.yaltopia.com to use it; without it the demo keeps its own data. Verified against the live API (public, no sign-in): - catalog and course outlines: courses, chapters, lessons, lesson notes, covers - FREE lessons (and every lesson of a FREE course) play for anyone; a free course offers "Start lesson 1" instead of a disabled buy button Built from the spec, not yet tested with a real account: - sign-in: phone code (login or register) and email + password, token refresh, sign-out - profile, progress summary (owned courses, completed lessons), lesson video URLs - video heartbeat, notifications (list, read/unread), issue reports, profile updates Not on the API yet, so left on hold: per-course prices and purchases (buying shows the "not connected" message), translations, categories, teacher, durations, prerequisites, chapter quizzes, Google/Apple sign-in. Screens now hide what a course doesn't have instead of showing it empty: category pill, teacher line and creator row, "0 min" durations, an empty card footer. Lessons with a Vimeo link play that video; the sample clip and "mark as watched" stay for lessons without one. Mapping checks (packages/data/src/api.check.ts) run in `pnpm test` against saved live responses.
1 line
1.4 KiB
JSON
1 line
1.4 KiB
JSON
{"message":"Course highlights retrieved","data":{"courses":[{"id":2,"name":"Intermediate","description":"Default program for the intermediate level.","thumbnail":"","access_tier":"PREMIUM","chapter_count":2,"lesson_count":0,"quiz_count":0},{"id":1,"name":"Beginner","description":"Default program for the beginner level.","thumbnail":"","access_tier":"PREMIUM","chapter_count":2,"lesson_count":0,"quiz_count":0},{"id":3,"name":"Advanced","description":"Default program for the advanced level.","thumbnail":"","access_tier":"PREMIUM","chapter_count":2,"lesson_count":0,"quiz_count":0},{"id":12,"name":"Everyday English","description":"Build confidence with introductions, daily conversations, and practical vocabulary.","thumbnail":"/static/demo/course-cover.svg","access_tier":"FREE","chapter_count":2,"lesson_count":6,"quiz_count":2},{"id":13,"name":"Workplace Communication","description":"Communicate clearly in meetings, write effective messages, and present your ideas.","thumbnail":"/static/demo/course-cover.svg","access_tier":"PREMIUM","chapter_count":2,"lesson_count":6,"quiz_count":2},{"id":14,"name":"Digital Skills Essentials","description":"Learn practical habits for working online, organizing information, and collaborating safely.","thumbnail":"/static/demo/course-cover.svg","access_tier":"FREE","chapter_count":2,"lesson_count":6,"quiz_count":2}],"total_count":6,"limit":50,"offset":0},"success":true,"status_code":200,"metadata":null} |