# sahanhansaja026/final-project-edumate-website architecture

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

- Interactive diagram: https://gitdiagram.com/sahanhansaja026/final-project-edumate-website
- Repository: https://github.com/sahanhansaja026/final-project-edumate-website

## Overview

EduMate is an academic-management web application for students and educators, with course/channel management, learning materials, assignments, quizzes, grading, and subscriptions. The main user flow is through the Next.js client to FastAPI endpoints, which expose domain operations backed by SQLAlchemy persistence; file uploads use S3. The README also documents attendance, announcements, and reports, though their implementation is not established by the sampled source. Edges are limited to README statements and relationships visible in the supplied excerpts or SOURCE INDEX.

Main entry points: [`backend/main.py`](https://github.com/sahanhansaja026/final-project-edumate-website/blob/main/backend/main.py) (FastAPI application), [`client/app`](https://github.com/sahanhansaja026/final-project-edumate-website/tree/main/client/app) (Next.js client), [`backend/routes/assignment.py`](https://github.com/sahanhansaja026/final-project-edumate-website/blob/main/backend/routes/assignment.py) (Assignments and submissions), [`backend/chatbot/chatbot.py`](https://github.com/sahanhansaja026/final-project-edumate-website/blob/main/backend/chatbot/chatbot.py) (AI chatbot)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_web["Next.js client"]
  node_auth_state["Client auth state<br/>[authService.ts]"]
end

subgraph group_api["API and identity"]
  node_api_app["FastAPI application<br/>[main.py]"]
  node_identity["Authentication and profiles<br/>[auth.py]"]
  node_profile["Profile management<br/>[profile.py]"]
end

subgraph group_learning["Courses and learning"]
  node_courses["Modules and channels<br/>[channel.py]"]
  node_module_search["Module discovery<br/>[module_routes.py]"]
  node_enrollment["Enrollment<br/>[enrollment.py]"]
  node_learning_content["Content and video<br/>[content.py]"]
  node_meetings["Meetings<br/>[meeting.py]"]
  node_attendance["Attendance tracking"]
  node_announcements["Notices and announcements"]
end

subgraph group_assessment["Assessment"]
  node_assignments["Assignments and submissions<br/>[assignment.py]"]
  node_grading["Grading and scores<br/>[manual_grading.py]"]
  node_quizzes["Quizzes and questions<br/>[quiz.py]"]
  node_quiz_attempts["Quiz attempt checks"]
end

subgraph group_platform["Platform services"]
  node_subscriptions["Plans and access"]
  node_chatbot["AI chatbot<br/>[chatbot.py]"]
  node_database_layer["SQLAlchemy database layer<br/>[database.py]"]
  node_file_upload["S3 file uploads<br/>[s3_service.py]"]
  node_reports["Reports and analytics"]
end

node_user(("Student or educator"))
node_ai_provider["OpenRouter AI"]
node_postgres[("PostgreSQL")]
node_s3[("AWS S3")]

node_user -->|"uses"| node_web
node_web -->|"stores login"| node_auth_state
node_web -->|"calls REST API"| node_api_app
node_api_app -->|"registers routes"| node_identity
node_api_app -->|"registers routes"| node_profile
node_api_app -->|"registers routes"| node_courses
node_api_app -->|"registers routes"| node_module_search
node_api_app -->|"registers routes"| node_enrollment
node_api_app -->|"registers routes"| node_learning_content
node_api_app -->|"registers routes"| node_meetings
node_api_app -->|"registers routes"| node_assignments
node_api_app -->|"registers routes"| node_grading
node_api_app -->|"registers routes"| node_quizzes
node_api_app -->|"registers routes"| node_quiz_attempts
node_api_app -->|"registers routes"| node_subscriptions
node_api_app -->|"registers routes"| node_chatbot
node_chatbot -->|"requests completions"| node_ai_provider
node_api_app -->|"creates tables"| node_database_layer
node_database_layer -->|"connects to"| node_postgres
node_assignments -->|"uses upload service"| node_file_upload
node_file_upload -->|"uploads files"| node_s3
node_user -->|"tracks attendance"| node_attendance
node_user -->|"views notices"| node_announcements
node_user -->|"views reports"| node_reports

click node_web "https://github.com/sahanhansaja026/final-project-edumate-website/tree/main/client/app"
click node_auth_state "https://github.com/sahanhansaja026/final-project-edumate-website/blob/main/client/app/services/authService.ts"
click node_api_app "https://github.com/sahanhansaja026/final-project-edumate-website/blob/main/backend/main.py"
click node_identity "https://github.com/sahanhansaja026/final-project-edumate-website/blob/main/backend/routes/auth.py"
click node_profile "https://github.com/sahanhansaja026/final-project-edumate-website/blob/main/backend/routes/profile.py"
click node_courses "https://github.com/sahanhansaja026/final-project-edumate-website/blob/main/backend/routes/channel.py"
click node_module_search "https://github.com/sahanhansaja026/final-project-edumate-website/blob/main/backend/routes/module_routes.py"
click node_enrollment "https://github.com/sahanhansaja026/final-project-edumate-website/blob/main/backend/routes/enrollment.py"
click node_learning_content "https://github.com/sahanhansaja026/final-project-edumate-website/blob/main/backend/routes/content.py"
click node_meetings "https://github.com/sahanhansaja026/final-project-edumate-website/blob/main/backend/routes/meeting.py"
click node_assignments "https://github.com/sahanhansaja026/final-project-edumate-website/blob/main/backend/routes/assignment.py"
click node_grading "https://github.com/sahanhansaja026/final-project-edumate-website/blob/main/backend/routes/manual_grading.py"
click node_quizzes "https://github.com/sahanhansaja026/final-project-edumate-website/blob/main/backend/routes/quiz.py"
click node_quiz_attempts "https://github.com/sahanhansaja026/final-project-edumate-website/blob/main/backend/routes/quiz_attempt_controller.py"
click node_subscriptions "https://github.com/sahanhansaja026/final-project-edumate-website/blob/main/backend/routes/subscription_routes.py"
click node_chatbot "https://github.com/sahanhansaja026/final-project-edumate-website/blob/main/backend/chatbot/chatbot.py"
click node_database_layer "https://github.com/sahanhansaja026/final-project-edumate-website/blob/main/backend/database.py"
click node_file_upload "https://github.com/sahanhansaja026/final-project-edumate-website/blob/main/backend/services/s3_service.py"
click node_attendance "https://github.com/sahanhansaja026/final-project-edumate-website/tree/main/backend/routes"
click node_announcements "https://github.com/sahanhansaja026/final-project-edumate-website/tree/main/backend/routes"
click node_reports "https://github.com/sahanhansaja026/final-project-edumate-website/tree/main/backend/routes"

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_web,node_auth_state toneBlue
class node_api_app,node_identity,node_profile,node_postgres,node_s3 toneAmber
class node_courses,node_module_search,node_enrollment,node_learning_content,node_meetings,node_attendance,node_announcements,node_ai_provider toneMint
class node_assignments,node_grading,node_quizzes,node_quiz_attempts toneRose
class node_subscriptions,node_chatbot,node_database_layer,node_file_upload,node_reports,node_user toneIndigo
```

## Components

### Web client

- [Next.js client](https://github.com/sahanhansaja026/final-project-edumate-website/tree/main/client/app): `client/app`
- [Client auth state](https://github.com/sahanhansaja026/final-project-edumate-website/blob/main/client/app/services/authService.ts): `client/app/services/authService.ts`

### API and identity

- [FastAPI application](https://github.com/sahanhansaja026/final-project-edumate-website/blob/main/backend/main.py): `backend/main.py`
- [Authentication and profiles](https://github.com/sahanhansaja026/final-project-edumate-website/blob/main/backend/routes/auth.py): `backend/routes/auth.py`
- [Profile management](https://github.com/sahanhansaja026/final-project-edumate-website/blob/main/backend/routes/profile.py): `backend/routes/profile.py`

### Courses and learning

- [Modules and channels](https://github.com/sahanhansaja026/final-project-edumate-website/blob/main/backend/routes/channel.py): `backend/routes/channel.py`
- [Module discovery](https://github.com/sahanhansaja026/final-project-edumate-website/blob/main/backend/routes/module_routes.py): `backend/routes/module_routes.py`
- [Enrollment](https://github.com/sahanhansaja026/final-project-edumate-website/blob/main/backend/routes/enrollment.py): `backend/routes/enrollment.py`
- [Content and video](https://github.com/sahanhansaja026/final-project-edumate-website/blob/main/backend/routes/content.py): `backend/routes/content.py`
- [Meetings](https://github.com/sahanhansaja026/final-project-edumate-website/blob/main/backend/routes/meeting.py): `backend/routes/meeting.py`
- [Attendance tracking](https://github.com/sahanhansaja026/final-project-edumate-website/tree/main/backend/routes): `backend/routes`
- [Notices and announcements](https://github.com/sahanhansaja026/final-project-edumate-website/tree/main/backend/routes): `backend/routes`

### Assessment

- [Assignments and submissions](https://github.com/sahanhansaja026/final-project-edumate-website/blob/main/backend/routes/assignment.py): `backend/routes/assignment.py`
- [Grading and scores](https://github.com/sahanhansaja026/final-project-edumate-website/blob/main/backend/routes/manual_grading.py): `backend/routes/manual_grading.py`
- [Quizzes and questions](https://github.com/sahanhansaja026/final-project-edumate-website/blob/main/backend/routes/quiz.py): `backend/routes/quiz.py`
- [Quiz attempt checks](https://github.com/sahanhansaja026/final-project-edumate-website/blob/main/backend/routes/quiz_attempt_controller.py): `backend/routes/quiz_attempt_controller.py`

### Platform services

- [Plans and access](https://github.com/sahanhansaja026/final-project-edumate-website/blob/main/backend/routes/subscription_routes.py): `backend/routes/subscription_routes.py`
- [AI chatbot](https://github.com/sahanhansaja026/final-project-edumate-website/blob/main/backend/chatbot/chatbot.py): `backend/chatbot/chatbot.py`
- [SQLAlchemy database layer](https://github.com/sahanhansaja026/final-project-edumate-website/blob/main/backend/database.py): `backend/database.py`
- [S3 file uploads](https://github.com/sahanhansaja026/final-project-edumate-website/blob/main/backend/services/s3_service.py): `backend/services/s3_service.py`
- [Reports and analytics](https://github.com/sahanhansaja026/final-project-edumate-website/tree/main/backend/routes): `backend/routes`

### Other components

- **Student or educator**
- **OpenRouter AI**
- **PostgreSQL**
- **AWS S3**

## Connections

- Student or educator → Next.js client: uses (evidence: `README.md`)
- Next.js client → Client auth state: stores login (evidence: `client/app/services/authService.ts`)
- Next.js client → FastAPI application: calls REST API (evidence: `README.md`)
- FastAPI application → Authentication and profiles: registers routes (evidence: `backend/main.py`)
- FastAPI application → Profile management: registers routes (evidence: `backend/main.py`)
- FastAPI application → Modules and channels: registers routes (evidence: `backend/main.py`)
- FastAPI application → Module discovery: registers routes (evidence: `backend/main.py`)
- FastAPI application → Enrollment: registers routes (evidence: `backend/main.py`)
- FastAPI application → Content and video: registers routes (evidence: `backend/main.py`)
- FastAPI application → Meetings: registers routes (evidence: `backend/main.py`)
- FastAPI application → Assignments and submissions: registers routes (evidence: `backend/main.py`)
- FastAPI application → Grading and scores: registers routes (evidence: `backend/main.py`)
- FastAPI application → Quizzes and questions: registers routes (evidence: `backend/main.py`)
- FastAPI application → Quiz attempt checks: registers routes (evidence: `backend/main.py`)
- FastAPI application → Plans and access: registers routes (evidence: `backend/main.py`)
- FastAPI application → AI chatbot: registers routes (evidence: `backend/main.py`)
- AI chatbot → OpenRouter AI: requests completions
- FastAPI application → SQLAlchemy database layer: creates tables (evidence: `backend/main.py`)
- SQLAlchemy database layer → PostgreSQL: connects to (evidence: `README.md`)
- Assignments and submissions → S3 file uploads: uses upload service (evidence: `backend/routes/assignment.py`)
- S3 file uploads → AWS S3: uploads files (evidence: `backend/services/s3_service.py`)
- Student or educator → Attendance tracking: tracks attendance (evidence: `README.md`)
- Student or educator → Notices and announcements: views notices (evidence: `README.md`)
- Student or educator → Reports and analytics: views reports (evidence: `README.md`)
