# adwaith-js/kabas architecture

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

- Interactive diagram: https://gitdiagram.com/adwaith-js/kabas
- Repository: https://github.com/adwaith-js/kabas

## Overview

KABAS is an instructor-facing Kanban assessment app: instructors sign in, manage GitHub/Jira team connections, then inspect normalized issues, workload metrics, and team-level analysis. The React client calls an Express API; the server stores team credentials/configuration, fetches board data from the platform APIs, normalizes issues, and calculates assessments. The README documents the API and JSON storage; sampled frontend and backend references support the main calls. Some dashboard details and optional caching behavior are unsampled, so those links are omitted where not established.

Main entry points: [`server/src/routes/analysis.ts`](https://github.com/adwaith-js/kabas/blob/main/server/src/routes/analysis.ts) (Analysis API), [`server/src/routes/teams.ts`](https://github.com/adwaith-js/kabas/blob/main/server/src/routes/teams.ts) (Teams API), [`src/app/services/api.ts`](https://github.com/adwaith-js/kabas/blob/main/src/app/services/api.ts) (API client), [`src/app/routes.tsx`](https://github.com/adwaith-js/kabas/blob/main/src/app/routes.tsx) (App routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Instructor interface"]
  node_routes["App routes<br/>[routes.tsx]"]
  node_login["Login<br/>[Login.tsx]"]
  node_teamlist["Team dashboard<br/>[Dashboard.tsx]"]
  node_teamview["Team assessment view<br/>[TeamDashboard.tsx]"]
  node_assessmentui["Assessment details"]
  node_api_client["API client<br/>[api.ts]"]
end

subgraph group_api["API and access"]
  node_auth["Auth middleware<br/>[auth.ts]"]
  node_authroute["Login API<br/>[auth.ts]"]
  node_teamroute["Teams API<br/>[teams.ts]"]
  node_analysisroute["Analysis API<br/>[analysis.ts]"]
  node_server["Express server<br/>[index.ts]"]
end

subgraph group_assessment["Assessment pipeline"]
  node_engine["Analysis engine<br/>[AnalysisEngine.ts]"]
  node_issue_model["Unified issues<br/>[UnifiedIssue.ts]"]
  node_client_analysis["Client outlier analysis<br/>[analysisEngine.ts]"]
end

subgraph group_integrations["Platform integrations"]
  node_github["GitHub client<br/>[GitHubAPIClient.ts]"]
  node_jira["Jira client<br/>[JiraAPIClient.ts]"]
end

subgraph group_persistence["Team persistence"]
  node_teamstore[("Team store<br/>[TeamStore.ts]")]
  node_jsonfile["teams.json"]
  node_cache["Response cache<br/>[ResponseCache.ts]"]
end

node_instructor(("Instructor"))
node_github_service["GitHub"]
node_jira_service["Jira"]

node_instructor -->|"uses"| node_routes
node_routes -->|"routes to"| node_login
node_routes -->|"routes to"| node_teamlist
node_routes -->|"routes to"| node_teamview
node_login -->|"authenticates via"| node_api_client
node_teamlist -->|"loads teams via"| node_api_client
node_teamview -->|"loads analysis via"| node_api_client
node_teamview -->|"renders"| node_assessmentui
node_teamview -->|"uses"| node_client_analysis
node_api_client -->|"HTTP login"| node_authroute
node_api_client -->|"HTTP teams"| node_teamroute
node_api_client -->|"HTTP analysis"| node_analysisroute
node_server -->|"mounts"| node_authroute
node_server -->|"mounts"| node_teamroute
node_server -->|"mounts"| node_analysisroute
node_teamroute -->|"protects routes"| node_auth
node_analysisroute -->|"protects routes"| node_auth
node_teamroute -->|"reads and updates"| node_teamstore
node_analysisroute -->|"reads team config"| node_teamstore
node_teamstore -->|"loads and saves"| node_jsonfile
node_analysisroute -->|"fetches issues"| node_github
node_analysisroute -->|"fetches issues"| node_jira
node_teamroute -->|"tests connection"| node_github
node_teamroute -->|"tests connection"| node_jira
node_github -->|"queries"| node_github_service
node_jira -->|"queries"| node_jira_service
node_github -->|"normalizes with"| node_issue_model
node_jira -->|"normalizes with"| node_issue_model
node_analysisroute -->|"calculates with"| node_engine
node_engine -->|"analyzes"| node_issue_model
node_analysisroute -->|"uses"| node_cache

click node_routes "https://github.com/adwaith-js/kabas/blob/main/src/app/routes.tsx"
click node_login "https://github.com/adwaith-js/kabas/blob/main/src/app/pages/Login.tsx"
click node_teamlist "https://github.com/adwaith-js/kabas/blob/main/src/app/pages/Dashboard.tsx"
click node_teamview "https://github.com/adwaith-js/kabas/blob/main/src/app/pages/TeamDashboard.tsx"
click node_assessmentui "https://github.com/adwaith-js/kabas/tree/main/src/app/components"
click node_api_client "https://github.com/adwaith-js/kabas/blob/main/src/app/services/api.ts"
click node_auth "https://github.com/adwaith-js/kabas/blob/main/server/src/middleware/auth.ts"
click node_authroute "https://github.com/adwaith-js/kabas/blob/main/server/src/routes/auth.ts"
click node_teamroute "https://github.com/adwaith-js/kabas/blob/main/server/src/routes/teams.ts"
click node_analysisroute "https://github.com/adwaith-js/kabas/blob/main/server/src/routes/analysis.ts"
click node_server "https://github.com/adwaith-js/kabas/blob/main/server/src/index.ts"
click node_engine "https://github.com/adwaith-js/kabas/blob/main/server/src/analysis/AnalysisEngine.ts"
click node_issue_model "https://github.com/adwaith-js/kabas/blob/main/server/src/models/UnifiedIssue.ts"
click node_client_analysis "https://github.com/adwaith-js/kabas/blob/main/src/app/services/analysisEngine.ts"
click node_github "https://github.com/adwaith-js/kabas/blob/main/server/src/clients/GitHubAPIClient.ts"
click node_jira "https://github.com/adwaith-js/kabas/blob/main/server/src/clients/JiraAPIClient.ts"
click node_teamstore "https://github.com/adwaith-js/kabas/blob/main/server/src/storage/TeamStore.ts"
click node_cache "https://github.com/adwaith-js/kabas/blob/main/server/src/cache/ResponseCache.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_routes,node_login,node_teamlist,node_teamview,node_assessmentui,node_api_client toneBlue
class node_auth,node_authroute,node_teamroute,node_analysisroute,node_server toneAmber
class node_engine,node_issue_model,node_client_analysis toneMint
class node_github,node_jira toneRose
class node_teamstore,node_jsonfile,node_cache,node_instructor,node_github_service,node_jira_service toneIndigo
```

## Components

### Instructor interface

- [App routes](https://github.com/adwaith-js/kabas/blob/main/src/app/routes.tsx): `src/app/routes.tsx`
- [Login](https://github.com/adwaith-js/kabas/blob/main/src/app/pages/Login.tsx): `src/app/pages/Login.tsx`
- [Team dashboard](https://github.com/adwaith-js/kabas/blob/main/src/app/pages/Dashboard.tsx): `src/app/pages/Dashboard.tsx`
- [Team assessment view](https://github.com/adwaith-js/kabas/blob/main/src/app/pages/TeamDashboard.tsx): `src/app/pages/TeamDashboard.tsx`
- [Assessment details](https://github.com/adwaith-js/kabas/tree/main/src/app/components): `src/app/components`
- [API client](https://github.com/adwaith-js/kabas/blob/main/src/app/services/api.ts): `src/app/services/api.ts`

### API and access

- [Auth middleware](https://github.com/adwaith-js/kabas/blob/main/server/src/middleware/auth.ts): `server/src/middleware/auth.ts`
- [Login API](https://github.com/adwaith-js/kabas/blob/main/server/src/routes/auth.ts): `server/src/routes/auth.ts`
- [Teams API](https://github.com/adwaith-js/kabas/blob/main/server/src/routes/teams.ts): `server/src/routes/teams.ts`
- [Analysis API](https://github.com/adwaith-js/kabas/blob/main/server/src/routes/analysis.ts): `server/src/routes/analysis.ts`
- [Express server](https://github.com/adwaith-js/kabas/blob/main/server/src/index.ts): `server/src/index.ts`

### Assessment pipeline

- [Analysis engine](https://github.com/adwaith-js/kabas/blob/main/server/src/analysis/AnalysisEngine.ts): `server/src/analysis/AnalysisEngine.ts`
- [Unified issues](https://github.com/adwaith-js/kabas/blob/main/server/src/models/UnifiedIssue.ts): `server/src/models/UnifiedIssue.ts`
- [Client outlier analysis](https://github.com/adwaith-js/kabas/blob/main/src/app/services/analysisEngine.ts): `src/app/services/analysisEngine.ts`

### Platform integrations

- [GitHub client](https://github.com/adwaith-js/kabas/blob/main/server/src/clients/GitHubAPIClient.ts): `server/src/clients/GitHubAPIClient.ts`
- [Jira client](https://github.com/adwaith-js/kabas/blob/main/server/src/clients/JiraAPIClient.ts): `server/src/clients/JiraAPIClient.ts`

### Team persistence

- [Team store](https://github.com/adwaith-js/kabas/blob/main/server/src/storage/TeamStore.ts): `server/src/storage/TeamStore.ts`
- **teams.json**
- [Response cache](https://github.com/adwaith-js/kabas/blob/main/server/src/cache/ResponseCache.ts): `server/src/cache/ResponseCache.ts`

### Other components

- **Instructor**
- **GitHub**
- **Jira**

## Connections

- Instructor → App routes: uses (evidence: `src/app/routes.tsx`)
- App routes → Login: routes to (evidence: `src/app/routes.tsx`)
- App routes → Team dashboard: routes to (evidence: `src/app/routes.tsx`)
- App routes → Team assessment view: routes to (evidence: `src/app/routes.tsx`)
- Login → API client: authenticates via (evidence: `src/app/pages/Login.tsx`)
- Team dashboard → API client: loads teams via (evidence: `src/app/pages/Dashboard.tsx`)
- Team assessment view → API client: loads analysis via (evidence: `src/app/pages/TeamDashboard.tsx`)
- Team assessment view → Assessment details: renders (evidence: `src/app/pages/TeamDashboard.tsx`)
- Team assessment view → Client outlier analysis: uses (evidence: `src/app/pages/TeamDashboard.tsx`)
- API client → Login API: HTTP login (evidence: `README.md`)
- API client → Teams API: HTTP teams (evidence: `src/app/services/api.ts`)
- API client → Analysis API: HTTP analysis (evidence: `src/app/services/api.ts`)
- Express server → Login API: mounts (evidence: `server/src/index.ts`)
- Express server → Teams API: mounts (evidence: `server/src/index.ts`)
- Express server → Analysis API: mounts (evidence: `server/src/index.ts`)
- Teams API → Auth middleware: protects routes (evidence: `server/src/index.ts`)
- Analysis API → Auth middleware: protects routes (evidence: `server/src/index.ts`)
- Teams API → Team store: reads and updates (evidence: `server/src/routes/teams.ts`)
- Analysis API → Team store: reads team config (evidence: `server/src/routes/analysis.ts`)
- Team store → teams.json: loads and saves (evidence: `server/src/storage/TeamStore.ts`)
- Analysis API → GitHub client: fetches issues (evidence: `server/src/routes/analysis.ts`)
- Analysis API → Jira client: fetches issues (evidence: `server/src/routes/analysis.ts`)
- Teams API → GitHub client: tests connection (evidence: `server/src/routes/teams.ts`)
- Teams API → Jira client: tests connection (evidence: `server/src/routes/teams.ts`)
- GitHub client → GitHub: queries (evidence: `server/src/clients/GitHubAPIClient.ts`)
- Jira client → Jira: queries (evidence: `server/src/clients/JiraAPIClient.ts`)
- GitHub client → Unified issues: normalizes with (evidence: `server/src/clients/GitHubAPIClient.ts`)
- Jira client → Unified issues: normalizes with (evidence: `server/src/clients/JiraAPIClient.ts`)
- Analysis API → Analysis engine: calculates with (evidence: `server/src/routes/analysis.ts`)
- Analysis engine → Unified issues: analyzes (evidence: `server/src/analysis/AnalysisEngine.ts`)
- Analysis API → Response cache: uses (evidence: `server/src/routes/analysis.ts`)
