# aaramvatech/aaramva-sikshya architecture

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

- Interactive diagram: https://gitdiagram.com/aaramvatech/aaramva-sikshya
- Repository: https://github.com/aaramvatech/aaramva-sikshya

## Overview

Aaramva Shikshya is a multi-tenant school-management platform for Nepali schools, with web and mobile experiences backed by a NestJS API. Users authenticate within a school tenant, then carry out student, academic, attendance, examination, finance, and administration tasks; the API scopes school data and returns results to the clients. The README documents additional HR, library, reporting, and communication capabilities. The map follows documented product boundaries and sampled controller/service calls; unsampled modules are represented at their enclosing directory level, so uncertain internal wiring is omitted.

Main entry points: [`apps/api/src/modules/tenant/tenant-prisma.service.ts`](https://github.com/aaramvatech/aaramva-sikshya/blob/main/apps/api/src/modules/tenant/tenant-prisma.service.ts) (Tenant database), [`apps/api/src/app.module.ts`](https://github.com/aaramvatech/aaramva-sikshya/blob/main/apps/api/src/app.module.ts) (REST API), [`apps/web/app/(portal)/layout.tsx`](https://github.com/aaramvatech/aaramva-sikshya/blob/main/apps/web/app/(portal)/layout.tsx) (Web portal), [`apps/mobile/app/_layout.tsx`](https://github.com/aaramvatech/aaramva-sikshya/blob/main/apps/mobile/app/_layout.tsx) (Mobile apps)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_clients["User clients"]
  node_web_portal["Web portal<br/>[layout.tsx]"]
  node_mobile_app["Mobile apps<br/>[_layout.tsx]"]
end

subgraph group_platform["Tenant platform"]
  node_api["REST API<br/>[app.module.ts]"]
  node_auth["Authentication"]
  node_tenant["Tenant isolation"]
  node_tenant_db[("Tenant database")]
end

subgraph group_school["School operations"]
  node_students["Student records"]
  node_academics["Academics"]
  node_attendance["Attendance"]
  node_exams["Examinations"]
  node_hr_library["HR and library"]
  node_reports["Reports and dashboard"]
  node_communications["Communication"]
end

subgraph group_finance["Finance services"]
  node_finance_ops["Fee billing"]
  node_payment_gateways["Payment gateways"]
end

subgraph group_admin["Administration"]
  node_super_admin["Platform administration"]
  node_onboarding["School onboarding"]
end

node_school_users(("School users"))
node_sms_provider["Sparrow SMS"]
node_file_storage[("Object storage")]

node_school_users -->|"use portal"| node_web_portal
node_school_users -->|"use apps"| node_mobile_app
node_web_portal -->|"send requests"| node_api
node_mobile_app -->|"send requests"| node_api
node_api -->|"dispatches auth"| node_auth
node_api -->|"resolves tenant"| node_tenant
node_tenant -->|"sets scope"| node_tenant_db
node_auth -->|"reads and writes"| node_tenant_db
node_students -->|"reads and writes"| node_tenant_db
node_academics -->|"reads and writes"| node_tenant_db
node_attendance -->|"reads and writes"| node_tenant_db
node_exams -->|"reads and writes"| node_tenant_db
node_hr_library -->|"reads and writes"| node_tenant_db
node_reports -->|"reads"| node_tenant_db
node_finance_ops -->|"reads and writes"| node_tenant_db
node_finance_ops -.->|"handles payments"| node_payment_gateways
node_communications -.->|"sends SMS"| node_sms_provider
node_api -.->|"presigns file access"| node_file_storage
node_super_admin -->|"onboards schools"| node_onboarding
node_super_admin -->|"manages tenants"| node_tenant_db
node_api -->|"returns results"| node_web_portal
node_api -->|"returns results"| node_mobile_app

click node_web_portal "https://github.com/aaramvatech/aaramva-sikshya/blob/main/apps/web/app/(portal)/layout.tsx"
click node_mobile_app "https://github.com/aaramvatech/aaramva-sikshya/blob/main/apps/mobile/app/_layout.tsx"
click node_api "https://github.com/aaramvatech/aaramva-sikshya/blob/main/apps/api/src/app.module.ts"
click node_auth "https://github.com/aaramvatech/aaramva-sikshya/tree/main/apps/api/src/modules/auth"
click node_tenant "https://github.com/aaramvatech/aaramva-sikshya/tree/main/apps/api/src/modules/tenant"
click node_tenant_db "https://github.com/aaramvatech/aaramva-sikshya/blob/main/apps/api/src/modules/tenant/tenant-prisma.service.ts"
click node_students "https://github.com/aaramvatech/aaramva-sikshya/tree/main/apps/api/src/modules/student"
click node_academics "https://github.com/aaramvatech/aaramva-sikshya/tree/main/apps/api/src/modules/academic"
click node_attendance "https://github.com/aaramvatech/aaramva-sikshya/tree/main/apps/api/src/modules/attendance"
click node_exams "https://github.com/aaramvatech/aaramva-sikshya/tree/main/apps/api/src/modules/examination"
click node_hr_library "https://github.com/aaramvatech/aaramva-sikshya/tree/main/apps/api/src/modules/hr"
click node_reports "https://github.com/aaramvatech/aaramva-sikshya/tree/main/apps/api/src/modules/reports"
click node_finance_ops "https://github.com/aaramvatech/aaramva-sikshya/tree/main/apps/api/src/modules/finance"
click node_payment_gateways "https://github.com/aaramvatech/aaramva-sikshya/tree/main/apps/api/src/modules/finance"
click node_communications "https://github.com/aaramvatech/aaramva-sikshya/tree/main/apps/api/src/modules/communication"
click node_super_admin "https://github.com/aaramvatech/aaramva-sikshya/tree/main/apps/api/src/modules/super-admin"
click node_onboarding "https://github.com/aaramvatech/aaramva-sikshya/tree/main/apps/api/src/modules/onboarding"

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_portal,node_mobile_app,node_school_users toneBlue
class node_api,node_auth,node_tenant,node_tenant_db,node_file_storage toneAmber
class node_students,node_academics,node_attendance,node_exams,node_hr_library,node_reports,node_communications toneMint
class node_finance_ops,node_payment_gateways toneRose
class node_super_admin,node_onboarding,node_sms_provider toneIndigo
```

## Components

### User clients

- [Web portal](https://github.com/aaramvatech/aaramva-sikshya/blob/main/apps/web/app/(portal)/layout.tsx): `apps/web/app/(portal)/layout.tsx`
- [Mobile apps](https://github.com/aaramvatech/aaramva-sikshya/blob/main/apps/mobile/app/_layout.tsx): `apps/mobile/app/_layout.tsx`

### Tenant platform

- [REST API](https://github.com/aaramvatech/aaramva-sikshya/blob/main/apps/api/src/app.module.ts): `apps/api/src/app.module.ts`
- [Authentication](https://github.com/aaramvatech/aaramva-sikshya/tree/main/apps/api/src/modules/auth): `apps/api/src/modules/auth`
- [Tenant isolation](https://github.com/aaramvatech/aaramva-sikshya/tree/main/apps/api/src/modules/tenant): `apps/api/src/modules/tenant`
- [Tenant database](https://github.com/aaramvatech/aaramva-sikshya/blob/main/apps/api/src/modules/tenant/tenant-prisma.service.ts): `apps/api/src/modules/tenant/tenant-prisma.service.ts`

### School operations

- [Student records](https://github.com/aaramvatech/aaramva-sikshya/tree/main/apps/api/src/modules/student): `apps/api/src/modules/student`
- [Academics](https://github.com/aaramvatech/aaramva-sikshya/tree/main/apps/api/src/modules/academic): `apps/api/src/modules/academic`
- [Attendance](https://github.com/aaramvatech/aaramva-sikshya/tree/main/apps/api/src/modules/attendance): `apps/api/src/modules/attendance`
- [Examinations](https://github.com/aaramvatech/aaramva-sikshya/tree/main/apps/api/src/modules/examination): `apps/api/src/modules/examination`
- [HR and library](https://github.com/aaramvatech/aaramva-sikshya/tree/main/apps/api/src/modules/hr): `apps/api/src/modules/hr`
- [Reports and dashboard](https://github.com/aaramvatech/aaramva-sikshya/tree/main/apps/api/src/modules/reports): `apps/api/src/modules/reports`
- [Communication](https://github.com/aaramvatech/aaramva-sikshya/tree/main/apps/api/src/modules/communication): `apps/api/src/modules/communication`

### Finance services

- [Fee billing](https://github.com/aaramvatech/aaramva-sikshya/tree/main/apps/api/src/modules/finance): `apps/api/src/modules/finance`
- [Payment gateways](https://github.com/aaramvatech/aaramva-sikshya/tree/main/apps/api/src/modules/finance): `apps/api/src/modules/finance`

### Administration

- [Platform administration](https://github.com/aaramvatech/aaramva-sikshya/tree/main/apps/api/src/modules/super-admin): `apps/api/src/modules/super-admin`
- [School onboarding](https://github.com/aaramvatech/aaramva-sikshya/tree/main/apps/api/src/modules/onboarding): `apps/api/src/modules/onboarding`

### Other components

- **School users**
- **Sparrow SMS**
- **Object storage**

## Connections

- School users → Web portal: use portal
- School users → Mobile apps: use apps
- Web portal → REST API: send requests
- Mobile apps → REST API: send requests
- REST API → Authentication: dispatches auth
- REST API → Tenant isolation: resolves tenant
- Tenant isolation → Tenant database: sets scope
- Authentication → Tenant database: reads and writes
- Student records → Tenant database: reads and writes
- Academics → Tenant database: reads and writes
- Attendance → Tenant database: reads and writes
- Examinations → Tenant database: reads and writes
- HR and library → Tenant database: reads and writes
- Reports and dashboard → Tenant database: reads
- Fee billing → Tenant database: reads and writes
- Fee billing → Payment gateways: handles payments
- Communication → Sparrow SMS: sends SMS
- REST API → Object storage: presigns file access
- Platform administration → School onboarding: onboards schools
- Platform administration → Tenant database: manages tenants
- REST API → Web portal: returns results
- REST API → Mobile apps: returns results
