# adityakamthe/accreditiq_10-10 architecture

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

- Interactive diagram: https://gitdiagram.com/adityakamthe/accreditiq_10-10
- Repository: https://github.com/adityakamthe/accreditiq_10-10

## Overview

AccreditIQ is an NBA accreditation intelligence platform for institutions preparing Self-Assessment Reports (SARs). Its main user journey is to sign in, review institution readiness and criterion-level gaps, work on evidence and academic data, then generate and export accreditation outputs. The product also includes administration, executive oversight, AI assistance, document search, and real-time collaboration. The graph combines the sampled frontend and server wiring with major README capabilities; several feature implementations were not sampled, so unsupported internal call relationships are omitted.

Main entry points: [`server/src/index.js`](https://github.com/adityakamthe/accreditiq_10-10/blob/main/server/src/index.js) (API server and routing), [`src/App.tsx`](https://github.com/adityakamthe/accreditiq_10-10/blob/main/src/App.tsx) (App routing), [`server/src/routes/connect.js`](https://github.com/adityakamthe/accreditiq_10-10/blob/main/server/src/routes/connect.js) (Connect messaging), [`src/pages/LoginPage.tsx`](https://github.com/adityakamthe/accreditiq_10-10/blob/main/src/pages/LoginPage.tsx) (Role-based login)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["User experience"]
  node_app["App routing<br/>[App.tsx]"]
  node_login["Role-based login<br/>[LoginPage.tsx]"]
  node_auth_state["Authentication state<br/>[authSlice.ts]"]
end

subgraph group_accreditation["Accreditation workflows"]
  node_dashboard["Readiness dashboard<br/>[DashboardPage.tsx]"]
  node_criterion_work["Criterion workspaces"]
  node_sar["SAR report generation"]
  node_calculator["NBA calculations<br/>[nbaCalculators.js]"]
  node_export["Official PDF export<br/>[pdf.js]"]
  node_admin["Institution administration<br/>[AdminPage.tsx]"]
  node_exec["Executive oversight"]
  node_academic_api["Academic data routes<br/>[academic.js]"]
end

subgraph group_intelligence["AI and evidence"]
  node_vault["Evidence vault<br/>[vault.js]"]
  node_search["Document search"]
  node_ingest["Document ingestion<br/>[ingestService.js]"]
  node_ai_chat["AI assistant<br/>[AIChatBot.tsx]"]
  node_ai_query["AI query hook<br/>[useAIQuery.ts]"]
  node_ai_gateway["AI gateway<br/>[aiGateway.js]"]
end

subgraph group_platform["Platform services"]
  node_dashboard_data["Dashboard data queries"]
  node_api_config["API configuration<br/>[api.ts]"]
  node_exec_service["Executive data service<br/>[execService.js]"]
  node_api_server["API server and routing<br/>[index.js]"]
  node_database[("Domain databases<br/>[pool.js]")]
end

subgraph group_collaboration["Institutional collaboration"]
  node_connect["Connect messaging<br/>[connect.js]"]
  node_websocket["Realtime messaging<br/>[wsServer.js]"]
end

node_institution_user(("Institution user"))

node_institution_user -->|"opens"| node_app
node_app -->|"routes to"| node_login
node_login -->|"authenticates"| node_auth_state
node_app -->|"routes to"| node_dashboard
node_dashboard -->|"queries"| node_dashboard_data
node_dashboard_data -->|"uses endpoint"| node_api_config
node_institution_user -->|"works on criteria"| node_criterion_work
node_institution_user -->|"prepares report"| node_sar
node_institution_user -->|"exports report"| node_export
node_institution_user -->|"manages institution"| node_admin
node_institution_user -->|"uploads evidence"| node_vault
node_institution_user -->|"searches documents"| node_search
node_institution_user -->|"asks questions"| node_ai_chat
node_ai_chat -->|"uses messaging"| node_connect
node_ai_query -->|"posts chat"| node_api_server
node_api_server -->|"routes AI requests"| node_ai_gateway
node_api_server -->|"mounts routes"| node_academic_api
node_api_server -->|"mounts routes"| node_connect
node_api_server -->|"starts realtime"| node_websocket
node_websocket -->|"uses permissions"| node_connect
node_institution_user -->|"reviews oversight"| node_exec
node_exec -.->|"loads executive data"| node_exec_service
node_institution_user -->|"reviews calculations"| node_calculator
node_academic_api -->|"queries data"| node_database
node_exec_service -->|"queries data"| node_database
node_ingest -->|"requests AI"| node_ai_gateway
node_api_server -->|"mounts routes"| node_vault

click node_app "https://github.com/adityakamthe/accreditiq_10-10/blob/main/src/App.tsx"
click node_login "https://github.com/adityakamthe/accreditiq_10-10/blob/main/src/pages/LoginPage.tsx"
click node_auth_state "https://github.com/adityakamthe/accreditiq_10-10/blob/main/src/store/authSlice.ts"
click node_dashboard "https://github.com/adityakamthe/accreditiq_10-10/blob/main/src/pages/DashboardPage.tsx"
click node_dashboard_data "https://github.com/adityakamthe/accreditiq_10-10/blob/main/src/hooks/useDashboardData.ts"
click node_api_config "https://github.com/adityakamthe/accreditiq_10-10/blob/main/src/config/api.ts"
click node_criterion_work "https://github.com/adityakamthe/accreditiq_10-10/blob/main/src/pages/CriterionWorkspace.tsx"
click node_sar "https://github.com/adityakamthe/accreditiq_10-10/blob/main/src/pages/SARGeneratorPage.tsx"
click node_calculator "https://github.com/adityakamthe/accreditiq_10-10/blob/main/server/src/calculators/nbaCalculators.js"
click node_export "https://github.com/adityakamthe/accreditiq_10-10/blob/main/server/src/routes/pdf.js"
click node_admin "https://github.com/adityakamthe/accreditiq_10-10/blob/main/src/pages/AdminPage.tsx"
click node_vault "https://github.com/adityakamthe/accreditiq_10-10/blob/main/server/src/routes/vault.js"
click node_search "https://github.com/adityakamthe/accreditiq_10-10/blob/main/src/pages/DocumentSearchPage.tsx"
click node_ingest "https://github.com/adityakamthe/accreditiq_10-10/blob/main/server/src/services/ingestService.js"
click node_ai_chat "https://github.com/adityakamthe/accreditiq_10-10/blob/main/src/components/layout/AIChatBot.tsx"
click node_ai_query "https://github.com/adityakamthe/accreditiq_10-10/blob/main/src/hooks/useAIQuery.ts"
click node_ai_gateway "https://github.com/adityakamthe/accreditiq_10-10/blob/main/server/src/services/aiGateway.js"
click node_exec "https://github.com/adityakamthe/accreditiq_10-10/blob/main/src/pages/ExecDashboardPage.tsx"
click node_exec_service "https://github.com/adityakamthe/accreditiq_10-10/blob/main/server/src/services/execService.js"
click node_connect "https://github.com/adityakamthe/accreditiq_10-10/blob/main/server/src/routes/connect.js"
click node_websocket "https://github.com/adityakamthe/accreditiq_10-10/blob/main/server/src/realtime/wsServer.js"
click node_academic_api "https://github.com/adityakamthe/accreditiq_10-10/blob/main/server/src/routes/academic.js"
click node_api_server "https://github.com/adityakamthe/accreditiq_10-10/blob/main/server/src/index.js"
click node_database "https://github.com/adityakamthe/accreditiq_10-10/blob/main/server/src/db/pool.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_app,node_login,node_auth_state,node_institution_user toneBlue
class node_dashboard,node_criterion_work,node_sar,node_calculator,node_export,node_admin,node_exec,node_academic_api toneAmber
class node_vault,node_search,node_ingest,node_ai_chat,node_ai_query,node_ai_gateway toneMint
class node_dashboard_data,node_api_config,node_exec_service,node_api_server,node_database toneRose
class node_connect,node_websocket toneIndigo
```

## Components

### User experience

- [App routing](https://github.com/adityakamthe/accreditiq_10-10/blob/main/src/App.tsx): `src/App.tsx`
- [Role-based login](https://github.com/adityakamthe/accreditiq_10-10/blob/main/src/pages/LoginPage.tsx): `src/pages/LoginPage.tsx`
- [Authentication state](https://github.com/adityakamthe/accreditiq_10-10/blob/main/src/store/authSlice.ts): `src/store/authSlice.ts`

### Accreditation workflows

- [Readiness dashboard](https://github.com/adityakamthe/accreditiq_10-10/blob/main/src/pages/DashboardPage.tsx): `src/pages/DashboardPage.tsx`
- [Criterion workspaces](https://github.com/adityakamthe/accreditiq_10-10/blob/main/src/pages/CriterionWorkspace.tsx): `src/pages/CriterionWorkspace.tsx`
- [SAR report generation](https://github.com/adityakamthe/accreditiq_10-10/blob/main/src/pages/SARGeneratorPage.tsx): `src/pages/SARGeneratorPage.tsx`
- [NBA calculations](https://github.com/adityakamthe/accreditiq_10-10/blob/main/server/src/calculators/nbaCalculators.js): `server/src/calculators/nbaCalculators.js`
- [Official PDF export](https://github.com/adityakamthe/accreditiq_10-10/blob/main/server/src/routes/pdf.js): `server/src/routes/pdf.js`
- [Institution administration](https://github.com/adityakamthe/accreditiq_10-10/blob/main/src/pages/AdminPage.tsx): `src/pages/AdminPage.tsx`
- [Executive oversight](https://github.com/adityakamthe/accreditiq_10-10/blob/main/src/pages/ExecDashboardPage.tsx): `src/pages/ExecDashboardPage.tsx`
- [Academic data routes](https://github.com/adityakamthe/accreditiq_10-10/blob/main/server/src/routes/academic.js): `server/src/routes/academic.js`

### AI and evidence

- [Evidence vault](https://github.com/adityakamthe/accreditiq_10-10/blob/main/server/src/routes/vault.js): `server/src/routes/vault.js`
- [Document search](https://github.com/adityakamthe/accreditiq_10-10/blob/main/src/pages/DocumentSearchPage.tsx): `src/pages/DocumentSearchPage.tsx`
- [Document ingestion](https://github.com/adityakamthe/accreditiq_10-10/blob/main/server/src/services/ingestService.js): `server/src/services/ingestService.js`
- [AI assistant](https://github.com/adityakamthe/accreditiq_10-10/blob/main/src/components/layout/AIChatBot.tsx): `src/components/layout/AIChatBot.tsx`
- [AI query hook](https://github.com/adityakamthe/accreditiq_10-10/blob/main/src/hooks/useAIQuery.ts): `src/hooks/useAIQuery.ts`
- [AI gateway](https://github.com/adityakamthe/accreditiq_10-10/blob/main/server/src/services/aiGateway.js): `server/src/services/aiGateway.js`

### Platform services

- [Dashboard data queries](https://github.com/adityakamthe/accreditiq_10-10/blob/main/src/hooks/useDashboardData.ts): `src/hooks/useDashboardData.ts`
- [API configuration](https://github.com/adityakamthe/accreditiq_10-10/blob/main/src/config/api.ts): `src/config/api.ts`
- [Executive data service](https://github.com/adityakamthe/accreditiq_10-10/blob/main/server/src/services/execService.js): `server/src/services/execService.js`
- [API server and routing](https://github.com/adityakamthe/accreditiq_10-10/blob/main/server/src/index.js): `server/src/index.js`
- [Domain databases](https://github.com/adityakamthe/accreditiq_10-10/blob/main/server/src/db/pool.js): `server/src/db/pool.js`

### Institutional collaboration

- [Connect messaging](https://github.com/adityakamthe/accreditiq_10-10/blob/main/server/src/routes/connect.js): `server/src/routes/connect.js`
- [Realtime messaging](https://github.com/adityakamthe/accreditiq_10-10/blob/main/server/src/realtime/wsServer.js): `server/src/realtime/wsServer.js`

### Other components

- **Institution user**

## Connections

- Institution user → App routing: opens (evidence: `README.md`)
- App routing → Role-based login: routes to (evidence: `src/App.tsx`)
- Role-based login → Authentication state: authenticates (evidence: `src/pages/LoginPage.tsx`)
- App routing → Readiness dashboard: routes to (evidence: `src/App.tsx`)
- Readiness dashboard → Dashboard data queries: queries (evidence: `src/pages/DashboardPage.tsx`)
- Dashboard data queries → API configuration: uses endpoint (evidence: `src/hooks/useDashboardData.ts`)
- Institution user → Criterion workspaces: works on criteria (evidence: `README.md`)
- Institution user → SAR report generation: prepares report (evidence: `README.md`)
- Institution user → Official PDF export: exports report (evidence: `README.md`)
- Institution user → Institution administration: manages institution (evidence: `README.md`)
- Institution user → Evidence vault: uploads evidence (evidence: `README.md`)
- Institution user → Document search: searches documents (evidence: `README.md`)
- Institution user → AI assistant: asks questions (evidence: `README.md`)
- AI assistant → Connect messaging: uses messaging (evidence: `src/components/layout/AIChatBot.tsx`)
- AI query hook → API server and routing: posts chat (evidence: `src/hooks/useAIQuery.ts`)
- API server and routing → AI gateway: routes AI requests (evidence: `server/src/index.js`)
- API server and routing → Academic data routes: mounts routes (evidence: `server/src/index.js`)
- API server and routing → Connect messaging: mounts routes (evidence: `server/src/index.js`)
- API server and routing → Realtime messaging: starts realtime (evidence: `server/src/index.js`)
- Realtime messaging → Connect messaging: uses permissions (evidence: `server/src/realtime/wsServer.js`)
- Institution user → Executive oversight: reviews oversight (evidence: `README.md`)
- Executive oversight → Executive data service: loads executive data
- Institution user → NBA calculations: reviews calculations (evidence: `README.md`)
- Academic data routes → Domain databases: queries data (evidence: `server/src/routes/academic.js`)
- Executive data service → Domain databases: queries data (evidence: `server/src/services/execService.js`)
- Document ingestion → AI gateway: requests AI (evidence: `server/src/services/ingestService.js`)
- API server and routing → Evidence vault: mounts routes (evidence: `server/src/index.js`)
