# adhnan23/lms-skilljet architecture

> Architecture diagram of the GitHub repository adhnan23/lms-skilljet, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/adhnan23/lms-skilljet
- Repository: https://github.com/adhnan23/lms-skilljet

## Overview

This is a Next.js learning-management application for students and teachers. Students browse and search published courses, enroll through checkout, view chapters and track completion; teachers create courses, manage chapters and attachments, publish content, and review analytics. The graph groups the main user journeys with the API, persistence, and payment layers. Some routes and capabilities are represented from the file tree and SOURCE INDEX rather than inspected implementations, so their internal relationships are omitted where evidence is unavailable.

Main entry points: [`lib/db.ts`](https://github.com/adhnan23/lms-skilljet/blob/master/lib/db.ts) (Prisma database), [`app/(dashboard)/(routes)/search/page.tsx`](https://github.com/adhnan23/lms-skilljet/blob/master/app/(dashboard)/(routes)/search/page.tsx) (Course search), [`app/(course)/courses/[courseId]/chapters/[chapterId]/page.tsx`](https://github.com/adhnan23/lms-skilljet/blob/master/app/(course)/courses/%5BcourseId%5D/chapters/%5BchapterId%5D/page.tsx) (Chapter learning), [`app/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx`](https://github.com/adhnan23/lms-skilljet/blob/master/app/(dashboard)/(routes)/teacher/courses/%5BcourseId%5D/page.tsx) (Course editor)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_identity["Identity and navigation"]
  node_auth["Sign in and sign up"]
  node_dashboard["Dashboard navigation<br/>[sidebar-routes.tsx]"]
end

subgraph group_learning["Course discovery and learning"]
  node_search["Course search<br/>[page.tsx]"]
  node_course_list["Course listings<br/>[courses-list.tsx]"]
  node_course_view["Course overview<br/>[page.tsx]"]
  node_chapter_view["Chapter learning<br/>[page.tsx]"]
  node_video["Video player<br/>[video-player.tsx]"]
end

subgraph group_authoring["Teacher authoring"]
  node_course_editor["Course editor<br/>[page.tsx]"]
  node_course_forms["Course setup forms"]
  node_chapter_forms["Chapter editor"]
  node_analytics["Teacher analytics<br/>[page.tsx]"]
end

subgraph group_commerce["Enrollment and progress"]
  node_checkout["Checkout endpoint<br/>[route.ts]"]
  node_stripe["Stripe payments<br/>[stripe.ts]"]
  node_webhook["Payment webhook<br/>[route.ts]"]
  node_progress_action["Progress lookup<br/>[get-progress.tsx]"]
end

subgraph group_platform["API and persistence"]
  node_course_api["Course API<br/>[route.ts]"]
  node_chapter_api["Chapter and progress APIs"]
  node_attachment_api["Attachment API"]
  node_db[("Prisma database<br/>[db.ts]")]
  node_upload["UploadThing integration<br/>[uploadthing.ts]"]
end

node_learner(("Learner"))
node_teacher(("Teacher"))

node_learner -->|"signs in"| node_auth
node_teacher -->|"signs in"| node_auth
node_learner -->|"browses courses"| node_search
node_teacher -->|"edits course"| node_course_editor
node_search -->|"loads categories"| node_db
node_search -->|"renders results"| node_course_list
node_search -->|"loads courses"| node_course_list
node_course_list -.->|"links courses"| node_course_view
node_course_view -.->|"opens chapter"| node_chapter_view
node_chapter_view -->|"renders player"| node_video
node_chapter_view -->|"loads chapter data"| node_progress_action
node_chapter_view -.->|"starts enrollment"| node_checkout
node_course_editor -->|"loads course data"| node_db
node_course_editor -->|"renders forms"| node_course_forms
node_course_forms -.->|"updates course"| node_course_api
node_chapter_forms -.->|"manages chapters"| node_chapter_api
node_course_api -->|"creates course"| node_db
node_chapter_api -->|"accesses records"| node_db
node_attachment_api -->|"stores attachments"| node_db
node_checkout -->|"checks purchase"| node_db
node_checkout -->|"creates session"| node_stripe
node_stripe -.->|"sends event"| node_webhook
node_webhook -->|"records purchase"| node_db
node_progress_action -->|"reads progress"| node_db
node_course_forms -.->|"uploads assets"| node_upload

click node_auth "https://github.com/adhnan23/lms-skilljet/tree/master/app/(auth)/(routes)"
click node_dashboard "https://github.com/adhnan23/lms-skilljet/blob/master/app/(dashboard)/_components/sidebar-routes.tsx"
click node_search "https://github.com/adhnan23/lms-skilljet/blob/master/app/(dashboard)/(routes)/search/page.tsx"
click node_course_list "https://github.com/adhnan23/lms-skilljet/blob/master/components/courses-list.tsx"
click node_course_view "https://github.com/adhnan23/lms-skilljet/blob/master/app/(course)/courses/%5BcourseId%5D/page.tsx"
click node_chapter_view "https://github.com/adhnan23/lms-skilljet/blob/master/app/(course)/courses/%5BcourseId%5D/chapters/%5BchapterId%5D/page.tsx"
click node_video "https://github.com/adhnan23/lms-skilljet/blob/master/app/(course)/courses/%5BcourseId%5D/chapters/%5BchapterId%5D/_components/video-player.tsx"
click node_course_editor "https://github.com/adhnan23/lms-skilljet/blob/master/app/(dashboard)/(routes)/teacher/courses/%5BcourseId%5D/page.tsx"
click node_course_forms "https://github.com/adhnan23/lms-skilljet/tree/master/app/(dashboard)/(routes)/teacher/courses/%5BcourseId%5D/_components"
click node_chapter_forms "https://github.com/adhnan23/lms-skilljet/tree/master/app/(dashboard)/(routes)/teacher/courses/%5BcourseId%5D/chapters/%5BchapterId%5D/_components"
click node_analytics "https://github.com/adhnan23/lms-skilljet/blob/master/app/(dashboard)/(routes)/teacher/analytics/page.tsx"
click node_course_api "https://github.com/adhnan23/lms-skilljet/blob/master/app/api/courses/route.ts"
click node_chapter_api "https://github.com/adhnan23/lms-skilljet/tree/master/app/api/courses/%5BcourseId%5D/chapters"
click node_attachment_api "https://github.com/adhnan23/lms-skilljet/tree/master/app/api/courses/%5BcourseId%5D/attachments"
click node_checkout "https://github.com/adhnan23/lms-skilljet/blob/master/app/api/courses/%5BcourseId%5D/checkout/route.ts"
click node_stripe "https://github.com/adhnan23/lms-skilljet/blob/master/lib/stripe.ts"
click node_webhook "https://github.com/adhnan23/lms-skilljet/blob/master/app/api/webhook/route.ts"
click node_progress_action "https://github.com/adhnan23/lms-skilljet/blob/master/actions/get-progress.tsx"
click node_db "https://github.com/adhnan23/lms-skilljet/blob/master/lib/db.ts"
click node_upload "https://github.com/adhnan23/lms-skilljet/blob/master/lib/uploadthing.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_auth,node_dashboard toneBlue
class node_search,node_course_list,node_course_view,node_chapter_view,node_video toneAmber
class node_course_editor,node_course_forms,node_chapter_forms,node_analytics toneMint
class node_checkout,node_stripe,node_webhook,node_progress_action toneRose
class node_course_api,node_chapter_api,node_attachment_api,node_db,node_upload,node_learner,node_teacher toneIndigo
```

## Components

### Identity and navigation

- [Sign in and sign up](https://github.com/adhnan23/lms-skilljet/tree/master/app/(auth)/(routes)): `app/(auth)/(routes)`
- [Dashboard navigation](https://github.com/adhnan23/lms-skilljet/blob/master/app/(dashboard)/_components/sidebar-routes.tsx): `app/(dashboard)/_components/sidebar-routes.tsx`

### Course discovery and learning

- [Course search](https://github.com/adhnan23/lms-skilljet/blob/master/app/(dashboard)/(routes)/search/page.tsx): `app/(dashboard)/(routes)/search/page.tsx`
- [Course listings](https://github.com/adhnan23/lms-skilljet/blob/master/components/courses-list.tsx): `components/courses-list.tsx`
- [Course overview](https://github.com/adhnan23/lms-skilljet/blob/master/app/(course)/courses/%5BcourseId%5D/page.tsx): `app/(course)/courses/[courseId]/page.tsx`
- [Chapter learning](https://github.com/adhnan23/lms-skilljet/blob/master/app/(course)/courses/%5BcourseId%5D/chapters/%5BchapterId%5D/page.tsx): `app/(course)/courses/[courseId]/chapters/[chapterId]/page.tsx`
- [Video player](https://github.com/adhnan23/lms-skilljet/blob/master/app/(course)/courses/%5BcourseId%5D/chapters/%5BchapterId%5D/_components/video-player.tsx): `app/(course)/courses/[courseId]/chapters/[chapterId]/_components/video-player.tsx`

### Teacher authoring

- [Course editor](https://github.com/adhnan23/lms-skilljet/blob/master/app/(dashboard)/(routes)/teacher/courses/%5BcourseId%5D/page.tsx): `app/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx`
- [Course setup forms](https://github.com/adhnan23/lms-skilljet/tree/master/app/(dashboard)/(routes)/teacher/courses/%5BcourseId%5D/_components): `app/(dashboard)/(routes)/teacher/courses/[courseId]/_components`
- [Chapter editor](https://github.com/adhnan23/lms-skilljet/tree/master/app/(dashboard)/(routes)/teacher/courses/%5BcourseId%5D/chapters/%5BchapterId%5D/_components): `app/(dashboard)/(routes)/teacher/courses/[courseId]/chapters/[chapterId]/_components`
- [Teacher analytics](https://github.com/adhnan23/lms-skilljet/blob/master/app/(dashboard)/(routes)/teacher/analytics/page.tsx): `app/(dashboard)/(routes)/teacher/analytics/page.tsx`

### Enrollment and progress

- [Checkout endpoint](https://github.com/adhnan23/lms-skilljet/blob/master/app/api/courses/%5BcourseId%5D/checkout/route.ts): `app/api/courses/[courseId]/checkout/route.ts`
- [Stripe payments](https://github.com/adhnan23/lms-skilljet/blob/master/lib/stripe.ts): `lib/stripe.ts`
- [Payment webhook](https://github.com/adhnan23/lms-skilljet/blob/master/app/api/webhook/route.ts): `app/api/webhook/route.ts`
- [Progress lookup](https://github.com/adhnan23/lms-skilljet/blob/master/actions/get-progress.tsx): `actions/get-progress.tsx`

### API and persistence

- [Course API](https://github.com/adhnan23/lms-skilljet/blob/master/app/api/courses/route.ts): `app/api/courses/route.ts`
- [Chapter and progress APIs](https://github.com/adhnan23/lms-skilljet/tree/master/app/api/courses/%5BcourseId%5D/chapters): `app/api/courses/[courseId]/chapters`
- [Attachment API](https://github.com/adhnan23/lms-skilljet/tree/master/app/api/courses/%5BcourseId%5D/attachments): `app/api/courses/[courseId]/attachments`
- [Prisma database](https://github.com/adhnan23/lms-skilljet/blob/master/lib/db.ts): `lib/db.ts`
- [UploadThing integration](https://github.com/adhnan23/lms-skilljet/blob/master/lib/uploadthing.ts): `lib/uploadthing.ts`

### Other components

- **Learner**
- **Teacher**

## Connections

- Learner → Sign in and sign up: signs in
- Teacher → Sign in and sign up: signs in
- Learner → Course search: browses courses
- Teacher → Course editor: edits course
- Course search → Prisma database: loads categories (evidence: `app/(dashboard)/(routes)/search/page.tsx`)
- Course search → Course listings: renders results (evidence: `app/(dashboard)/(routes)/search/page.tsx`)
- Course search → Course listings: loads courses (evidence: `app/(dashboard)/(routes)/search/page.tsx`)
- Course listings → Course overview: links courses
- Course overview → Chapter learning: opens chapter
- Chapter learning → Video player: renders player (evidence: `app/(course)/courses/[courseId]/chapters/[chapterId]/page.tsx`)
- Chapter learning → Progress lookup: loads chapter data
- Chapter learning → Checkout endpoint: starts enrollment
- Course editor → Prisma database: loads course data (evidence: `app/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx`)
- Course editor → Course setup forms: renders forms (evidence: `app/(dashboard)/(routes)/teacher/courses/[courseId]/page.tsx`)
- Course setup forms → Course API: updates course
- Chapter editor → Chapter and progress APIs: manages chapters
- Course API → Prisma database: creates course (evidence: `app/api/courses/route.ts`)
- Chapter and progress APIs → Prisma database: accesses records (evidence: `app/api/courses/[courseId]/chapters/[chapterId]/route.ts`)
- Attachment API → Prisma database: stores attachments (evidence: `app/api/courses/[courseId]/attachments/route.ts`)
- Checkout endpoint → Prisma database: checks purchase (evidence: `app/api/courses/[courseId]/checkout/route.ts`)
- Checkout endpoint → Stripe payments: creates session (evidence: `app/api/courses/[courseId]/checkout/route.ts`)
- Stripe payments → Payment webhook: sends event (evidence: `app/api/webhook/route.ts`)
- Payment webhook → Prisma database: records purchase (evidence: `app/api/webhook/route.ts`)
- Progress lookup → Prisma database: reads progress
- Course setup forms → UploadThing integration: uploads assets
