# akash-exe-27/apaar-vault architecture

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

- Interactive diagram: https://gitdiagram.com/akash-exe-27/apaar-vault
- Repository: https://github.com/akash-exe-27/apaar-vault

## Overview

This is an APAAR-based academic enrolment and verification portal for AICTE and approved institutions. Institution staff enter student records individually or in bulk; the backend validates admissions and records them, while administrators can manage institutions and investigate anomalies, and authorized verifiers can check student records. The browser also presents enrolment and analytics views. The excerpts show the main HTTP-to-database calls and selected browser requests; other UI/API wiring and database details are not fully sampled.

Main entry points: [`server.js`](https://github.com/akash-exe-27/apaar-vault/blob/main/server.js) (HTTP API), [`db.js`](https://github.com/akash-exe-27/apaar-vault/blob/main/db.js) (Database adapter), [`public/app.js`](https://github.com/akash-exe-27/apaar-vault/blob/main/public/app.js) (Web portal), [`https-server.js`](https://github.com/akash-exe-27/apaar-vault/blob/main/https-server.js) (HTTPS API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_portal["Portal"]
  node_portal_ui["Web portal<br/>[app.js]"]
end

subgraph group_api["API"]
  node_http_api["HTTP API<br/>[server.js]"]
  node_https_api["HTTPS API<br/>[https-server.js]"]
end

subgraph group_registry["Registry operations"]
  node_institution_programs["Institutions and programs<br/>[db.js]"]
  node_student_admissions["Student admissions<br/>[db.js]"]
  node_anomaly_ops["Anomaly resolution<br/>[db.js]"]
  node_verification["Student verification<br/>[db.js]"]
  node_analytics["Analytics<br/>[db.js]"]
end

subgraph group_storage["Persistence"]
  node_db_adapter["Database adapter<br/>[db.js]"]
  node_mysql_schema[("Registry schema<br/>[schema.sql]")]
end

node_admin(("AICTE administrator"))
node_institution_user(("Institution user"))
node_verifier(("Authorized verifier"))

node_portal_ui -->|"requests institutions"| node_http_api
node_portal_ui -->|"requests verification"| node_http_api
node_http_api -->|"fetches and adds"| node_institution_programs
node_http_api -->|"uploads and lists"| node_student_admissions
node_http_api -->|"loads and resolves"| node_anomaly_ops
node_http_api -->|"looks up student"| node_verification
node_http_api -->|"fetches metrics"| node_analytics
node_https_api -->|"fetches programs"| node_institution_programs
node_https_api -->|"uploads and lists"| node_student_admissions
node_https_api -->|"looks up student"| node_verification
node_https_api -->|"fetches metrics"| node_analytics
node_institution_programs -.->|"uses adapter"| node_db_adapter
node_student_admissions -.->|"uses adapter"| node_db_adapter
node_anomaly_ops -.->|"uses adapter"| node_db_adapter
node_verification -.->|"uses adapter"| node_db_adapter
node_analytics -.->|"uses adapter"| node_db_adapter
node_db_adapter -.->|"persists registry data"| node_mysql_schema
node_admin -.->|"uses"| node_portal_ui
node_institution_user -.->|"uses"| node_portal_ui
node_verifier -.->|"uses"| node_portal_ui

click node_portal_ui "https://github.com/akash-exe-27/apaar-vault/blob/main/public/app.js"
click node_http_api "https://github.com/akash-exe-27/apaar-vault/blob/main/server.js"
click node_https_api "https://github.com/akash-exe-27/apaar-vault/blob/main/https-server.js"
click node_institution_programs "https://github.com/akash-exe-27/apaar-vault/blob/main/db.js"
click node_student_admissions "https://github.com/akash-exe-27/apaar-vault/blob/main/db.js"
click node_anomaly_ops "https://github.com/akash-exe-27/apaar-vault/blob/main/db.js"
click node_verification "https://github.com/akash-exe-27/apaar-vault/blob/main/db.js"
click node_analytics "https://github.com/akash-exe-27/apaar-vault/blob/main/db.js"
click node_db_adapter "https://github.com/akash-exe-27/apaar-vault/blob/main/db.js"
click node_mysql_schema "https://github.com/akash-exe-27/apaar-vault/blob/main/database/schema.sql"

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_portal_ui,node_institution_user toneBlue
class node_http_api,node_https_api toneAmber
class node_institution_programs,node_student_admissions,node_anomaly_ops,node_verification,node_analytics toneMint
class node_db_adapter,node_mysql_schema toneRose
class node_admin,node_verifier toneIndigo
```

## Components

### Portal

- [Web portal](https://github.com/akash-exe-27/apaar-vault/blob/main/public/app.js): `public/app.js`

### API

- [HTTP API](https://github.com/akash-exe-27/apaar-vault/blob/main/server.js): `server.js`
- [HTTPS API](https://github.com/akash-exe-27/apaar-vault/blob/main/https-server.js): `https-server.js`

### Registry operations

- [Institutions and programs](https://github.com/akash-exe-27/apaar-vault/blob/main/db.js): `db.js`
- [Student admissions](https://github.com/akash-exe-27/apaar-vault/blob/main/db.js): `db.js`
- [Anomaly resolution](https://github.com/akash-exe-27/apaar-vault/blob/main/db.js): `db.js`
- [Student verification](https://github.com/akash-exe-27/apaar-vault/blob/main/db.js): `db.js`
- [Analytics](https://github.com/akash-exe-27/apaar-vault/blob/main/db.js): `db.js`

### Persistence

- [Database adapter](https://github.com/akash-exe-27/apaar-vault/blob/main/db.js): `db.js`
- [Registry schema](https://github.com/akash-exe-27/apaar-vault/blob/main/database/schema.sql): `database/schema.sql`

### Other components

- **AICTE administrator**
- **Institution user**
- **Authorized verifier**

## Connections

- Web portal → HTTP API: requests institutions (evidence: `public/app.js`)
- Web portal → HTTP API: requests verification (evidence: `public/app.js`)
- HTTP API → Institutions and programs: fetches and adds (evidence: `server.js`)
- HTTP API → Student admissions: uploads and lists (evidence: `server.js`)
- HTTP API → Anomaly resolution: loads and resolves (evidence: `server.js`)
- HTTP API → Student verification: looks up student (evidence: `server.js`)
- HTTP API → Analytics: fetches metrics (evidence: `server.js`)
- HTTPS API → Institutions and programs: fetches programs (evidence: `https-server.js`)
- HTTPS API → Student admissions: uploads and lists (evidence: `https-server.js`)
- HTTPS API → Student verification: looks up student (evidence: `https-server.js`)
- HTTPS API → Analytics: fetches metrics (evidence: `https-server.js`)
- Institutions and programs → Database adapter: uses adapter (evidence: `db.js`)
- Student admissions → Database adapter: uses adapter (evidence: `db.js`)
- Anomaly resolution → Database adapter: uses adapter (evidence: `db.js`)
- Student verification → Database adapter: uses adapter (evidence: `db.js`)
- Analytics → Database adapter: uses adapter (evidence: `db.js`)
- Database adapter → Registry schema: persists registry data
- AICTE administrator → Web portal: uses
- Institution user → Web portal: uses
- Authorized verifier → Web portal: uses
