# shkundapn/cms_obgortka architecture

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

- Interactive diagram: https://gitdiagram.com/shkundapn/cms_obgortka
- Repository: https://github.com/shkundapn/cms_obgortka

## Overview

Hustle is a student-facing Moodle study workspace with a FastAPI backend, a browser extension for Moodle pairing, and web interfaces. The principal workflow is: a student connects Moodle, Hustle retrieves and organizes course materials, then the student uses learning tools and calendar planning. The graph also preserves documented AI, video, oral-practice, and calendar integrations. Backend routing and several service dependencies are supported by indexed references; frontend-to-API details and unsampled router internals are limited to README-level evidence.

Main entry points: [`backend/app/main.py`](https://github.com/shkundapn/cms_obgortka/blob/main/backend/app/main.py) (API application), [`backend/app/services/workspace_store.py`](https://github.com/shkundapn/cms_obgortka/blob/main/backend/app/services/workspace_store.py) (Workspace store), [`backend/app/routers/courses.py`](https://github.com/shkundapn/cms_obgortka/blob/main/backend/app/routers/courses.py) (Course routes), [`backend/app/services/moodle_client.py`](https://github.com/shkundapn/cms_obgortka/blob/main/backend/app/services/moodle_client.py) (Moodle client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["API and Identity"]
  node_app["API application<br/>[main.py]"]
  node_auth["Authentication<br/>[auth.py]"]
  node_course_api["Course routes<br/>[courses.py]"]
  node_assignment_api["Assignment routes<br/>[assignments.py]"]
  node_calendar_api["Calendar routes<br/>[calendar.py]"]
  node_learning_api["Learning routes<br/>[learning.py]"]
  node_workspace_api["Workspace routes<br/>[workspace.py]"]
end

subgraph group_study["Study Services"]
  node_moodle["Moodle client<br/>[moodle_client.py]"]
  node_course_structure["Course structure"]
  node_learning_provider["Learning provider"]
  node_gemini["AI generation<br/>[gemini_service.py]"]
  node_video["Video transcription"]
  node_oral["Oral defense practice"]
  node_calendar_service["Calendar planning"]
  node_scheduler["Calendar scheduler"]
end

subgraph group_clients["Student Interfaces"]
  node_hustle_ui["Hustle workspace UI"]
  node_prototype_ui["Prototype UI"]
  node_extension["Browser extension"]
end

subgraph group_state["Persistence and Integrations"]
  node_workspace_store[("Workspace store<br/>[workspace_store.py]")]
  node_academic_cache["Academic cache<br/>[academic_cache.py]"]
  node_calendar_store[("Calendar storage")]
end

node_student(("Student"))
node_moodle_service["Moodle LMS"]
node_gemini_service["Gemini / Vertex AI"]
node_youtube["YouTube"]
node_google_calendar["Google Calendar / iCalendar"]

node_student -->|"uses"| node_hustle_ui
node_student -->|"uses"| node_prototype_ui
node_student -->|"pairs Moodle"| node_extension
node_hustle_ui -.->|"requests API"| node_app
node_prototype_ui -.->|"requests API"| node_app
node_extension -.->|"pairs through API"| node_app
node_app -->|"routes to"| node_auth
node_app -->|"routes to"| node_course_api
node_app -->|"routes to"| node_assignment_api
node_app -->|"routes to"| node_calendar_api
node_app -->|"routes to"| node_learning_api
node_app -->|"routes to"| node_workspace_api
node_auth -->|"authenticates with"| node_moodle
node_auth -->|"links account"| node_workspace_store
node_auth -->|"invalidates"| node_academic_cache
node_course_api -->|"retrieves courses"| node_moodle
node_course_api -->|"reads cache"| node_academic_cache
node_course_api -->|"transcribes videos"| node_video
node_course_api -->|"persists workspace"| node_workspace_store
node_assignment_api -->|"retrieves assignments"| node_moodle
node_assignment_api -->|"uses cache"| node_academic_cache
node_calendar_api -->|"uses calendar"| node_calendar_service
node_calendar_api -->|"schedules study"| node_scheduler
node_calendar_api -->|"reads cache"| node_academic_cache
node_learning_api -.->|"generates learning"| node_learning_provider
node_workspace_api -.->|"reads and writes"| node_workspace_store
node_moodle -->|"requests course data"| node_moodle_service
node_moodle -->|"organizes content"| node_course_structure
node_workspace_store -->|"builds study materials"| node_gemini
node_workspace_store -->|"resolves video notes"| node_video
node_learning_provider -->|"configures generation"| node_gemini_service
node_gemini -->|"uses provider"| node_gemini_service
node_workspace_store -.->|"supports practice"| node_oral
node_oral -->|"generates questions"| node_gemini
node_calendar_service -->|"reads and writes"| node_calendar_store
node_calendar_service -->|"syncs events"| node_google_calendar
node_calendar_service -.->|"imports deadlines"| node_moodle_service
node_video -->|"extracts lecture notes"| node_youtube

click node_app "https://github.com/shkundapn/cms_obgortka/blob/main/backend/app/main.py"
click node_auth "https://github.com/shkundapn/cms_obgortka/blob/main/backend/app/routers/auth.py"
click node_course_api "https://github.com/shkundapn/cms_obgortka/blob/main/backend/app/routers/courses.py"
click node_assignment_api "https://github.com/shkundapn/cms_obgortka/blob/main/backend/app/routers/assignments.py"
click node_calendar_api "https://github.com/shkundapn/cms_obgortka/blob/main/backend/app/routers/calendar.py"
click node_learning_api "https://github.com/shkundapn/cms_obgortka/blob/main/backend/app/routers/learning.py"
click node_workspace_api "https://github.com/shkundapn/cms_obgortka/blob/main/backend/app/routers/workspace.py"
click node_moodle "https://github.com/shkundapn/cms_obgortka/blob/main/backend/app/services/moodle_client.py"
click node_course_structure "https://github.com/shkundapn/cms_obgortka/blob/main/backend/app/services/course_structure.py"
click node_learning_provider "https://github.com/shkundapn/cms_obgortka/blob/main/backend/app/services/learning_provider.py"
click node_gemini "https://github.com/shkundapn/cms_obgortka/blob/main/backend/app/services/gemini_service.py"
click node_video "https://github.com/shkundapn/cms_obgortka/blob/main/backend/app/services/video_transcriber.py"
click node_oral "https://github.com/shkundapn/cms_obgortka/blob/main/backend/app/services/oral_defense_service.py"
click node_calendar_service "https://github.com/shkundapn/cms_obgortka/blob/main/backend/app/services/calendar_service.py"
click node_scheduler "https://github.com/shkundapn/cms_obgortka/blob/main/backend/app/services/calendar_scheduler.py"
click node_hustle_ui "https://github.com/shkundapn/cms_obgortka/tree/main/frontend/hustle"
click node_prototype_ui "https://github.com/shkundapn/cms_obgortka/tree/main/frontend/prototype"
click node_extension "https://github.com/shkundapn/cms_obgortka/tree/main/frontend/extension"
click node_workspace_store "https://github.com/shkundapn/cms_obgortka/blob/main/backend/app/services/workspace_store.py"
click node_academic_cache "https://github.com/shkundapn/cms_obgortka/blob/main/backend/app/services/academic_cache.py"
click node_calendar_store "https://github.com/shkundapn/cms_obgortka/blob/main/backend/app/services/calendar_service.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_auth,node_course_api,node_assignment_api,node_calendar_api,node_learning_api,node_workspace_api toneBlue
class node_moodle,node_course_structure,node_learning_provider,node_gemini,node_video,node_oral,node_calendar_service,node_scheduler toneAmber
class node_hustle_ui,node_prototype_ui,node_extension toneMint
class node_workspace_store,node_academic_cache,node_calendar_store toneRose
class node_student,node_moodle_service,node_gemini_service,node_youtube,node_google_calendar toneIndigo
```

## Components

### API and Identity

- [API application](https://github.com/shkundapn/cms_obgortka/blob/main/backend/app/main.py): `backend/app/main.py`
- [Authentication](https://github.com/shkundapn/cms_obgortka/blob/main/backend/app/routers/auth.py): `backend/app/routers/auth.py`
- [Course routes](https://github.com/shkundapn/cms_obgortka/blob/main/backend/app/routers/courses.py): `backend/app/routers/courses.py`
- [Assignment routes](https://github.com/shkundapn/cms_obgortka/blob/main/backend/app/routers/assignments.py): `backend/app/routers/assignments.py`
- [Calendar routes](https://github.com/shkundapn/cms_obgortka/blob/main/backend/app/routers/calendar.py): `backend/app/routers/calendar.py`
- [Learning routes](https://github.com/shkundapn/cms_obgortka/blob/main/backend/app/routers/learning.py): `backend/app/routers/learning.py`
- [Workspace routes](https://github.com/shkundapn/cms_obgortka/blob/main/backend/app/routers/workspace.py): `backend/app/routers/workspace.py`

### Study Services

- [Moodle client](https://github.com/shkundapn/cms_obgortka/blob/main/backend/app/services/moodle_client.py): `backend/app/services/moodle_client.py`
- [Course structure](https://github.com/shkundapn/cms_obgortka/blob/main/backend/app/services/course_structure.py): `backend/app/services/course_structure.py`
- [Learning provider](https://github.com/shkundapn/cms_obgortka/blob/main/backend/app/services/learning_provider.py): `backend/app/services/learning_provider.py`
- [AI generation](https://github.com/shkundapn/cms_obgortka/blob/main/backend/app/services/gemini_service.py): `backend/app/services/gemini_service.py`
- [Video transcription](https://github.com/shkundapn/cms_obgortka/blob/main/backend/app/services/video_transcriber.py): `backend/app/services/video_transcriber.py`
- [Oral defense practice](https://github.com/shkundapn/cms_obgortka/blob/main/backend/app/services/oral_defense_service.py): `backend/app/services/oral_defense_service.py`
- [Calendar planning](https://github.com/shkundapn/cms_obgortka/blob/main/backend/app/services/calendar_service.py): `backend/app/services/calendar_service.py`
- [Calendar scheduler](https://github.com/shkundapn/cms_obgortka/blob/main/backend/app/services/calendar_scheduler.py): `backend/app/services/calendar_scheduler.py`

### Student Interfaces

- [Hustle workspace UI](https://github.com/shkundapn/cms_obgortka/tree/main/frontend/hustle): `frontend/hustle`
- [Prototype UI](https://github.com/shkundapn/cms_obgortka/tree/main/frontend/prototype): `frontend/prototype`
- [Browser extension](https://github.com/shkundapn/cms_obgortka/tree/main/frontend/extension): `frontend/extension`

### Persistence and Integrations

- [Workspace store](https://github.com/shkundapn/cms_obgortka/blob/main/backend/app/services/workspace_store.py): `backend/app/services/workspace_store.py`
- [Academic cache](https://github.com/shkundapn/cms_obgortka/blob/main/backend/app/services/academic_cache.py): `backend/app/services/academic_cache.py`
- [Calendar storage](https://github.com/shkundapn/cms_obgortka/blob/main/backend/app/services/calendar_service.py): `backend/app/services/calendar_service.py`

### Other components

- **Student**
- **Moodle LMS**
- **Gemini / Vertex AI**
- **YouTube**
- **Google Calendar / iCalendar**

## Connections

- Student → Hustle workspace UI: uses (evidence: `README.md`)
- Student → Prototype UI: uses (evidence: `README.md`)
- Student → Browser extension: pairs Moodle (evidence: `README.md`)
- Hustle workspace UI → API application: requests API
- Prototype UI → API application: requests API
- Browser extension → API application: pairs through API
- API application → Authentication: routes to (evidence: `backend/app/main.py`)
- API application → Course routes: routes to (evidence: `backend/app/main.py`)
- API application → Assignment routes: routes to (evidence: `backend/app/main.py`)
- API application → Calendar routes: routes to (evidence: `backend/app/main.py`)
- API application → Learning routes: routes to (evidence: `backend/app/main.py`)
- API application → Workspace routes: routes to (evidence: `backend/app/main.py`)
- Authentication → Moodle client: authenticates with (evidence: `backend/app/routers/auth.py`)
- Authentication → Workspace store: links account (evidence: `backend/app/routers/auth.py`)
- Authentication → Academic cache: invalidates (evidence: `backend/app/routers/auth.py`)
- Course routes → Moodle client: retrieves courses (evidence: `backend/app/routers/courses.py`)
- Course routes → Academic cache: reads cache (evidence: `backend/app/routers/courses.py`)
- Course routes → Video transcription: transcribes videos (evidence: `backend/app/routers/courses.py`)
- Course routes → Workspace store: persists workspace (evidence: `backend/app/routers/courses.py`)
- Assignment routes → Moodle client: retrieves assignments (evidence: `backend/app/routers/assignments.py`)
- Assignment routes → Academic cache: uses cache (evidence: `backend/app/routers/assignments.py`)
- Calendar routes → Calendar planning: uses calendar (evidence: `backend/app/routers/calendar.py`)
- Calendar routes → Calendar scheduler: schedules study (evidence: `backend/app/routers/calendar.py`)
- Calendar routes → Academic cache: reads cache (evidence: `backend/app/routers/calendar.py`)
- Learning routes → Learning provider: generates learning
- Workspace routes → Workspace store: reads and writes
- Moodle client → Moodle LMS: requests course data (evidence: `README.md`)
- Moodle client → Course structure: organizes content (evidence: `backend/app/services/moodle_client.py`)
- Workspace store → AI generation: builds study materials (evidence: `backend/app/services/workspace_store.py`)
- Workspace store → Video transcription: resolves video notes (evidence: `backend/app/services/workspace_store.py`)
- Learning provider → Gemini / Vertex AI: configures generation
- AI generation → Gemini / Vertex AI: uses provider (evidence: `README.md`)
- Workspace store → Oral defense practice: supports practice
- Oral defense practice → AI generation: generates questions (evidence: `backend/app/services/oral_defense_service.py`)
- Calendar planning → Calendar storage: reads and writes (evidence: `backend/app/services/calendar_service.py`)
- Calendar planning → Google Calendar / iCalendar: syncs events (evidence: `README.md`)
- Calendar planning → Moodle LMS: imports deadlines
- Video transcription → YouTube: extracts lecture notes (evidence: `README.md`)
