# kankan222/lms architecture

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

- Interactive diagram: https://gitdiagram.com/kankan222/lms
- Repository: https://github.com/kankan222/lms

## Overview

This repository implements a school and institution management platform: a backend API and scheduled jobs support administrative software, a mobile app, and public institution websites. Users authenticate or browse public pages, then access school operations such as attendance, exams, fees, messaging, and reports. The graph preserves those major product areas while detailing the evidenced authentication, announcement, and job flows. Many domain implementations and client API calls were not excerpted, so their internal connections are omitted rather than inferred.

Main entry points: [`backend/app.js`](https://github.com/kankan222/lms/blob/main/backend/app.js) (API gateway), [`backend/modules/auth/auth.service.js`](https://github.com/kankan222/lms/blob/main/backend/modules/auth/auth.service.js) (Authentication), [`backend/core/db/query.js`](https://github.com/kankan222/lms/blob/main/backend/core/db/query.js) (SQL database), [`frontend/mobile/App.tsx`](https://github.com/kankan222/lms/blob/main/frontend/mobile/App.tsx) (Mobile app)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_clients["User applications"]
  node_mobile["Mobile app<br/>[App.tsx]"]
  node_mobile_services["Mobile services<br/>[api.ts]"]
  node_admin_web["Admin software<br/>[App.jsx]"]
  node_admin_routes["Admin routing<br/>[AppRoutes.jsx]"]
  node_public_site["Institution website<br/>[AppRoutes.jsx]"]
  node_seo["SEO metadata<br/>[SeoManager.jsx]"]
end

subgraph group_api["API and access"]
  node_gateway["API gateway<br/>[app.js]"]
  node_auth["Authentication<br/>[auth.service.js]"]
  node_rbac["Permission checks<br/>[rbac.middleware.js]"]
end

subgraph group_school["School operations"]
  node_academic["Academic records"]
  node_students["Student records<br/>[student.service.js]"]
  node_teachers["Teacher records<br/>[teacher.service.js]"]
  node_attendance["Attendance"]
  node_exams_marks["Exams and marks<br/>[marks.service.js]"]
  node_fees["Fees and transport<br/>[fee.service.js]"]
  node_routines["Class routines"]
  node_reports["Reports and dashboards"]
end

subgraph group_communications["Communication"]
  node_announcements["Announcements"]
  node_messaging["Messaging and media"]
  node_notifications["Notifications"]
end

subgraph group_platform["Data and jobs"]
  node_database[("SQL database<br/>[query.js]")]
  node_jobs["Scheduled jobs<br/>[cronWorker.js]"]
  node_object_storage["Message object storage"]
end

node_staff(("School staff"))
node_families(("Families"))

node_staff -.->|"uses"| node_mobile
node_families -.->|"uses"| node_mobile
node_staff -.->|"uses"| node_admin_web
node_mobile -.->|"uses API"| node_mobile_services
node_admin_web -->|"renders"| node_admin_routes
node_admin_routes -.->|"routes login"| node_auth
node_public_site -->|"renders"| node_seo
node_gateway -->|"mounts routes"| node_auth
node_gateway -->|"mounts routes"| node_academic
node_gateway -->|"mounts routes"| node_students
node_gateway -->|"mounts routes"| node_attendance
node_gateway -->|"mounts routes"| node_exams_marks
node_gateway -->|"mounts routes"| node_fees
node_gateway -->|"mounts routes"| node_routines
node_gateway -->|"mounts routes"| node_reports
node_gateway -->|"mounts routes"| node_announcements
node_gateway -->|"mounts routes"| node_messaging
node_gateway -->|"mounts routes"| node_notifications
node_gateway -->|"attaches permissions"| node_rbac
node_auth -.->|"queries users"| node_database
node_auth -->|"loads roles"| node_rbac
node_rbac -.->|"loads permissions"| node_database
node_announcements -.->|"persists data"| node_database
node_jobs -->|"starts publishing"| node_announcements
node_jobs -->|"checks connection"| node_database
node_messaging -.->|"stores media"| node_object_storage

click node_mobile "https://github.com/kankan222/lms/blob/main/frontend/mobile/App.tsx"
click node_mobile_services "https://github.com/kankan222/lms/blob/main/frontend/mobile/src/services/api.ts"
click node_admin_web "https://github.com/kankan222/lms/blob/main/frontend/software/src/App.jsx"
click node_admin_routes "https://github.com/kankan222/lms/blob/main/frontend/software/src/routes/AppRoutes.jsx"
click node_public_site "https://github.com/kankan222/lms/blob/main/frontend/website/src/app/AppRoutes.jsx"
click node_seo "https://github.com/kankan222/lms/blob/main/frontend/website/src/app/SeoManager.jsx"
click node_gateway "https://github.com/kankan222/lms/blob/main/backend/app.js"
click node_auth "https://github.com/kankan222/lms/blob/main/backend/modules/auth/auth.service.js"
click node_rbac "https://github.com/kankan222/lms/blob/main/backend/core/rbac/rbac.middleware.js"
click node_academic "https://github.com/kankan222/lms/tree/main/backend/modules/academic"
click node_students "https://github.com/kankan222/lms/blob/main/backend/modules/students/student.service.js"
click node_teachers "https://github.com/kankan222/lms/blob/main/backend/modules/teachers/teacher.service.js"
click node_attendance "https://github.com/kankan222/lms/tree/main/backend/modules/attendance"
click node_exams_marks "https://github.com/kankan222/lms/blob/main/backend/modules/marks/marks.service.js"
click node_fees "https://github.com/kankan222/lms/blob/main/backend/modules/fees/fee.service.js"
click node_routines "https://github.com/kankan222/lms/blob/main/backend/modules/routines/routines.service.js"
click node_reports "https://github.com/kankan222/lms/tree/main/backend/modules/reports"
click node_announcements "https://github.com/kankan222/lms/blob/main/backend/modules/announcements/announcements.service.js"
click node_messaging "https://github.com/kankan222/lms/tree/main/backend/modules/messaging"
click node_notifications "https://github.com/kankan222/lms/tree/main/backend/modules/notifications"
click node_database "https://github.com/kankan222/lms/blob/main/backend/core/db/query.js"
click node_jobs "https://github.com/kankan222/lms/blob/main/backend/jobs/cronWorker.js"
click node_object_storage "https://github.com/kankan222/lms/blob/main/backend/modules/messaging/messaging.storage.js"

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_mobile,node_mobile_services,node_admin_web,node_admin_routes,node_public_site,node_seo toneBlue
class node_gateway,node_auth,node_rbac toneAmber
class node_academic,node_students,node_teachers,node_attendance,node_exams_marks,node_fees,node_routines,node_reports toneMint
class node_announcements,node_messaging,node_notifications toneRose
class node_database,node_jobs,node_object_storage,node_staff,node_families toneIndigo
```

## Components

### User applications

- [Mobile app](https://github.com/kankan222/lms/blob/main/frontend/mobile/App.tsx): `frontend/mobile/App.tsx`
- [Mobile services](https://github.com/kankan222/lms/blob/main/frontend/mobile/src/services/api.ts): `frontend/mobile/src/services/api.ts`
- [Admin software](https://github.com/kankan222/lms/blob/main/frontend/software/src/App.jsx): `frontend/software/src/App.jsx`
- [Admin routing](https://github.com/kankan222/lms/blob/main/frontend/software/src/routes/AppRoutes.jsx): `frontend/software/src/routes/AppRoutes.jsx`
- [Institution website](https://github.com/kankan222/lms/blob/main/frontend/website/src/app/AppRoutes.jsx): `frontend/website/src/app/AppRoutes.jsx`
- [SEO metadata](https://github.com/kankan222/lms/blob/main/frontend/website/src/app/SeoManager.jsx): `frontend/website/src/app/SeoManager.jsx`

### API and access

- [API gateway](https://github.com/kankan222/lms/blob/main/backend/app.js): `backend/app.js`
- [Authentication](https://github.com/kankan222/lms/blob/main/backend/modules/auth/auth.service.js): `backend/modules/auth/auth.service.js`
- [Permission checks](https://github.com/kankan222/lms/blob/main/backend/core/rbac/rbac.middleware.js): `backend/core/rbac/rbac.middleware.js`

### School operations

- [Academic records](https://github.com/kankan222/lms/tree/main/backend/modules/academic): `backend/modules/academic`
- [Student records](https://github.com/kankan222/lms/blob/main/backend/modules/students/student.service.js): `backend/modules/students/student.service.js`
- [Teacher records](https://github.com/kankan222/lms/blob/main/backend/modules/teachers/teacher.service.js): `backend/modules/teachers/teacher.service.js`
- [Attendance](https://github.com/kankan222/lms/tree/main/backend/modules/attendance): `backend/modules/attendance`
- [Exams and marks](https://github.com/kankan222/lms/blob/main/backend/modules/marks/marks.service.js): `backend/modules/marks/marks.service.js`
- [Fees and transport](https://github.com/kankan222/lms/blob/main/backend/modules/fees/fee.service.js): `backend/modules/fees/fee.service.js`
- [Class routines](https://github.com/kankan222/lms/blob/main/backend/modules/routines/routines.service.js): `backend/modules/routines/routines.service.js`
- [Reports and dashboards](https://github.com/kankan222/lms/tree/main/backend/modules/reports): `backend/modules/reports`

### Communication

- [Announcements](https://github.com/kankan222/lms/blob/main/backend/modules/announcements/announcements.service.js): `backend/modules/announcements/announcements.service.js`
- [Messaging and media](https://github.com/kankan222/lms/tree/main/backend/modules/messaging): `backend/modules/messaging`
- [Notifications](https://github.com/kankan222/lms/tree/main/backend/modules/notifications): `backend/modules/notifications`

### Data and jobs

- [SQL database](https://github.com/kankan222/lms/blob/main/backend/core/db/query.js): `backend/core/db/query.js`
- [Scheduled jobs](https://github.com/kankan222/lms/blob/main/backend/jobs/cronWorker.js): `backend/jobs/cronWorker.js`
- [Message object storage](https://github.com/kankan222/lms/blob/main/backend/modules/messaging/messaging.storage.js): `backend/modules/messaging/messaging.storage.js`

### Other components

- **School staff**
- **Families**

## Connections

- School staff → Mobile app: uses
- Families → Mobile app: uses
- School staff → Admin software: uses
- Mobile app → Mobile services: uses API
- Admin software → Admin routing: renders (evidence: `frontend/software/src/App.jsx`)
- Admin routing → Authentication: routes login
- Institution website → SEO metadata: renders (evidence: `frontend/website/src/app/AppRoutes.jsx`)
- API gateway → Authentication: mounts routes (evidence: `backend/app.js`)
- API gateway → Academic records: mounts routes (evidence: `backend/app.js`)
- API gateway → Student records: mounts routes (evidence: `backend/app.js`)
- API gateway → Attendance: mounts routes (evidence: `backend/app.js`)
- API gateway → Exams and marks: mounts routes (evidence: `backend/app.js`)
- API gateway → Fees and transport: mounts routes (evidence: `backend/app.js`)
- API gateway → Class routines: mounts routes (evidence: `backend/app.js`)
- API gateway → Reports and dashboards: mounts routes (evidence: `backend/app.js`)
- API gateway → Announcements: mounts routes (evidence: `backend/app.js`)
- API gateway → Messaging and media: mounts routes (evidence: `backend/app.js`)
- API gateway → Notifications: mounts routes (evidence: `backend/app.js`)
- API gateway → Permission checks: attaches permissions (evidence: `backend/app.js`)
- Authentication → SQL database: queries users
- Authentication → Permission checks: loads roles (evidence: `backend/modules/auth/auth.service.js`)
- Permission checks → SQL database: loads permissions
- Announcements → SQL database: persists data
- Scheduled jobs → Announcements: starts publishing (evidence: `backend/jobs/cronWorker.js`)
- Scheduled jobs → SQL database: checks connection (evidence: `backend/jobs/cronWorker.js`)
- Messaging and media → Message object storage: stores media
