systemphil / symposia

Symposia is a philosophy course platform🏺
https://symposia.sphil.xyz
Apache License 2.0
6 stars 1 forks source link

Course pages, access and routing #23

Closed Firgrep closed 3 months ago

Firgrep commented 11 months ago

This is a basic layout of the routes concerning the courses, following a recent meeting I had with @ej-choi .

Main course page

route: /course
access: public

Displays the full list of courses. I don't think we need to segregate any access on this page, but just list the courses and point a link to the course page.

Individual course page details

route: /course/[course-slug]
access: public

Detailed information about the individual course. Also keep this public.

Individual lesson page

route: /course/[course-slug]/[lesson-slug]
access: restricted
// Optionally if we're using parts, but let's save this for later
route: /course/[course-slug]/[part]/[lesson-slug]
access: restricted

The lesson page which renders data from Video, LessonContent and LessonTranscript.

Anything else to do with building the functionality and routing of these pages, comment below.

Firgrep commented 11 months ago

@ej-choi Heads up! The mdx renderer is ready and I've added a function that can be called to retrieve compiled mdx from db dbGetCompiledMdxBySlugs() to be called serverside (I expect we really only need server components for this) - it takes an object as argument and you must specify access. See function jsdocs for specifics.

On second thought, perhaps access should be specific by the lesson? Given some lessons might be in "preview" mode or something?