# mathivadhanis505/student_prod architecture

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

- Interactive diagram: https://gitdiagram.com/mathivadhanis505/student_prod
- Repository: https://github.com/mathivadhanis505/student_prod

## Overview

Eko is a student-life dashboard for managing coursework, deadlines, exams, focus sessions, calendar events, and study statistics, with Google and Spotify integrations. The main workflow loads dashboard data through the frontend API client, presents it in routed pages and widgets, and sends task, course, exam, or focus-session actions back through the client. The backend exposes domain-specific API routers backed by relational models and a database. Google integration is represented by normalized sample data and placeholder API calls; the README is empty, so capability coverage is based on the source index and sampled code.

Main entry points: [`frontend/src/App.tsx`](https://github.com/mathivadhanis505/student_prod/blob/main/frontend/src/App.tsx) (App shell), [`frontend/src/lib/api.ts`](https://github.com/mathivadhanis505/student_prod/blob/main/frontend/src/lib/api.ts) (API client), [`backend/app/core/database.py`](https://github.com/mathivadhanis505/student_prod/blob/main/backend/app/core/database.py) (Database session), [`frontend/src/pages/DashboardPage.tsx`](https://github.com/mathivadhanis505/student_prod/blob/main/frontend/src/pages/DashboardPage.tsx) (Dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Dashboard client"]
  node_app["App shell<br/>[App.tsx]"]
  node_api_client["API client<br/>[api.ts]"]
  node_dashboard["Dashboard<br/>[DashboardPage.tsx]"]
  node_calendar_page["Calendar page<br/>[CalendarPage.tsx]"]
  node_tasks_page["Tasks page<br/>[TasksPage.tsx]"]
  node_courses_page["Courses page<br/>[CoursesPage.tsx]"]
  node_focus_page["Focus page<br/>[FocusPage.tsx]"]
  node_stats_page["Stats page<br/>[StatsPage.tsx]"]
  node_timeline_widget["Timeline widget"]
  node_tasks_widget["Today tasks widget"]
  node_pomodoro_widget["Pomodoro widget"]
  node_focus_widget["Focus widget"]
  node_spotify_widget["Spotify widget<br/>[SpotifyWidget.tsx]"]
  node_task_modal["Task editor<br/>[TaskModal.tsx]"]
  node_course_modal["Course editor<br/>[CourseModal.tsx]"]
  node_exam_modal["Exam editor<br/>[ExamModal.tsx]"]
end

subgraph group_domain["Study workflows"]
end

subgraph group_backend["Backend API"]
  node_auth_api["Authentication<br/>[auth.py]"]
  node_courses_api["Course API<br/>[courses.py]"]
  node_tasks_api["Task API<br/>[tasks.py]"]
  node_exams_api["Exam API<br/>[exams.py]"]
  node_calendar_api["Calendar API<br/>[calendar.py]"]
  node_focus_api["Focus API<br/>[focus.py]"]
  node_spotify_api["Spotify API<br/>[spotify.py]"]
  node_stats_api["Statistics API<br/>[stats.py]"]
  node_timeline_api["Timeline API<br/>[timeline.py]"]
  node_planner_api["AI planner API<br/>[ai_planner.py]"]
  node_planner_stub["Planner stub<br/>[ai_planner_stub.py]"]
end

subgraph group_data["Persistence and integrations"]
  node_database["Database session<br/>[database.py]"]
  node_models["Domain models<br/>[models.py]"]
  node_schemas["API schemas<br/>[schemas.py]"]
  node_google_service["Google service<br/>[google_service.py]"]
  node_spotify_service["Spotify service<br/>[spotify_service.py]"]
end

node_student(("Student"))
node_store[("Relational database")]

node_student -->|"uses"| node_app
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_calendar_page
node_app -->|"routes to"| node_tasks_page
node_app -->|"routes to"| node_courses_page
node_app -->|"routes to"| node_focus_page
node_app -->|"routes to"| node_stats_page
node_app -->|"loads and updates"| node_api_client
node_app -->|"renders"| node_task_modal
node_app -->|"renders"| node_course_modal
node_app -->|"renders"| node_exam_modal
node_dashboard -->|"renders"| node_timeline_widget
node_dashboard -->|"renders"| node_tasks_widget
node_dashboard -->|"renders"| node_pomodoro_widget
node_dashboard -->|"renders"| node_focus_widget
node_dashboard -->|"renders"| node_spotify_widget
node_api_client -.->|"requests"| node_auth_api
node_api_client -.->|"requests"| node_courses_api
node_api_client -.->|"requests"| node_tasks_api
node_api_client -.->|"requests"| node_exams_api
node_api_client -.->|"requests"| node_calendar_api
node_api_client -.->|"requests"| node_focus_api
node_api_client -.->|"requests"| node_spotify_api
node_api_client -.->|"requests"| node_stats_api
node_api_client -.->|"requests"| node_timeline_api
node_api_client -.->|"requests"| node_planner_api
node_tasks_api -->|"fetches tasks"| node_google_service
node_calendar_api -->|"fetches events"| node_google_service
node_auth_api -->|"checks status"| node_google_service
node_auth_api -->|"checks status"| node_spotify_service
node_spotify_api -->|"delegates playback"| node_spotify_service
node_planner_api -->|"delegates planning"| node_planner_stub
node_tasks_api -->|"queries and writes"| node_database
node_courses_api -->|"queries and writes"| node_database
node_exams_api -->|"queries and writes"| node_database
node_calendar_api -->|"queries"| node_database
node_focus_api -->|"queries and writes"| node_database
node_stats_api -->|"queries"| node_database
node_timeline_api -->|"queries"| node_database
node_auth_api -->|"queries and writes"| node_database
node_planner_api -->|"queries"| node_database
node_database -->|"persists"| node_store
node_database -->|"provides base"| node_models
node_tasks_api -->|"uses"| node_models
node_tasks_api -->|"validates responses"| node_schemas
node_courses_api -->|"uses"| node_models
node_courses_api -->|"validates responses"| node_schemas
node_exams_api -->|"uses"| node_models

click node_app "https://github.com/mathivadhanis505/student_prod/blob/main/frontend/src/App.tsx"
click node_api_client "https://github.com/mathivadhanis505/student_prod/blob/main/frontend/src/lib/api.ts"
click node_dashboard "https://github.com/mathivadhanis505/student_prod/blob/main/frontend/src/pages/DashboardPage.tsx"
click node_calendar_page "https://github.com/mathivadhanis505/student_prod/blob/main/frontend/src/pages/CalendarPage.tsx"
click node_tasks_page "https://github.com/mathivadhanis505/student_prod/blob/main/frontend/src/pages/TasksPage.tsx"
click node_courses_page "https://github.com/mathivadhanis505/student_prod/blob/main/frontend/src/pages/CoursesPage.tsx"
click node_focus_page "https://github.com/mathivadhanis505/student_prod/blob/main/frontend/src/pages/FocusPage.tsx"
click node_stats_page "https://github.com/mathivadhanis505/student_prod/blob/main/frontend/src/pages/StatsPage.tsx"
click node_timeline_widget "https://github.com/mathivadhanis505/student_prod/blob/main/frontend/src/components/dashboard/UnifiedTimelineWidget.tsx"
click node_tasks_widget "https://github.com/mathivadhanis505/student_prod/blob/main/frontend/src/components/dashboard/TodayTasksWidget.tsx"
click node_pomodoro_widget "https://github.com/mathivadhanis505/student_prod/blob/main/frontend/src/components/dashboard/MiniPomodoroWidget.tsx"
click node_focus_widget "https://github.com/mathivadhanis505/student_prod/blob/main/frontend/src/components/dashboard/FocusRightNowWidget.tsx"
click node_spotify_widget "https://github.com/mathivadhanis505/student_prod/blob/main/frontend/src/components/dashboard/SpotifyWidget.tsx"
click node_task_modal "https://github.com/mathivadhanis505/student_prod/blob/main/frontend/src/components/tasks/TaskModal.tsx"
click node_course_modal "https://github.com/mathivadhanis505/student_prod/blob/main/frontend/src/components/tasks/CourseModal.tsx"
click node_exam_modal "https://github.com/mathivadhanis505/student_prod/blob/main/frontend/src/components/tasks/ExamModal.tsx"
click node_auth_api "https://github.com/mathivadhanis505/student_prod/blob/main/backend/app/api/auth.py"
click node_courses_api "https://github.com/mathivadhanis505/student_prod/blob/main/backend/app/api/courses.py"
click node_tasks_api "https://github.com/mathivadhanis505/student_prod/blob/main/backend/app/api/tasks.py"
click node_exams_api "https://github.com/mathivadhanis505/student_prod/blob/main/backend/app/api/exams.py"
click node_calendar_api "https://github.com/mathivadhanis505/student_prod/blob/main/backend/app/api/calendar.py"
click node_focus_api "https://github.com/mathivadhanis505/student_prod/blob/main/backend/app/api/focus.py"
click node_spotify_api "https://github.com/mathivadhanis505/student_prod/blob/main/backend/app/api/spotify.py"
click node_stats_api "https://github.com/mathivadhanis505/student_prod/blob/main/backend/app/api/stats.py"
click node_timeline_api "https://github.com/mathivadhanis505/student_prod/blob/main/backend/app/api/timeline.py"
click node_planner_api "https://github.com/mathivadhanis505/student_prod/blob/main/backend/app/api/ai_planner.py"
click node_planner_stub "https://github.com/mathivadhanis505/student_prod/blob/main/backend/app/services/ai_planner_stub.py"
click node_database "https://github.com/mathivadhanis505/student_prod/blob/main/backend/app/core/database.py"
click node_models "https://github.com/mathivadhanis505/student_prod/blob/main/backend/app/models/models.py"
click node_schemas "https://github.com/mathivadhanis505/student_prod/blob/main/backend/app/schemas/schemas.py"
click node_google_service "https://github.com/mathivadhanis505/student_prod/blob/main/backend/app/services/google_service.py"
click node_spotify_service "https://github.com/mathivadhanis505/student_prod/blob/main/backend/app/services/spotify_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_api_client,node_dashboard,node_calendar_page,node_tasks_page,node_courses_page,node_focus_page,node_stats_page,node_timeline_widget,node_tasks_widget,node_pomodoro_widget,node_focus_widget,node_spotify_widget,node_task_modal,node_course_modal,node_exam_modal toneBlue
class node_auth_api,node_courses_api,node_tasks_api,node_exams_api,node_calendar_api,node_focus_api,node_spotify_api,node_stats_api,node_timeline_api,node_planner_api,node_planner_stub toneMint
class node_database,node_models,node_schemas,node_google_service,node_spotify_service toneRose
class node_student toneIndigo
class node_store toneAmber
```

## Components

### Dashboard client

- [App shell](https://github.com/mathivadhanis505/student_prod/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [API client](https://github.com/mathivadhanis505/student_prod/blob/main/frontend/src/lib/api.ts): `frontend/src/lib/api.ts`
- [Dashboard](https://github.com/mathivadhanis505/student_prod/blob/main/frontend/src/pages/DashboardPage.tsx): `frontend/src/pages/DashboardPage.tsx`
- [Calendar page](https://github.com/mathivadhanis505/student_prod/blob/main/frontend/src/pages/CalendarPage.tsx): `frontend/src/pages/CalendarPage.tsx`
- [Tasks page](https://github.com/mathivadhanis505/student_prod/blob/main/frontend/src/pages/TasksPage.tsx): `frontend/src/pages/TasksPage.tsx`
- [Courses page](https://github.com/mathivadhanis505/student_prod/blob/main/frontend/src/pages/CoursesPage.tsx): `frontend/src/pages/CoursesPage.tsx`
- [Focus page](https://github.com/mathivadhanis505/student_prod/blob/main/frontend/src/pages/FocusPage.tsx): `frontend/src/pages/FocusPage.tsx`
- [Stats page](https://github.com/mathivadhanis505/student_prod/blob/main/frontend/src/pages/StatsPage.tsx): `frontend/src/pages/StatsPage.tsx`
- [Timeline widget](https://github.com/mathivadhanis505/student_prod/blob/main/frontend/src/components/dashboard/UnifiedTimelineWidget.tsx): `frontend/src/components/dashboard/UnifiedTimelineWidget.tsx`
- [Today tasks widget](https://github.com/mathivadhanis505/student_prod/blob/main/frontend/src/components/dashboard/TodayTasksWidget.tsx): `frontend/src/components/dashboard/TodayTasksWidget.tsx`
- [Pomodoro widget](https://github.com/mathivadhanis505/student_prod/blob/main/frontend/src/components/dashboard/MiniPomodoroWidget.tsx): `frontend/src/components/dashboard/MiniPomodoroWidget.tsx`
- [Focus widget](https://github.com/mathivadhanis505/student_prod/blob/main/frontend/src/components/dashboard/FocusRightNowWidget.tsx): `frontend/src/components/dashboard/FocusRightNowWidget.tsx`
- [Spotify widget](https://github.com/mathivadhanis505/student_prod/blob/main/frontend/src/components/dashboard/SpotifyWidget.tsx): `frontend/src/components/dashboard/SpotifyWidget.tsx`
- [Task editor](https://github.com/mathivadhanis505/student_prod/blob/main/frontend/src/components/tasks/TaskModal.tsx): `frontend/src/components/tasks/TaskModal.tsx`
- [Course editor](https://github.com/mathivadhanis505/student_prod/blob/main/frontend/src/components/tasks/CourseModal.tsx): `frontend/src/components/tasks/CourseModal.tsx`
- [Exam editor](https://github.com/mathivadhanis505/student_prod/blob/main/frontend/src/components/tasks/ExamModal.tsx): `frontend/src/components/tasks/ExamModal.tsx`

### Backend API

- [Authentication](https://github.com/mathivadhanis505/student_prod/blob/main/backend/app/api/auth.py): `backend/app/api/auth.py`
- [Course API](https://github.com/mathivadhanis505/student_prod/blob/main/backend/app/api/courses.py): `backend/app/api/courses.py`
- [Task API](https://github.com/mathivadhanis505/student_prod/blob/main/backend/app/api/tasks.py): `backend/app/api/tasks.py`
- [Exam API](https://github.com/mathivadhanis505/student_prod/blob/main/backend/app/api/exams.py): `backend/app/api/exams.py`
- [Calendar API](https://github.com/mathivadhanis505/student_prod/blob/main/backend/app/api/calendar.py): `backend/app/api/calendar.py`
- [Focus API](https://github.com/mathivadhanis505/student_prod/blob/main/backend/app/api/focus.py): `backend/app/api/focus.py`
- [Spotify API](https://github.com/mathivadhanis505/student_prod/blob/main/backend/app/api/spotify.py): `backend/app/api/spotify.py`
- [Statistics API](https://github.com/mathivadhanis505/student_prod/blob/main/backend/app/api/stats.py): `backend/app/api/stats.py`
- [Timeline API](https://github.com/mathivadhanis505/student_prod/blob/main/backend/app/api/timeline.py): `backend/app/api/timeline.py`
- [AI planner API](https://github.com/mathivadhanis505/student_prod/blob/main/backend/app/api/ai_planner.py): `backend/app/api/ai_planner.py`
- [Planner stub](https://github.com/mathivadhanis505/student_prod/blob/main/backend/app/services/ai_planner_stub.py): `backend/app/services/ai_planner_stub.py`

### Persistence and integrations

- [Database session](https://github.com/mathivadhanis505/student_prod/blob/main/backend/app/core/database.py): `backend/app/core/database.py`
- [Domain models](https://github.com/mathivadhanis505/student_prod/blob/main/backend/app/models/models.py): `backend/app/models/models.py`
- [API schemas](https://github.com/mathivadhanis505/student_prod/blob/main/backend/app/schemas/schemas.py): `backend/app/schemas/schemas.py`
- [Google service](https://github.com/mathivadhanis505/student_prod/blob/main/backend/app/services/google_service.py): `backend/app/services/google_service.py`
- [Spotify service](https://github.com/mathivadhanis505/student_prod/blob/main/backend/app/services/spotify_service.py): `backend/app/services/spotify_service.py`

### Other components

- **Student**
- **Relational database**

## Connections

- Student → App shell: uses
- App shell → Dashboard: routes to (evidence: `frontend/src/App.tsx`)
- App shell → Calendar page: routes to (evidence: `frontend/src/App.tsx`)
- App shell → Tasks page: routes to (evidence: `frontend/src/App.tsx`)
- App shell → Courses page: routes to (evidence: `frontend/src/App.tsx`)
- App shell → Focus page: routes to (evidence: `frontend/src/App.tsx`)
- App shell → Stats page: routes to (evidence: `frontend/src/App.tsx`)
- App shell → API client: loads and updates (evidence: `frontend/src/App.tsx`)
- App shell → Task editor: renders (evidence: `frontend/src/App.tsx`)
- App shell → Course editor: renders (evidence: `frontend/src/App.tsx`)
- App shell → Exam editor: renders (evidence: `frontend/src/App.tsx`)
- Dashboard → Timeline widget: renders (evidence: `frontend/src/pages/DashboardPage.tsx`)
- Dashboard → Today tasks widget: renders (evidence: `frontend/src/pages/DashboardPage.tsx`)
- Dashboard → Pomodoro widget: renders (evidence: `frontend/src/pages/DashboardPage.tsx`)
- Dashboard → Focus widget: renders (evidence: `frontend/src/pages/DashboardPage.tsx`)
- Dashboard → Spotify widget: renders (evidence: `frontend/src/pages/DashboardPage.tsx`)
- API client → Authentication: requests
- API client → Course API: requests
- API client → Task API: requests
- API client → Exam API: requests
- API client → Calendar API: requests
- API client → Focus API: requests
- API client → Spotify API: requests
- API client → Statistics API: requests
- API client → Timeline API: requests
- API client → AI planner API: requests
- Task API → Google service: fetches tasks (evidence: `backend/app/api/tasks.py`)
- Calendar API → Google service: fetches events (evidence: `backend/app/api/calendar.py`)
- Authentication → Google service: checks status (evidence: `backend/app/api/auth.py`)
- Authentication → Spotify service: checks status (evidence: `backend/app/api/auth.py`)
- Spotify API → Spotify service: delegates playback (evidence: `backend/app/api/spotify.py`)
- AI planner API → Planner stub: delegates planning (evidence: `backend/app/api/ai_planner.py`)
- Task API → Database session: queries and writes (evidence: `backend/app/api/tasks.py`)
- Course API → Database session: queries and writes (evidence: `backend/app/api/courses.py`)
- Exam API → Database session: queries and writes (evidence: `backend/app/api/exams.py`)
- Calendar API → Database session: queries (evidence: `backend/app/api/calendar.py`)
- Focus API → Database session: queries and writes (evidence: `backend/app/api/focus.py`)
- Statistics API → Database session: queries (evidence: `backend/app/api/stats.py`)
- Timeline API → Database session: queries (evidence: `backend/app/api/timeline.py`)
- Authentication → Database session: queries and writes (evidence: `backend/app/api/auth.py`)
- AI planner API → Database session: queries (evidence: `backend/app/api/ai_planner.py`)
- Database session → Relational database: persists (evidence: `backend/app/core/database.py`)
- Database session → Domain models: provides base (evidence: `backend/app/models/models.py`)
- Task API → Domain models: uses (evidence: `backend/app/api/tasks.py`)
- Task API → API schemas: validates responses (evidence: `backend/app/api/tasks.py`)
- Course API → Domain models: uses (evidence: `backend/app/api/courses.py`)
- Course API → API schemas: validates responses (evidence: `backend/app/api/courses.py`)
- Exam API → Domain models: uses (evidence: `backend/app/api/exams.py`)
