# jf7890/my-learn architecture

> Architecture diagram of the GitHub repository jf7890/my-learn, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-24). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jf7890/my-learn
- Repository: https://github.com/jf7890/my-learn

## Overview

My-Learn is a self-hosted team learning workspace. Learners sign in, browse courses, view lessons and stream video, then record progress and use learning tools; administrators manage accounts, course access and workspace settings. The React app calls a FastAPI backend, which applies authorization and stores metadata in SQLite while serving original media from disk. The graph follows documented and indexed relationships; unsampled features are included where the README establishes them, but their internal call paths are not inferred.

Main entry points: [`frontend/src/api.js`](https://github.com/jf7890/my-learn/blob/main/frontend/src/api.js) (API client), [`server/routers/admin.py`](https://github.com/jf7890/my-learn/blob/main/server/routers/admin.py) (Admin routes), [`frontend/src/App.jsx`](https://github.com/jf7890/my-learn/blob/main/frontend/src/App.jsx) (App routing), [`server/db.py`](https://github.com/jf7890/my-learn/blob/main/server/db.py) (SQLite data)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Learner experience"]
  node_app["App routing<br/>[App.jsx]"]
  node_catalog["Course catalog<br/>[CourseGrid.jsx]"]
  node_courseview["Course lessons<br/>[CourseView.jsx]"]
  node_player["Video player<br/>[VideoPlayer.jsx]"]
  node_notes["Private notes<br/>[LessonNotes.jsx]"]
  node_knowledge["Knowledge checks<br/>[KnowledgeCheck.jsx]"]
  node_branding["Branding context"]
  node_api_client["API client<br/>[api.js]"]
end

subgraph group_admin["Workspace administration"]
  node_admin_ui["Admin dashboard<br/>[AdminDashboard.jsx]"]
  node_user_admin["User management<br/>[UserManagement.jsx]"]
end

subgraph group_api["API and access"]
  node_auth_routes["Authentication routes<br/>[auth_routes.py]"]
  node_course_routes["Course routes<br/>[courses.py]"]
  node_media_routes["Media routes<br/>[media.py]"]
  node_admin_routes["Admin routes<br/>[admin.py]"]
  node_policies["Course access policies<br/>[policies.py]"]
  node_auth["Authentication<br/>[auth.py]"]
  node_schemas["Request schemas<br/>[schemas.py]"]
end

subgraph group_learning["Learning services"]
  node_scanner["Course discovery<br/>[scanner.py]"]
  node_progress["Progress and streaks<br/>[progress.py]"]
  node_learning_stats["Learning statistics<br/>[learning_stats.py]"]
  node_knowledge_service["Quiz service"]
end

subgraph group_storage["Workspace data"]
  node_sqlite[("SQLite data<br/>[db.py]")]
  node_media_files[("Course media files")]
  node_mailer["Email delivery<br/>[mailer.py]"]
  node_notifications["Notifications<br/>[notifications.py]"]
end

node_learner(("Learner"))
node_administrator(("Administrator"))

node_learner -->|"opens workspace"| node_app
node_administrator -->|"opens workspace"| node_app
node_app -->|"routes to"| node_catalog
node_app -->|"routes to"| node_admin_ui
node_app -->|"routes to"| node_user_admin
node_catalog -->|"requests courses"| node_api_client
node_courseview -->|"renders"| node_player
node_courseview -->|"renders"| node_notes
node_courseview -->|"requests data"| node_api_client
node_player -->|"requests playback"| node_api_client
node_knowledge -->|"submits answers"| node_api_client
node_branding -->|"loads branding"| node_api_client
node_admin_ui -->|"manages workspace"| node_api_client
node_api_client -->|"sends API requests"| node_auth_routes
node_api_client -->|"sends API requests"| node_course_routes
node_api_client -->|"sends API requests"| node_media_routes
node_api_client -->|"sends API requests"| node_admin_routes
node_auth_routes -->|"authenticates"| node_auth
node_admin_routes -->|"loads statistics"| node_learning_stats
node_course_routes -->|"checks access"| node_policies
node_media_routes -->|"checks access"| node_policies
node_media_routes -->|"streams media"| node_media_files
node_progress -->|"uses statistics"| node_learning_stats
node_knowledge -->|"checks answers"| node_knowledge_service
node_auth -->|"reads accounts"| node_sqlite
node_scanner -->|"indexes courses"| node_sqlite
node_progress -->|"stores progress"| node_sqlite
node_admin_routes -->|"manages records"| node_sqlite
node_auth_routes -->|"validates requests"| node_schemas
node_admin_routes -->|"sends email"| node_mailer
node_admin_routes -->|"uses notifications"| node_notifications

click node_app "https://github.com/jf7890/my-learn/blob/main/frontend/src/App.jsx"
click node_catalog "https://github.com/jf7890/my-learn/blob/main/frontend/src/components/CourseGrid.jsx"
click node_courseview "https://github.com/jf7890/my-learn/blob/main/frontend/src/components/CourseView.jsx"
click node_player "https://github.com/jf7890/my-learn/blob/main/frontend/src/components/VideoPlayer.jsx"
click node_notes "https://github.com/jf7890/my-learn/blob/main/frontend/src/components/LessonNotes.jsx"
click node_knowledge "https://github.com/jf7890/my-learn/blob/main/frontend/src/components/KnowledgeCheck.jsx"
click node_branding "https://github.com/jf7890/my-learn/blob/main/frontend/src/BrandingContext.jsx"
click node_api_client "https://github.com/jf7890/my-learn/blob/main/frontend/src/api.js"
click node_admin_ui "https://github.com/jf7890/my-learn/blob/main/frontend/src/components/AdminDashboard.jsx"
click node_user_admin "https://github.com/jf7890/my-learn/blob/main/frontend/src/components/UserManagement.jsx"
click node_auth_routes "https://github.com/jf7890/my-learn/blob/main/server/routers/auth_routes.py"
click node_course_routes "https://github.com/jf7890/my-learn/blob/main/server/routers/courses.py"
click node_media_routes "https://github.com/jf7890/my-learn/blob/main/server/routers/media.py"
click node_admin_routes "https://github.com/jf7890/my-learn/blob/main/server/routers/admin.py"
click node_policies "https://github.com/jf7890/my-learn/blob/main/server/access/policies.py"
click node_auth "https://github.com/jf7890/my-learn/blob/main/server/auth.py"
click node_scanner "https://github.com/jf7890/my-learn/blob/main/server/scanner.py"
click node_progress "https://github.com/jf7890/my-learn/blob/main/server/routers/progress.py"
click node_learning_stats "https://github.com/jf7890/my-learn/blob/main/server/services/learning_stats.py"
click node_knowledge_service "https://github.com/jf7890/my-learn/blob/main/server/services/knowledge_service.py"
click node_sqlite "https://github.com/jf7890/my-learn/blob/main/server/db.py"
click node_mailer "https://github.com/jf7890/my-learn/blob/main/server/mailer.py"
click node_notifications "https://github.com/jf7890/my-learn/blob/main/server/notifications.py"
click node_schemas "https://github.com/jf7890/my-learn/blob/main/server/schemas.py"

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_app,node_catalog,node_courseview,node_player,node_notes,node_knowledge,node_branding,node_api_client toneBlue
class node_admin_ui,node_user_admin toneAmber
class node_auth_routes,node_course_routes,node_media_routes,node_admin_routes,node_policies,node_auth,node_schemas toneMint
class node_scanner,node_progress,node_learning_stats,node_knowledge_service toneRose
class node_sqlite,node_media_files,node_mailer,node_notifications,node_learner,node_administrator toneIndigo
```

## Components

### Learner experience

- [App routing](https://github.com/jf7890/my-learn/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Course catalog](https://github.com/jf7890/my-learn/blob/main/frontend/src/components/CourseGrid.jsx): `frontend/src/components/CourseGrid.jsx`
- [Course lessons](https://github.com/jf7890/my-learn/blob/main/frontend/src/components/CourseView.jsx): `frontend/src/components/CourseView.jsx`
- [Video player](https://github.com/jf7890/my-learn/blob/main/frontend/src/components/VideoPlayer.jsx): `frontend/src/components/VideoPlayer.jsx`
- [Private notes](https://github.com/jf7890/my-learn/blob/main/frontend/src/components/LessonNotes.jsx): `frontend/src/components/LessonNotes.jsx`
- [Knowledge checks](https://github.com/jf7890/my-learn/blob/main/frontend/src/components/KnowledgeCheck.jsx): `frontend/src/components/KnowledgeCheck.jsx`
- [Branding context](https://github.com/jf7890/my-learn/blob/main/frontend/src/BrandingContext.jsx): `frontend/src/BrandingContext.jsx`
- [API client](https://github.com/jf7890/my-learn/blob/main/frontend/src/api.js): `frontend/src/api.js`

### Workspace administration

- [Admin dashboard](https://github.com/jf7890/my-learn/blob/main/frontend/src/components/AdminDashboard.jsx): `frontend/src/components/AdminDashboard.jsx`
- [User management](https://github.com/jf7890/my-learn/blob/main/frontend/src/components/UserManagement.jsx): `frontend/src/components/UserManagement.jsx`

### API and access

- [Authentication routes](https://github.com/jf7890/my-learn/blob/main/server/routers/auth_routes.py): `server/routers/auth_routes.py`
- [Course routes](https://github.com/jf7890/my-learn/blob/main/server/routers/courses.py): `server/routers/courses.py`
- [Media routes](https://github.com/jf7890/my-learn/blob/main/server/routers/media.py): `server/routers/media.py`
- [Admin routes](https://github.com/jf7890/my-learn/blob/main/server/routers/admin.py): `server/routers/admin.py`
- [Course access policies](https://github.com/jf7890/my-learn/blob/main/server/access/policies.py): `server/access/policies.py`
- [Authentication](https://github.com/jf7890/my-learn/blob/main/server/auth.py): `server/auth.py`
- [Request schemas](https://github.com/jf7890/my-learn/blob/main/server/schemas.py): `server/schemas.py`

### Learning services

- [Course discovery](https://github.com/jf7890/my-learn/blob/main/server/scanner.py): `server/scanner.py`
- [Progress and streaks](https://github.com/jf7890/my-learn/blob/main/server/routers/progress.py): `server/routers/progress.py`
- [Learning statistics](https://github.com/jf7890/my-learn/blob/main/server/services/learning_stats.py): `server/services/learning_stats.py`
- [Quiz service](https://github.com/jf7890/my-learn/blob/main/server/services/knowledge_service.py): `server/services/knowledge_service.py`

### Workspace data

- [SQLite data](https://github.com/jf7890/my-learn/blob/main/server/db.py): `server/db.py`
- **Course media files**
- [Email delivery](https://github.com/jf7890/my-learn/blob/main/server/mailer.py): `server/mailer.py`
- [Notifications](https://github.com/jf7890/my-learn/blob/main/server/notifications.py): `server/notifications.py`

### Other components

- **Learner**
- **Administrator**

## Connections

- Learner → App routing: opens workspace
- Administrator → App routing: opens workspace
- App routing → Course catalog: routes to (evidence: `frontend/src/App.jsx`)
- App routing → Admin dashboard: routes to (evidence: `frontend/src/App.jsx`)
- App routing → User management: routes to (evidence: `frontend/src/App.jsx`)
- Course catalog → API client: requests courses (evidence: `frontend/src/components/CourseGrid.jsx`)
- Course lessons → Video player: renders (evidence: `frontend/src/components/CourseView.jsx`)
- Course lessons → Private notes: renders (evidence: `frontend/src/components/CourseView.jsx`)
- Course lessons → API client: requests data (evidence: `frontend/src/components/CourseView.jsx`)
- Video player → API client: requests playback (evidence: `frontend/src/components/VideoPlayer.jsx`)
- Knowledge checks → API client: submits answers (evidence: `frontend/src/components/KnowledgeCheck.jsx`)
- Branding context → API client: loads branding (evidence: `frontend/src/BrandingContext.jsx`)
- Admin dashboard → API client: manages workspace (evidence: `frontend/src/components/AdminDashboard.jsx`)
- API client → Authentication routes: sends API requests
- API client → Course routes: sends API requests
- API client → Media routes: sends API requests
- API client → Admin routes: sends API requests
- Authentication routes → Authentication: authenticates (evidence: `server/routers/auth_routes.py`)
- Admin routes → Learning statistics: loads statistics (evidence: `server/routers/admin.py`)
- Course routes → Course access policies: checks access (evidence: `server/routers/courses.py`)
- Media routes → Course access policies: checks access (evidence: `server/routers/media.py`)
- Media routes → Course media files: streams media
- Progress and streaks → Learning statistics: uses statistics (evidence: `server/routers/progress.py`)
- Knowledge checks → Quiz service: checks answers
- Authentication → SQLite data: reads accounts (evidence: `server/auth.py`)
- Course discovery → SQLite data: indexes courses (evidence: `server/scanner.py`)
- Progress and streaks → SQLite data: stores progress (evidence: `server/routers/progress.py`)
- Admin routes → SQLite data: manages records (evidence: `server/routers/admin.py`)
- Authentication routes → Request schemas: validates requests (evidence: `server/routers/auth_routes.py`)
- Admin routes → Email delivery: sends email (evidence: `server/routers/admin.py`)
- Admin routes → Notifications: uses notifications (evidence: `server/routers/admin.py`)
