# educaretech2026/lms architecture

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

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

## Overview

Educare is a school and learning-management suite spanning administration, teaching, student services, assessments, communications, and reporting. A representative workflow is a user submitting an exam attempt: the API controller dispatches it to exam logic, which uses persistence, cache, and tenant utilities. The tree also shows web and mobile clients and many additional domain areas. Their exact wiring is not established by the sampled excerpts, so those branches are represented without guessed client-to-API or sibling-service links.

Main entry points: [`apps/api/src/storage/storage.service.ts`](https://github.com/educaretech2026/lms/blob/main/apps/api/src/storage/storage.service.ts) (Managed file storage), [`apps/api/src/exams/exams.service.ts`](https://github.com/educaretech2026/lms/blob/main/apps/api/src/exams/exams.service.ts) (Exam services), [`apps/api/src/forms/forms.service.ts`](https://github.com/educaretech2026/lms/blob/main/apps/api/src/forms/forms.service.ts) (Forms and responses), [`apps/api/src/database/prisma.service.ts`](https://github.com/educaretech2026/lms/blob/main/apps/api/src/database/prisma.service.ts) (Prisma database access)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_clients["User applications"]
  node_web["Web portal"]
  node_mobile["Mobile app"]
  node_mobile_auth["Mobile auth state<br/>[useAuth.tsx]"]
  node_mobile_storage[("Secure auth storage<br/>[storage.ts]")]
end

subgraph group_access["Identity and access"]
  node_jwt_guard["JWT guard<br/>[jwt-auth.guard.ts]"]
  node_roles_guard["Role checks<br/>[roles.guard.ts]"]
  node_role_metadata["Role metadata<br/>[roles.decorator.ts]"]
  node_public_metadata["Public endpoint metadata"]
end

subgraph group_learning["Learning and teaching"]
  node_exams_api["Exam endpoints"]
  node_exams["Exam services<br/>[exams.service.ts]"]
  node_assignments["Assignments"]
  node_study["Study materials"]
  node_syllabus["Syllabus progress"]
  node_live_classes["Live classes"]
  node_attendance["Attendance"]
  node_doubts["Student doubts"]
end

subgraph group_operations["School operations"]
  node_forms_api["Form endpoints"]
  node_forms["Forms and responses<br/>[forms.service.ts]"]
  node_setup_api["Setup endpoints"]
  node_setup["School configuration<br/>[setup.service.ts]"]
  node_students["Student records"]
  node_staff["Staff records"]
  node_fees["Fees and finance"]
  node_reports_api["Report endpoints"]
  node_reports["Analytics reports<br/>[report.service.ts]"]
  node_communications["Notices and notifications"]
end

subgraph group_platform["Shared platform"]
  node_storage_api["Upload endpoints"]
  node_storage["Managed file storage<br/>[storage.service.ts]"]
  node_database_service["Prisma database access<br/>[prisma.service.ts]"]
  node_database[("Application database")]
  node_redis[("Redis cache<br/>[redis.service.ts]")]
  node_tenant["Tenant utilities<br/>[tenant.util.ts]"]
end

node_users(("School users"))
node_object_store[("Cloudflare R2")]

node_users -.->|"uses"| node_web
node_users -.->|"uses"| node_mobile
node_mobile_auth -->|"reads and writes"| node_mobile_storage
node_mobile_auth -.->|"provides auth state"| node_mobile
node_users -.->|"submits attempt"| node_exams_api
node_exams_api -->|"dispatches"| node_exams
node_exams_api -->|"requests upload URL"| node_storage
node_exams -->|"uses persistence"| node_database_service
node_exams -.->|"uses cache"| node_redis
node_exams -.->|"checks tenant context"| node_tenant
node_forms_api -->|"dispatches"| node_forms
node_forms_api -->|"requests upload URL"| node_storage
node_forms -->|"uses persistence"| node_database_service
node_forms -.->|"uses file storage"| node_storage
node_forms -.->|"notifies"| node_communications
node_setup_api -->|"dispatches"| node_setup
node_reports_api -->|"dispatches"| node_reports
node_storage_api -->|"dispatches"| node_storage
node_storage -->|"signs and manages uploads"| node_object_store
node_storage -->|"checks references"| node_database_service
node_database_service -->|"extends client"| node_database
node_jwt_guard -->|"checks public marker"| node_public_metadata
node_roles_guard -->|"reads role metadata"| node_role_metadata

click node_web "https://github.com/educaretech2026/lms/tree/main/apps/web/src/app"
click node_mobile "https://github.com/educaretech2026/lms/tree/main/apps/mobile/app"
click node_mobile_auth "https://github.com/educaretech2026/lms/blob/main/apps/mobile/hooks/useAuth.tsx"
click node_mobile_storage "https://github.com/educaretech2026/lms/blob/main/apps/mobile/lib/storage.ts"
click node_jwt_guard "https://github.com/educaretech2026/lms/blob/main/apps/api/src/auth/jwt-auth.guard.ts"
click node_roles_guard "https://github.com/educaretech2026/lms/blob/main/apps/api/src/common/guards/roles.guard.ts"
click node_role_metadata "https://github.com/educaretech2026/lms/blob/main/apps/api/src/common/decorators/roles.decorator.ts"
click node_public_metadata "https://github.com/educaretech2026/lms/blob/main/apps/api/src/common/decorators/public.decorator.ts"
click node_exams_api "https://github.com/educaretech2026/lms/blob/main/apps/api/src/exams/exams.controller.ts"
click node_exams "https://github.com/educaretech2026/lms/blob/main/apps/api/src/exams/exams.service.ts"
click node_assignments "https://github.com/educaretech2026/lms/tree/main/apps/api/src/assignments"
click node_study "https://github.com/educaretech2026/lms/blob/main/apps/api/src/study-materials/study-materials.service.ts"
click node_syllabus "https://github.com/educaretech2026/lms/tree/main/apps/api/src/syllabus"
click node_live_classes "https://github.com/educaretech2026/lms/tree/main/apps/api/src/live-class"
click node_attendance "https://github.com/educaretech2026/lms/tree/main/apps/api/src/attendance"
click node_doubts "https://github.com/educaretech2026/lms/tree/main/apps/api/src/doubts"
click node_forms_api "https://github.com/educaretech2026/lms/blob/main/apps/api/src/forms/forms.controller.ts"
click node_forms "https://github.com/educaretech2026/lms/blob/main/apps/api/src/forms/forms.service.ts"
click node_setup_api "https://github.com/educaretech2026/lms/blob/main/apps/api/src/setup/setup.controller.ts"
click node_setup "https://github.com/educaretech2026/lms/blob/main/apps/api/src/setup/setup.service.ts"
click node_students "https://github.com/educaretech2026/lms/tree/main/apps/api/src/students"
click node_staff "https://github.com/educaretech2026/lms/tree/main/apps/api/src/staff"
click node_fees "https://github.com/educaretech2026/lms/tree/main/apps/api/src/fee"
click node_reports_api "https://github.com/educaretech2026/lms/blob/main/apps/api/src/report/report.controller.ts"
click node_reports "https://github.com/educaretech2026/lms/blob/main/apps/api/src/report/report.service.ts"
click node_communications "https://github.com/educaretech2026/lms/tree/main/apps/api/src/notifications"
click node_storage_api "https://github.com/educaretech2026/lms/blob/main/apps/api/src/storage/storage.controller.ts"
click node_storage "https://github.com/educaretech2026/lms/blob/main/apps/api/src/storage/storage.service.ts"
click node_database_service "https://github.com/educaretech2026/lms/blob/main/apps/api/src/database/prisma.service.ts"
click node_database "https://github.com/educaretech2026/lms/tree/main/packages/database"
click node_redis "https://github.com/educaretech2026/lms/blob/main/apps/api/src/redis/redis.service.ts"
click node_tenant "https://github.com/educaretech2026/lms/blob/main/apps/api/src/common/utils/tenant.util.ts"

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_mobile,node_mobile_auth,node_mobile_storage,node_users toneBlue
class node_jwt_guard,node_roles_guard,node_role_metadata,node_public_metadata,node_object_store toneAmber
class node_exams_api,node_exams,node_assignments,node_study,node_syllabus,node_live_classes,node_attendance,node_doubts toneMint
class node_forms_api,node_forms,node_setup_api,node_setup,node_students,node_staff,node_fees,node_reports_api,node_reports,node_communications toneRose
class node_storage_api,node_storage,node_database_service,node_database,node_redis,node_tenant toneIndigo
```

## Components

### User applications

- [Web portal](https://github.com/educaretech2026/lms/tree/main/apps/web/src/app): `apps/web/src/app`
- [Mobile app](https://github.com/educaretech2026/lms/tree/main/apps/mobile/app): `apps/mobile/app`
- [Mobile auth state](https://github.com/educaretech2026/lms/blob/main/apps/mobile/hooks/useAuth.tsx): `apps/mobile/hooks/useAuth.tsx`
- [Secure auth storage](https://github.com/educaretech2026/lms/blob/main/apps/mobile/lib/storage.ts): `apps/mobile/lib/storage.ts`

### Identity and access

- [JWT guard](https://github.com/educaretech2026/lms/blob/main/apps/api/src/auth/jwt-auth.guard.ts): `apps/api/src/auth/jwt-auth.guard.ts`
- [Role checks](https://github.com/educaretech2026/lms/blob/main/apps/api/src/common/guards/roles.guard.ts): `apps/api/src/common/guards/roles.guard.ts`
- [Role metadata](https://github.com/educaretech2026/lms/blob/main/apps/api/src/common/decorators/roles.decorator.ts): `apps/api/src/common/decorators/roles.decorator.ts`
- [Public endpoint metadata](https://github.com/educaretech2026/lms/blob/main/apps/api/src/common/decorators/public.decorator.ts): `apps/api/src/common/decorators/public.decorator.ts`

### Learning and teaching

- [Exam endpoints](https://github.com/educaretech2026/lms/blob/main/apps/api/src/exams/exams.controller.ts): `apps/api/src/exams/exams.controller.ts`
- [Exam services](https://github.com/educaretech2026/lms/blob/main/apps/api/src/exams/exams.service.ts): `apps/api/src/exams/exams.service.ts`
- [Assignments](https://github.com/educaretech2026/lms/tree/main/apps/api/src/assignments): `apps/api/src/assignments`
- [Study materials](https://github.com/educaretech2026/lms/blob/main/apps/api/src/study-materials/study-materials.service.ts): `apps/api/src/study-materials/study-materials.service.ts`
- [Syllabus progress](https://github.com/educaretech2026/lms/tree/main/apps/api/src/syllabus): `apps/api/src/syllabus`
- [Live classes](https://github.com/educaretech2026/lms/tree/main/apps/api/src/live-class): `apps/api/src/live-class`
- [Attendance](https://github.com/educaretech2026/lms/tree/main/apps/api/src/attendance): `apps/api/src/attendance`
- [Student doubts](https://github.com/educaretech2026/lms/tree/main/apps/api/src/doubts): `apps/api/src/doubts`

### School operations

- [Form endpoints](https://github.com/educaretech2026/lms/blob/main/apps/api/src/forms/forms.controller.ts): `apps/api/src/forms/forms.controller.ts`
- [Forms and responses](https://github.com/educaretech2026/lms/blob/main/apps/api/src/forms/forms.service.ts): `apps/api/src/forms/forms.service.ts`
- [Setup endpoints](https://github.com/educaretech2026/lms/blob/main/apps/api/src/setup/setup.controller.ts): `apps/api/src/setup/setup.controller.ts`
- [School configuration](https://github.com/educaretech2026/lms/blob/main/apps/api/src/setup/setup.service.ts): `apps/api/src/setup/setup.service.ts`
- [Student records](https://github.com/educaretech2026/lms/tree/main/apps/api/src/students): `apps/api/src/students`
- [Staff records](https://github.com/educaretech2026/lms/tree/main/apps/api/src/staff): `apps/api/src/staff`
- [Fees and finance](https://github.com/educaretech2026/lms/tree/main/apps/api/src/fee): `apps/api/src/fee`
- [Report endpoints](https://github.com/educaretech2026/lms/blob/main/apps/api/src/report/report.controller.ts): `apps/api/src/report/report.controller.ts`
- [Analytics reports](https://github.com/educaretech2026/lms/blob/main/apps/api/src/report/report.service.ts): `apps/api/src/report/report.service.ts`
- [Notices and notifications](https://github.com/educaretech2026/lms/tree/main/apps/api/src/notifications): `apps/api/src/notifications`

### Shared platform

- [Upload endpoints](https://github.com/educaretech2026/lms/blob/main/apps/api/src/storage/storage.controller.ts): `apps/api/src/storage/storage.controller.ts`
- [Managed file storage](https://github.com/educaretech2026/lms/blob/main/apps/api/src/storage/storage.service.ts): `apps/api/src/storage/storage.service.ts`
- [Prisma database access](https://github.com/educaretech2026/lms/blob/main/apps/api/src/database/prisma.service.ts): `apps/api/src/database/prisma.service.ts`
- [Application database](https://github.com/educaretech2026/lms/tree/main/packages/database): `packages/database`
- [Redis cache](https://github.com/educaretech2026/lms/blob/main/apps/api/src/redis/redis.service.ts): `apps/api/src/redis/redis.service.ts`
- [Tenant utilities](https://github.com/educaretech2026/lms/blob/main/apps/api/src/common/utils/tenant.util.ts): `apps/api/src/common/utils/tenant.util.ts`

### Other components

- **School users**
- **Cloudflare R2**

## Connections

- School users → Web portal: uses
- School users → Mobile app: uses
- Mobile auth state → Secure auth storage: reads and writes (evidence: `apps/mobile/hooks/useAuth.tsx`)
- Mobile auth state → Mobile app: provides auth state
- School users → Exam endpoints: submits attempt
- Exam endpoints → Exam services: dispatches (evidence: `apps/api/src/exams/exams.controller.ts`)
- Exam endpoints → Managed file storage: requests upload URL (evidence: `apps/api/src/exams/exams.controller.ts`)
- Exam services → Prisma database access: uses persistence (evidence: `apps/api/src/exams/exams.service.ts`)
- Exam services → Redis cache: uses cache (evidence: `apps/api/src/exams/exams.service.ts`)
- Exam services → Tenant utilities: checks tenant context (evidence: `apps/api/src/exams/exams.service.ts`)
- Form endpoints → Forms and responses: dispatches (evidence: `apps/api/src/forms/forms.controller.ts`)
- Form endpoints → Managed file storage: requests upload URL (evidence: `apps/api/src/forms/forms.controller.ts`)
- Forms and responses → Prisma database access: uses persistence (evidence: `apps/api/src/forms/forms.service.ts`)
- Forms and responses → Managed file storage: uses file storage (evidence: `apps/api/src/forms/forms.service.ts`)
- Forms and responses → Notices and notifications: notifies (evidence: `apps/api/src/forms/forms.service.ts`)
- Setup endpoints → School configuration: dispatches (evidence: `apps/api/src/setup/setup.controller.ts`)
- Report endpoints → Analytics reports: dispatches (evidence: `apps/api/src/report/report.controller.ts`)
- Upload endpoints → Managed file storage: dispatches (evidence: `apps/api/src/storage/storage.controller.ts`)
- Managed file storage → Cloudflare R2: signs and manages uploads (evidence: `apps/api/src/storage/storage.service.ts`)
- Managed file storage → Prisma database access: checks references (evidence: `apps/api/src/storage/storage.service.ts`)
- Prisma database access → Application database: extends client (evidence: `apps/api/src/database/prisma.service.ts`)
- JWT guard → Public endpoint metadata: checks public marker (evidence: `apps/api/src/auth/jwt-auth.guard.ts`)
- Role checks → Role metadata: reads role metadata (evidence: `apps/api/src/common/guards/roles.guard.ts`)
