# dharunika-07-n/g_track architecture

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

- Interactive diagram: https://gitdiagram.com/dharunika-07-n/g_track
- Repository: https://github.com/dharunika-07-n/g_track

## Overview

GitHub Activity Tracker is an educational dashboard for monitoring student contributions and managing departments, classrooms, assignments, and reports. HODs and faculty use the React interface to sign in, organize students, review activity and analytics, and manage assignment submissions; the FastAPI backend serves these workflows and persists records. Activity synchronization fetches GitHub data, while scheduled deadline checks can send email reminders. The README documents exports, leaderboards, and semester archiving. Some frontend-to-route details and unsampled subsystems are not visible in the excerpts, so those connections are shown only where documented or supported by the source index.

Main entry points: [`frontend/src/App.jsx`](https://github.com/dharunika-07-n/g_track/blob/main/frontend/src/App.jsx) (Authenticated dashboard), [`backend/main.py`](https://github.com/dharunika-07-n/g_track/blob/main/backend/main.py) (API application), [`backend/database.py`](https://github.com/dharunika-07-n/g_track/blob/main/backend/database.py) (SQLAlchemy data layer), [`backend/schemas.py`](https://github.com/dharunika-07-n/g_track/blob/main/backend/schemas.py) (API data schemas)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Dashboard interface"]
  node_dashboard["Authenticated dashboard<br/>[App.jsx]"]
  node_departments_ui["Department management"]
  node_department_detail_ui["Department detail"]
  node_classrooms_ui["Classroom management<br/>[ClassroomList.jsx]"]
  node_classroom_detail_ui["Classroom detail"]
  node_students_ui["Student management<br/>[StudentsPage.jsx]"]
  node_assignments_ui["Assignment management"]
  node_assignment_form["Assignment form<br/>[AssignmentForm.jsx]"]
  node_analytics_ui["Analytics and reports<br/>[AnalyticsPage.jsx]"]
  node_hod_ui["HOD dashboard<br/>[HodDashboard.jsx]"]
end

subgraph group_api["Backend workflows"]
  node_auth["Authentication<br/>[auth.py]"]
  node_departments["Department workflows<br/>[departments.py]"]
  node_classrooms["Classroom workflows<br/>[classrooms.py]"]
  node_students["Student workflows<br/>[students.py]"]
  node_assignments["Assignment workflows<br/>[assignments.py]"]
  node_submissions["Submission grading<br/>[submissions.py]"]
  node_analytics["Analytics and exports<br/>[analytics.py]"]
  node_schemas["API data schemas<br/>[schemas.py]"]
  node_app["API application<br/>[main.py]"]
end

subgraph group_activity["Activity and scheduling"]
  node_tracker["GitHub activity tracker<br/>[tracker.py]"]
  node_scheduler["Scheduled sync"]
  node_reminders["Deadline reminders<br/>[reminders.py]"]
  node_notifications["Email notifications<br/>[notifications.py]"]
end

subgraph group_state["Data and integrations"]
  node_database["SQLAlchemy data layer<br/>[database.py]"]
  node_github{{"GitHub API"}}
  node_sql_store[("Application database")]
  node_email_service{{"SMTP service"}}
end

node_staff(("HOD and faculty"))

node_staff -->|"uses"| node_dashboard
node_dashboard -->|"routes to"| node_departments_ui
node_dashboard -->|"routes to"| node_department_detail_ui
node_dashboard -->|"routes to"| node_classrooms_ui
node_dashboard -->|"routes to"| node_classroom_detail_ui
node_dashboard -->|"routes to"| node_students_ui
node_dashboard -->|"routes to"| node_assignments_ui
node_dashboard -->|"routes to"| node_analytics_ui
node_dashboard -->|"routes to"| node_hod_ui
node_dashboard -->|"checks identity"| node_auth
node_staff -->|"manages"| node_departments_ui
node_staff -->|"organizes"| node_classrooms_ui
node_staff -->|"manages"| node_students_ui
node_staff -->|"tracks work"| node_assignments_ui
node_staff -->|"reviews reports"| node_analytics_ui
node_classroom_detail_ui -->|"uses"| node_assignment_form
node_dashboard -->|"calls API"| node_app
node_app -->|"routes to"| node_auth
node_app -->|"routes to"| node_departments
node_app -->|"routes to"| node_classrooms
node_app -->|"routes to"| node_students
node_app -->|"routes to"| node_assignments
node_app -->|"routes to"| node_submissions
node_app -->|"routes to"| node_analytics
node_students -->|"fetches activity"| node_tracker
node_tracker -->|"queries"| node_github
node_app -->|"starts scheduler"| node_scheduler
node_scheduler -->|"reads assignments"| node_database
node_scheduler -->|"sends reminders"| node_notifications
node_notifications -->|"sends email"| node_email_service
node_auth -->|"reads and writes"| node_database
node_departments -->|"reads and writes"| node_database
node_classrooms -->|"reads and writes"| node_database
node_students -->|"reads and writes"| node_database
node_assignments -->|"reads and writes"| node_database
node_submissions -->|"reads and writes"| node_database
node_analytics -->|"reads activity"| node_database
node_database -->|"persists records"| node_sql_store
node_departments -->|"uses schemas"| node_schemas
node_classrooms -->|"uses schemas"| node_schemas
node_students -->|"uses schemas"| node_schemas
node_assignments -->|"uses schemas"| node_schemas
node_submissions -->|"uses schemas"| node_schemas

click node_dashboard "https://github.com/dharunika-07-n/g_track/blob/main/frontend/src/App.jsx"
click node_departments_ui "https://github.com/dharunika-07-n/g_track/blob/main/frontend/src/components/DepartmentsPage.jsx"
click node_department_detail_ui "https://github.com/dharunika-07-n/g_track/blob/main/frontend/src/components/DepartmentDetail.jsx"
click node_classrooms_ui "https://github.com/dharunika-07-n/g_track/blob/main/frontend/src/components/ClassroomList.jsx"
click node_classroom_detail_ui "https://github.com/dharunika-07-n/g_track/blob/main/frontend/src/components/ClassroomDetail.jsx"
click node_students_ui "https://github.com/dharunika-07-n/g_track/blob/main/frontend/src/components/StudentsPage.jsx"
click node_assignments_ui "https://github.com/dharunika-07-n/g_track/blob/main/frontend/src/components/AssignmentsPage.jsx"
click node_assignment_form "https://github.com/dharunika-07-n/g_track/blob/main/frontend/src/components/AssignmentForm.jsx"
click node_analytics_ui "https://github.com/dharunika-07-n/g_track/blob/main/frontend/src/components/AnalyticsPage.jsx"
click node_hod_ui "https://github.com/dharunika-07-n/g_track/blob/main/frontend/src/components/dashboards/HodDashboard.jsx"
click node_auth "https://github.com/dharunika-07-n/g_track/blob/main/backend/routers/auth.py"
click node_departments "https://github.com/dharunika-07-n/g_track/blob/main/backend/routers/departments.py"
click node_classrooms "https://github.com/dharunika-07-n/g_track/blob/main/backend/routers/classrooms.py"
click node_students "https://github.com/dharunika-07-n/g_track/blob/main/backend/routers/students.py"
click node_assignments "https://github.com/dharunika-07-n/g_track/blob/main/backend/routers/assignments.py"
click node_submissions "https://github.com/dharunika-07-n/g_track/blob/main/backend/routers/submissions.py"
click node_analytics "https://github.com/dharunika-07-n/g_track/blob/main/backend/routers/analytics.py"
click node_schemas "https://github.com/dharunika-07-n/g_track/blob/main/backend/schemas.py"
click node_app "https://github.com/dharunika-07-n/g_track/blob/main/backend/main.py"
click node_tracker "https://github.com/dharunika-07-n/g_track/blob/main/backend/services/tracker.py"
click node_scheduler "https://github.com/dharunika-07-n/g_track/blob/main/backend/services/scheduler_service.py"
click node_reminders "https://github.com/dharunika-07-n/g_track/blob/main/backend/services/reminders.py"
click node_notifications "https://github.com/dharunika-07-n/g_track/blob/main/backend/services/notifications.py"
click node_database "https://github.com/dharunika-07-n/g_track/blob/main/backend/database.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_dashboard,node_departments_ui,node_department_detail_ui,node_classrooms_ui,node_classroom_detail_ui,node_students_ui,node_assignments_ui,node_assignment_form,node_analytics_ui,node_hod_ui toneBlue
class node_auth,node_departments,node_classrooms,node_students,node_assignments,node_submissions,node_analytics,node_schemas,node_app toneAmber
class node_tracker,node_scheduler,node_reminders,node_notifications toneMint
class node_database,node_github,node_sql_store,node_email_service toneRose
class node_staff toneIndigo
```

## Components

### Dashboard interface

- [Authenticated dashboard](https://github.com/dharunika-07-n/g_track/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Department management](https://github.com/dharunika-07-n/g_track/blob/main/frontend/src/components/DepartmentsPage.jsx): `frontend/src/components/DepartmentsPage.jsx`
- [Department detail](https://github.com/dharunika-07-n/g_track/blob/main/frontend/src/components/DepartmentDetail.jsx): `frontend/src/components/DepartmentDetail.jsx`
- [Classroom management](https://github.com/dharunika-07-n/g_track/blob/main/frontend/src/components/ClassroomList.jsx): `frontend/src/components/ClassroomList.jsx`
- [Classroom detail](https://github.com/dharunika-07-n/g_track/blob/main/frontend/src/components/ClassroomDetail.jsx): `frontend/src/components/ClassroomDetail.jsx`
- [Student management](https://github.com/dharunika-07-n/g_track/blob/main/frontend/src/components/StudentsPage.jsx): `frontend/src/components/StudentsPage.jsx`
- [Assignment management](https://github.com/dharunika-07-n/g_track/blob/main/frontend/src/components/AssignmentsPage.jsx): `frontend/src/components/AssignmentsPage.jsx`
- [Assignment form](https://github.com/dharunika-07-n/g_track/blob/main/frontend/src/components/AssignmentForm.jsx): `frontend/src/components/AssignmentForm.jsx`
- [Analytics and reports](https://github.com/dharunika-07-n/g_track/blob/main/frontend/src/components/AnalyticsPage.jsx): `frontend/src/components/AnalyticsPage.jsx`
- [HOD dashboard](https://github.com/dharunika-07-n/g_track/blob/main/frontend/src/components/dashboards/HodDashboard.jsx): `frontend/src/components/dashboards/HodDashboard.jsx`

### Backend workflows

- [Authentication](https://github.com/dharunika-07-n/g_track/blob/main/backend/routers/auth.py): `backend/routers/auth.py`
- [Department workflows](https://github.com/dharunika-07-n/g_track/blob/main/backend/routers/departments.py): `backend/routers/departments.py`
- [Classroom workflows](https://github.com/dharunika-07-n/g_track/blob/main/backend/routers/classrooms.py): `backend/routers/classrooms.py`
- [Student workflows](https://github.com/dharunika-07-n/g_track/blob/main/backend/routers/students.py): `backend/routers/students.py`
- [Assignment workflows](https://github.com/dharunika-07-n/g_track/blob/main/backend/routers/assignments.py): `backend/routers/assignments.py`
- [Submission grading](https://github.com/dharunika-07-n/g_track/blob/main/backend/routers/submissions.py): `backend/routers/submissions.py`
- [Analytics and exports](https://github.com/dharunika-07-n/g_track/blob/main/backend/routers/analytics.py): `backend/routers/analytics.py`
- [API data schemas](https://github.com/dharunika-07-n/g_track/blob/main/backend/schemas.py): `backend/schemas.py`
- [API application](https://github.com/dharunika-07-n/g_track/blob/main/backend/main.py): `backend/main.py`

### Activity and scheduling

- [GitHub activity tracker](https://github.com/dharunika-07-n/g_track/blob/main/backend/services/tracker.py): `backend/services/tracker.py`
- [Scheduled sync](https://github.com/dharunika-07-n/g_track/blob/main/backend/services/scheduler_service.py): `backend/services/scheduler_service.py`
- [Deadline reminders](https://github.com/dharunika-07-n/g_track/blob/main/backend/services/reminders.py): `backend/services/reminders.py`
- [Email notifications](https://github.com/dharunika-07-n/g_track/blob/main/backend/services/notifications.py): `backend/services/notifications.py`

### Data and integrations

- [SQLAlchemy data layer](https://github.com/dharunika-07-n/g_track/blob/main/backend/database.py): `backend/database.py`
- **GitHub API**
- **Application database**
- **SMTP service**

### Other components

- **HOD and faculty**

## Connections

- HOD and faculty → Authenticated dashboard: uses (evidence: `README.md`)
- Authenticated dashboard → Department management: routes to (evidence: `frontend/src/App.jsx`)
- Authenticated dashboard → Department detail: routes to (evidence: `frontend/src/App.jsx`)
- Authenticated dashboard → Classroom management: routes to (evidence: `frontend/src/App.jsx`)
- Authenticated dashboard → Classroom detail: routes to (evidence: `frontend/src/App.jsx`)
- Authenticated dashboard → Student management: routes to (evidence: `frontend/src/App.jsx`)
- Authenticated dashboard → Assignment management: routes to (evidence: `frontend/src/App.jsx`)
- Authenticated dashboard → Analytics and reports: routes to (evidence: `frontend/src/App.jsx`)
- Authenticated dashboard → HOD dashboard: routes to (evidence: `frontend/src/App.jsx`)
- Authenticated dashboard → Authentication: checks identity (evidence: `frontend/src/App.jsx`)
- HOD and faculty → Department management: manages (evidence: `README.md`)
- HOD and faculty → Classroom management: organizes (evidence: `README.md`)
- HOD and faculty → Student management: manages (evidence: `README.md`)
- HOD and faculty → Assignment management: tracks work (evidence: `README.md`)
- HOD and faculty → Analytics and reports: reviews reports (evidence: `README.md`)
- Classroom detail → Assignment form: uses (evidence: `frontend/src/components/ClassroomDetail.jsx`)
- Authenticated dashboard → API application: calls API (evidence: `README.md`)
- API application → Authentication: routes to (evidence: `backend/main.py`)
- API application → Department workflows: routes to (evidence: `backend/main.py`)
- API application → Classroom workflows: routes to (evidence: `backend/main.py`)
- API application → Student workflows: routes to (evidence: `backend/main.py`)
- API application → Assignment workflows: routes to (evidence: `backend/main.py`)
- API application → Submission grading: routes to (evidence: `backend/main.py`)
- API application → Analytics and exports: routes to (evidence: `backend/main.py`)
- Student workflows → GitHub activity tracker: fetches activity (evidence: `backend/routers/students.py`)
- GitHub activity tracker → GitHub API: queries (evidence: `backend/services/tracker.py`)
- API application → Scheduled sync: starts scheduler (evidence: `backend/main.py`)
- Scheduled sync → SQLAlchemy data layer: reads assignments (evidence: `backend/services/scheduler_service.py`)
- Scheduled sync → Email notifications: sends reminders (evidence: `backend/services/scheduler_service.py`)
- Email notifications → SMTP service: sends email (evidence: `backend/services/notifications.py`)
- Authentication → SQLAlchemy data layer: reads and writes (evidence: `backend/routers/auth.py`)
- Department workflows → SQLAlchemy data layer: reads and writes (evidence: `backend/routers/departments.py`)
- Classroom workflows → SQLAlchemy data layer: reads and writes (evidence: `backend/routers/classrooms.py`)
- Student workflows → SQLAlchemy data layer: reads and writes (evidence: `backend/routers/students.py`)
- Assignment workflows → SQLAlchemy data layer: reads and writes (evidence: `backend/routers/assignments.py`)
- Submission grading → SQLAlchemy data layer: reads and writes (evidence: `backend/routers/submissions.py`)
- Analytics and exports → SQLAlchemy data layer: reads activity (evidence: `backend/routers/analytics.py`)
- SQLAlchemy data layer → Application database: persists records (evidence: `backend/database.py`)
- Department workflows → API data schemas: uses schemas (evidence: `backend/routers/departments.py`)
- Classroom workflows → API data schemas: uses schemas (evidence: `backend/routers/classrooms.py`)
- Student workflows → API data schemas: uses schemas (evidence: `backend/routers/students.py`)
- Assignment workflows → API data schemas: uses schemas (evidence: `backend/routers/assignments.py`)
- Submission grading → API data schemas: uses schemas (evidence: `backend/routers/submissions.py`)
