# savisaluwadana/student-management-system-saas architecture

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

- Interactive diagram: https://gitdiagram.com/savisaluwadana/student-management-system-saas
- Repository: https://github.com/savisaluwadana/student-management-system-saas

## Overview

Academix is a multi-module education-operations SaaS. A workspace user manages student and teaching records, takes attendance, records assessments and fees, communicates with families, and reviews operational reports. The map preserves those distinct product areas plus authentication, workspace/plan context, persistence, and notification integrations. Several domain implementations are indexed but unsampled, so their connections are shown only where the README or an excerpt supports them; dashed links indicate unverified integration points.

Main entry points: [`lib/mongodb/client.ts`](https://github.com/savisaluwadana/student-management-system-saas/blob/main/lib/mongodb/client.ts) (MongoDB connection), [`app/api/auth/signup/route.ts`](https://github.com/savisaluwadana/student-management-system-saas/blob/main/app/api/auth/signup/route.ts) (Authentication routes), [`lib/actions/sessions.ts`](https://github.com/savisaluwadana/student-management-system-saas/blob/main/lib/actions/sessions.ts) (Class sessions), [`lib/actions/communications.ts`](https://github.com/savisaluwadana/student-management-system-saas/blob/main/lib/actions/communications.ts) (Family communications)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_identity["Identity and workspace"]
  node_signup["Account signup<br/>[page.tsx]"]
  node_auth_api["Authentication routes<br/>[route.ts]"]
  node_auth_core["JWT authentication<br/>[auth.ts]"]
  node_workspace["Workspace context<br/>[workspace.ts]"]
end

subgraph group_operations["Academic operations"]
  node_student_ops["Student records<br/>[students.ts]"]
  node_class_ops["Classes and teachers<br/>[classes.ts]"]
  node_session_ops["Class sessions<br/>[sessions.ts]"]
  node_attendance_ui["Attendance workflow"]
  node_attendance_ops["Attendance operations<br/>[attendance.ts]"]
  node_assessment_ops["Assessments and grades<br/>[assessments.ts]"]
  node_institute_ops["Institute management<br/>[institutes.ts]"]
end

subgraph group_finance_comms["Finance and communications"]
  node_billing_ops["Fees and payments<br/>[payments.ts]"]
  node_communications["Family communications<br/>[communications.ts]"]
  node_notifications["Notification delivery<br/>[whatsapp.ts]"]
end

subgraph group_insights["Reporting and dashboard"]
  node_dashboard["Operations dashboard"]
  node_reports_ui["Reports interface"]
  node_reports_ops["Report operations<br/>[reports.ts]"]
  node_attendance_report_api["Attendance report endpoint<br/>[route.ts]"]
end

subgraph group_platform["Persistence and integrations"]
  node_mongo["MongoDB connection<br/>[client.ts]"]
  node_domain_models[("Domain data models")]
  node_saas_plans["Plans and usage<br/>[plans.ts]"]
  node_email_service["Email integration<br/>[email.ts]"]
  node_sms_service["SMS integration<br/>[sms.ts]"]
  node_ui_primitives["Shared UI primitives"]
end

node_user(("Workspace user"))

node_user -->|"creates account"| node_signup
node_signup -.->|"submits signup"| node_auth_api
node_auth_api -->|"connects database"| node_mongo
node_auth_api -->|"creates account data"| node_domain_models
node_auth_api -->|"signs token"| node_auth_core
node_user -->|"manages students"| node_student_ops
node_user -->|"manages classes"| node_class_ops
node_user -.->|"manages schedules"| node_session_ops
node_user -->|"records attendance"| node_attendance_ui
node_attendance_ui -.->|"uses operations"| node_attendance_ops
node_user -->|"records grades"| node_assessment_ops
node_user -->|"manages branches"| node_institute_ops
node_user -->|"tracks fees"| node_billing_ops
node_user -->|"sends messages"| node_communications
node_communications -.->|"uses delivery"| node_notifications
node_communications -.->|"optional delivery"| node_email_service
node_communications -.->|"optional delivery"| node_sms_service
node_user -->|"reviews operations"| node_dashboard
node_user -->|"reviews reports"| node_reports_ui
node_reports_ui -->|"loads report data"| node_reports_ops
node_attendance_report_api -->|"connects database"| node_mongo
node_attendance_report_api -->|"checks workspace"| node_workspace
node_attendance_report_api -->|"reads attendance data"| node_domain_models
node_session_ops -->|"connects database"| node_mongo
node_session_ops -->|"checks workspace"| node_workspace
node_session_ops -->|"reads and writes sessions"| node_domain_models
node_class_ops -.->|"uses persistence"| node_mongo
node_attendance_ops -.->|"uses persistence"| node_mongo
node_assessment_ops -.->|"uses persistence"| node_mongo
node_billing_ops -.->|"uses persistence"| node_mongo
node_student_ops -.->|"uses persistence"| node_mongo
node_user -.->|"uses application UI"| node_ui_primitives
node_auth_api -->|"checks plan limits"| node_saas_plans

click node_signup "https://github.com/savisaluwadana/student-management-system-saas/blob/main/app/(auth)/signup/page.tsx"
click node_auth_api "https://github.com/savisaluwadana/student-management-system-saas/blob/main/app/api/auth/signup/route.ts"
click node_auth_core "https://github.com/savisaluwadana/student-management-system-saas/blob/main/lib/auth/auth.ts"
click node_workspace "https://github.com/savisaluwadana/student-management-system-saas/blob/main/lib/saas/workspace.ts"
click node_student_ops "https://github.com/savisaluwadana/student-management-system-saas/blob/main/lib/actions/students.ts"
click node_class_ops "https://github.com/savisaluwadana/student-management-system-saas/blob/main/lib/actions/classes.ts"
click node_session_ops "https://github.com/savisaluwadana/student-management-system-saas/blob/main/lib/actions/sessions.ts"
click node_attendance_ui "https://github.com/savisaluwadana/student-management-system-saas/blob/main/components/attendance/AttendanceSheet.tsx"
click node_attendance_ops "https://github.com/savisaluwadana/student-management-system-saas/blob/main/lib/actions/attendance.ts"
click node_assessment_ops "https://github.com/savisaluwadana/student-management-system-saas/blob/main/lib/actions/assessments.ts"
click node_institute_ops "https://github.com/savisaluwadana/student-management-system-saas/blob/main/lib/actions/institutes.ts"
click node_billing_ops "https://github.com/savisaluwadana/student-management-system-saas/blob/main/lib/actions/payments.ts"
click node_communications "https://github.com/savisaluwadana/student-management-system-saas/blob/main/lib/actions/communications.ts"
click node_notifications "https://github.com/savisaluwadana/student-management-system-saas/blob/main/lib/services/notifications/whatsapp.ts"
click node_dashboard "https://github.com/savisaluwadana/student-management-system-saas/blob/main/components/dashboard/DashboardContent.tsx"
click node_reports_ui "https://github.com/savisaluwadana/student-management-system-saas/blob/main/components/reports/ReportsPageClient.tsx"
click node_reports_ops "https://github.com/savisaluwadana/student-management-system-saas/blob/main/lib/actions/reports.ts"
click node_attendance_report_api "https://github.com/savisaluwadana/student-management-system-saas/blob/main/app/api/reports/attendance/route.ts"
click node_mongo "https://github.com/savisaluwadana/student-management-system-saas/blob/main/lib/mongodb/client.ts"
click node_domain_models "https://github.com/savisaluwadana/student-management-system-saas/tree/main/lib/mongodb/models"
click node_saas_plans "https://github.com/savisaluwadana/student-management-system-saas/blob/main/lib/saas/plans.ts"
click node_email_service "https://github.com/savisaluwadana/student-management-system-saas/blob/main/lib/services/notifications/email.ts"
click node_sms_service "https://github.com/savisaluwadana/student-management-system-saas/blob/main/lib/services/notifications/sms.ts"
click node_ui_primitives "https://github.com/savisaluwadana/student-management-system-saas/tree/main/components/ui"

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_signup,node_auth_api,node_auth_core,node_workspace,node_user toneBlue
class node_student_ops,node_class_ops,node_session_ops,node_attendance_ui,node_attendance_ops,node_assessment_ops,node_institute_ops toneAmber
class node_billing_ops,node_communications,node_notifications toneMint
class node_dashboard,node_reports_ui,node_reports_ops,node_attendance_report_api toneRose
class node_mongo,node_domain_models,node_saas_plans,node_email_service,node_sms_service,node_ui_primitives toneIndigo
```

## Components

### Identity and workspace

- [Account signup](https://github.com/savisaluwadana/student-management-system-saas/blob/main/app/(auth)/signup/page.tsx): `app/(auth)/signup/page.tsx`
- [Authentication routes](https://github.com/savisaluwadana/student-management-system-saas/blob/main/app/api/auth/signup/route.ts): `app/api/auth/signup/route.ts`
- [JWT authentication](https://github.com/savisaluwadana/student-management-system-saas/blob/main/lib/auth/auth.ts): `lib/auth/auth.ts`
- [Workspace context](https://github.com/savisaluwadana/student-management-system-saas/blob/main/lib/saas/workspace.ts): `lib/saas/workspace.ts`

### Academic operations

- [Student records](https://github.com/savisaluwadana/student-management-system-saas/blob/main/lib/actions/students.ts): `lib/actions/students.ts`
- [Classes and teachers](https://github.com/savisaluwadana/student-management-system-saas/blob/main/lib/actions/classes.ts): `lib/actions/classes.ts`
- [Class sessions](https://github.com/savisaluwadana/student-management-system-saas/blob/main/lib/actions/sessions.ts): `lib/actions/sessions.ts`
- [Attendance workflow](https://github.com/savisaluwadana/student-management-system-saas/blob/main/components/attendance/AttendanceSheet.tsx): `components/attendance/AttendanceSheet.tsx`
- [Attendance operations](https://github.com/savisaluwadana/student-management-system-saas/blob/main/lib/actions/attendance.ts): `lib/actions/attendance.ts`
- [Assessments and grades](https://github.com/savisaluwadana/student-management-system-saas/blob/main/lib/actions/assessments.ts): `lib/actions/assessments.ts`
- [Institute management](https://github.com/savisaluwadana/student-management-system-saas/blob/main/lib/actions/institutes.ts): `lib/actions/institutes.ts`

### Finance and communications

- [Fees and payments](https://github.com/savisaluwadana/student-management-system-saas/blob/main/lib/actions/payments.ts): `lib/actions/payments.ts`
- [Family communications](https://github.com/savisaluwadana/student-management-system-saas/blob/main/lib/actions/communications.ts): `lib/actions/communications.ts`
- [Notification delivery](https://github.com/savisaluwadana/student-management-system-saas/blob/main/lib/services/notifications/whatsapp.ts): `lib/services/notifications/whatsapp.ts`

### Reporting and dashboard

- [Operations dashboard](https://github.com/savisaluwadana/student-management-system-saas/blob/main/components/dashboard/DashboardContent.tsx): `components/dashboard/DashboardContent.tsx`
- [Reports interface](https://github.com/savisaluwadana/student-management-system-saas/blob/main/components/reports/ReportsPageClient.tsx): `components/reports/ReportsPageClient.tsx`
- [Report operations](https://github.com/savisaluwadana/student-management-system-saas/blob/main/lib/actions/reports.ts): `lib/actions/reports.ts`
- [Attendance report endpoint](https://github.com/savisaluwadana/student-management-system-saas/blob/main/app/api/reports/attendance/route.ts): `app/api/reports/attendance/route.ts`

### Persistence and integrations

- [MongoDB connection](https://github.com/savisaluwadana/student-management-system-saas/blob/main/lib/mongodb/client.ts): `lib/mongodb/client.ts`
- [Domain data models](https://github.com/savisaluwadana/student-management-system-saas/tree/main/lib/mongodb/models): `lib/mongodb/models`
- [Plans and usage](https://github.com/savisaluwadana/student-management-system-saas/blob/main/lib/saas/plans.ts): `lib/saas/plans.ts`
- [Email integration](https://github.com/savisaluwadana/student-management-system-saas/blob/main/lib/services/notifications/email.ts): `lib/services/notifications/email.ts`
- [SMS integration](https://github.com/savisaluwadana/student-management-system-saas/blob/main/lib/services/notifications/sms.ts): `lib/services/notifications/sms.ts`
- [Shared UI primitives](https://github.com/savisaluwadana/student-management-system-saas/tree/main/components/ui): `components/ui`

### Other components

- **Workspace user**

## Connections

- Workspace user → Account signup: creates account
- Account signup → Authentication routes: submits signup
- Authentication routes → MongoDB connection: connects database (evidence: `app/api/auth/signup/route.ts`)
- Authentication routes → Domain data models: creates account data (evidence: `app/api/auth/signup/route.ts`)
- Authentication routes → JWT authentication: signs token (evidence: `app/api/auth/signup/route.ts`)
- Workspace user → Student records: manages students (evidence: `README.md`)
- Workspace user → Classes and teachers: manages classes (evidence: `README.md`)
- Workspace user → Class sessions: manages schedules
- Workspace user → Attendance workflow: records attendance (evidence: `README.md`)
- Attendance workflow → Attendance operations: uses operations
- Workspace user → Assessments and grades: records grades (evidence: `README.md`)
- Workspace user → Institute management: manages branches (evidence: `README.md`)
- Workspace user → Fees and payments: tracks fees (evidence: `README.md`)
- Workspace user → Family communications: sends messages (evidence: `README.md`)
- Family communications → Notification delivery: uses delivery
- Family communications → Email integration: optional delivery
- Family communications → SMS integration: optional delivery
- Workspace user → Operations dashboard: reviews operations (evidence: `README.md`)
- Workspace user → Reports interface: reviews reports (evidence: `README.md`)
- Reports interface → Report operations: loads report data (evidence: `components/reports/ReportsPageClient.tsx`)
- Attendance report endpoint → MongoDB connection: connects database (evidence: `app/api/reports/attendance/route.ts`)
- Attendance report endpoint → Workspace context: checks workspace (evidence: `app/api/reports/attendance/route.ts`)
- Attendance report endpoint → Domain data models: reads attendance data (evidence: `app/api/reports/attendance/route.ts`)
- Class sessions → MongoDB connection: connects database (evidence: `lib/actions/sessions.ts`)
- Class sessions → Workspace context: checks workspace (evidence: `lib/actions/sessions.ts`)
- Class sessions → Domain data models: reads and writes sessions (evidence: `lib/actions/sessions.ts`)
- Classes and teachers → MongoDB connection: uses persistence
- Attendance operations → MongoDB connection: uses persistence
- Assessments and grades → MongoDB connection: uses persistence
- Fees and payments → MongoDB connection: uses persistence
- Student records → MongoDB connection: uses persistence
- Workspace user → Shared UI primitives: uses application UI
- Authentication routes → Plans and usage: checks plan limits
