# saranball/knowledge-management-webapp architecture

> Architecture diagram of the GitHub repository saranball/knowledge-management-webapp, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-23). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/saranball/knowledge-management-webapp
- Repository: https://github.com/saranball/knowledge-management-webapp

## Overview

This is a Kaizen knowledge-management portal for employee knowledge search, learning, training records, and workforce administration. Users enter through the app, then use dashboards and feature areas for documents, technical knowledge, experts, courses, and AI assistance; administrators manage members and training. The client API communicates with a Node server. The README establishes the Gemini API key requirement, while sampled code and the source index support the main client modules; unsampled server internals and some integrations are not mapped beyond the visible evidence.

Main entry points: [`src/App.tsx`](https://github.com/saranball/knowledge-management-webapp/blob/main/src/App.tsx) (KM application), [`src/services/api.ts`](https://github.com/saranball/knowledge-management-webapp/blob/main/src/services/api.ts) (API client), [`src/components/LearningCenter.tsx`](https://github.com/saranball/knowledge-management-webapp/blob/main/src/components/LearningCenter.tsx) (Learning center), [`src/components/Dashboard.tsx`](https://github.com/saranball/knowledge-management-webapp/blob/main/src/components/Dashboard.tsx) (Dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["App entry"]
  node_app["KM application<br/>[App.tsx]"]
  node_dashboard["Dashboard<br/>[Dashboard.tsx]"]
end

subgraph group_knowledge["Knowledge access"]
  node_documents["Document library<br/>[DocumentList.tsx]"]
  node_technical["Technical knowledge<br/>[TechnicalKB.tsx]"]
  node_experts["Expert directory"]
  node_ai["AI chat<br/>[AIChatBox.tsx]"]
end

subgraph group_learning["Learning and recognition"]
  node_learning["Learning center<br/>[LearningCenter.tsx]"]
  node_badges["Badge display<br/>[BadgeDisplay.tsx]"]
  node_certificate["Certificate modal"]
end

subgraph group_workforce["Workforce administration"]
  node_members["Member management"]
end

subgraph group_platform["Shared services"]
  node_api["API client<br/>[api.ts]"]
  node_server["Application server<br/>[server.ts]"]
  node_initial["Initial data<br/>[initialData.ts]"]
  node_departments["Department rules<br/>[departmentUtils.ts]"]
  node_courseutils["Course calculations<br/>[courseutils.ts]"]
  node_badgeutils["Badge rules<br/>[badgeUtils.ts]"]
  node_gamification["Gamification rules"]
  node_fileaccess["Signed file access<br/>[fileAccess.ts]"]
  node_assets["Fallback assets<br/>[assets.ts]"]
end

node_employee(("Employee"))

node_employee -->|"uses"| node_app
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_documents
node_app -->|"routes to"| node_technical
node_app -->|"routes to"| node_experts
node_app -->|"routes to"| node_ai
node_app -->|"routes to"| node_learning
node_app -->|"routes to"| node_members
node_app -->|"calls"| node_api
node_documents -->|"reads and writes"| node_api
node_documents -->|"resolves file links"| node_fileaccess
node_fileaccess -->|"requests signed URL"| node_api
node_technical -->|"uses"| node_departments
node_experts -->|"uses"| node_departments
node_ai -->|"calls"| node_api
node_ai -->|"uses"| node_departments
node_learning -->|"reads and writes"| node_api
node_learning -->|"renders"| node_badges
node_learning -->|"opens"| node_certificate
node_learning -->|"uses"| node_gamification
node_learning -->|"uses"| node_courseutils
node_members -->|"reads and writes"| node_api
node_members -->|"uses"| node_initial
node_members -->|"looks up departments"| node_departments
node_dashboard -->|"renders"| node_badges
node_dashboard -->|"opens"| node_certificate
node_dashboard -->|"uses"| node_badgeutils
node_dashboard -->|"uses"| node_courseutils
node_badges -->|"calculates badges"| node_badgeutils
node_api -.->|"HTTP requests"| node_server
node_server -->|"loads seed data"| node_initial
node_server -->|"uses"| node_departments
node_server -->|"uses"| node_gamification
node_server -->|"uses"| node_assets

click node_app "https://github.com/saranball/knowledge-management-webapp/blob/main/src/App.tsx"
click node_dashboard "https://github.com/saranball/knowledge-management-webapp/blob/main/src/components/Dashboard.tsx"
click node_documents "https://github.com/saranball/knowledge-management-webapp/blob/main/src/components/DocumentList.tsx"
click node_technical "https://github.com/saranball/knowledge-management-webapp/blob/main/src/components/TechnicalKB.tsx"
click node_experts "https://github.com/saranball/knowledge-management-webapp/blob/main/src/components/ExpertDirectory.tsx"
click node_ai "https://github.com/saranball/knowledge-management-webapp/blob/main/src/components/AIChatBox.tsx"
click node_learning "https://github.com/saranball/knowledge-management-webapp/blob/main/src/components/LearningCenter.tsx"
click node_badges "https://github.com/saranball/knowledge-management-webapp/blob/main/src/components/BadgeDisplay.tsx"
click node_certificate "https://github.com/saranball/knowledge-management-webapp/blob/main/src/components/BadgeCertificateModal.tsx"
click node_members "https://github.com/saranball/knowledge-management-webapp/blob/main/src/components/MemberManagement.tsx"
click node_api "https://github.com/saranball/knowledge-management-webapp/blob/main/src/services/api.ts"
click node_server "https://github.com/saranball/knowledge-management-webapp/blob/main/server.ts"
click node_initial "https://github.com/saranball/knowledge-management-webapp/blob/main/src/data/initialData.ts"
click node_departments "https://github.com/saranball/knowledge-management-webapp/blob/main/src/utils/departmentUtils.ts"
click node_courseutils "https://github.com/saranball/knowledge-management-webapp/blob/main/src/utils/courseutils.ts"
click node_badgeutils "https://github.com/saranball/knowledge-management-webapp/blob/main/src/utils/badgeUtils.ts"
click node_gamification "https://github.com/saranball/knowledge-management-webapp/blob/main/src/utils/gamificationUtils.ts"
click node_fileaccess "https://github.com/saranball/knowledge-management-webapp/blob/main/src/utils/fileAccess.ts"
click node_assets "https://github.com/saranball/knowledge-management-webapp/blob/main/src/utils/assets.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_app,node_dashboard toneBlue
class node_documents,node_technical,node_experts,node_ai toneAmber
class node_learning,node_badges,node_certificate toneMint
class node_members toneRose
class node_api,node_server,node_initial,node_departments,node_courseutils,node_badgeutils,node_gamification,node_fileaccess,node_assets,node_employee toneIndigo
```

## Components

### App entry

- [KM application](https://github.com/saranball/knowledge-management-webapp/blob/main/src/App.tsx): `src/App.tsx`
- [Dashboard](https://github.com/saranball/knowledge-management-webapp/blob/main/src/components/Dashboard.tsx): `src/components/Dashboard.tsx`

### Knowledge access

- [Document library](https://github.com/saranball/knowledge-management-webapp/blob/main/src/components/DocumentList.tsx): `src/components/DocumentList.tsx`
- [Technical knowledge](https://github.com/saranball/knowledge-management-webapp/blob/main/src/components/TechnicalKB.tsx): `src/components/TechnicalKB.tsx`
- [Expert directory](https://github.com/saranball/knowledge-management-webapp/blob/main/src/components/ExpertDirectory.tsx): `src/components/ExpertDirectory.tsx`
- [AI chat](https://github.com/saranball/knowledge-management-webapp/blob/main/src/components/AIChatBox.tsx): `src/components/AIChatBox.tsx`

### Learning and recognition

- [Learning center](https://github.com/saranball/knowledge-management-webapp/blob/main/src/components/LearningCenter.tsx): `src/components/LearningCenter.tsx`
- [Badge display](https://github.com/saranball/knowledge-management-webapp/blob/main/src/components/BadgeDisplay.tsx): `src/components/BadgeDisplay.tsx`
- [Certificate modal](https://github.com/saranball/knowledge-management-webapp/blob/main/src/components/BadgeCertificateModal.tsx): `src/components/BadgeCertificateModal.tsx`

### Workforce administration

- [Member management](https://github.com/saranball/knowledge-management-webapp/blob/main/src/components/MemberManagement.tsx): `src/components/MemberManagement.tsx`

### Shared services

- [API client](https://github.com/saranball/knowledge-management-webapp/blob/main/src/services/api.ts): `src/services/api.ts`
- [Application server](https://github.com/saranball/knowledge-management-webapp/blob/main/server.ts): `server.ts`
- [Initial data](https://github.com/saranball/knowledge-management-webapp/blob/main/src/data/initialData.ts): `src/data/initialData.ts`
- [Department rules](https://github.com/saranball/knowledge-management-webapp/blob/main/src/utils/departmentUtils.ts): `src/utils/departmentUtils.ts`
- [Course calculations](https://github.com/saranball/knowledge-management-webapp/blob/main/src/utils/courseutils.ts): `src/utils/courseutils.ts`
- [Badge rules](https://github.com/saranball/knowledge-management-webapp/blob/main/src/utils/badgeUtils.ts): `src/utils/badgeUtils.ts`
- [Gamification rules](https://github.com/saranball/knowledge-management-webapp/blob/main/src/utils/gamificationUtils.ts): `src/utils/gamificationUtils.ts`
- [Signed file access](https://github.com/saranball/knowledge-management-webapp/blob/main/src/utils/fileAccess.ts): `src/utils/fileAccess.ts`
- [Fallback assets](https://github.com/saranball/knowledge-management-webapp/blob/main/src/utils/assets.ts): `src/utils/assets.ts`

### Other components

- **Employee**

## Connections

- Employee → KM application: uses (evidence: `src/App.tsx`)
- KM application → Dashboard: routes to (evidence: `src/App.tsx`)
- KM application → Document library: routes to (evidence: `src/App.tsx`)
- KM application → Technical knowledge: routes to (evidence: `src/App.tsx`)
- KM application → Expert directory: routes to (evidence: `src/App.tsx`)
- KM application → AI chat: routes to (evidence: `src/App.tsx`)
- KM application → Learning center: routes to (evidence: `src/App.tsx`)
- KM application → Member management: routes to (evidence: `src/App.tsx`)
- KM application → API client: calls (evidence: `src/App.tsx`)
- Document library → API client: reads and writes (evidence: `src/components/DocumentList.tsx`)
- Document library → Signed file access: resolves file links (evidence: `src/components/DocumentList.tsx`)
- Signed file access → API client: requests signed URL (evidence: `src/utils/fileAccess.ts`)
- Technical knowledge → Department rules: uses (evidence: `src/components/TechnicalKB.tsx`)
- Expert directory → Department rules: uses (evidence: `src/components/ExpertDirectory.tsx`)
- AI chat → API client: calls (evidence: `src/components/AIChatBox.tsx`)
- AI chat → Department rules: uses (evidence: `src/components/AIChatBox.tsx`)
- Learning center → API client: reads and writes (evidence: `src/components/LearningCenter.tsx`)
- Learning center → Badge display: renders (evidence: `src/components/LearningCenter.tsx`)
- Learning center → Certificate modal: opens (evidence: `src/components/LearningCenter.tsx`)
- Learning center → Gamification rules: uses (evidence: `src/components/LearningCenter.tsx`)
- Learning center → Course calculations: uses (evidence: `src/components/LearningCenter.tsx`)
- Member management → API client: reads and writes (evidence: `src/components/MemberManagement.tsx`)
- Member management → Initial data: uses (evidence: `src/components/MemberManagement.tsx`)
- Member management → Department rules: looks up departments (evidence: `src/components/MemberManagement.tsx`)
- Dashboard → Badge display: renders (evidence: `src/components/Dashboard.tsx`)
- Dashboard → Certificate modal: opens (evidence: `src/components/Dashboard.tsx`)
- Dashboard → Badge rules: uses (evidence: `src/components/Dashboard.tsx`)
- Dashboard → Course calculations: uses (evidence: `src/components/Dashboard.tsx`)
- Badge display → Badge rules: calculates badges (evidence: `src/components/BadgeDisplay.tsx`)
- API client → Application server: HTTP requests
- Application server → Initial data: loads seed data (evidence: `server.ts`)
- Application server → Department rules: uses (evidence: `server.ts`)
- Application server → Gamification rules: uses (evidence: `server.ts`)
- Application server → Fallback assets: uses (evidence: `server.ts`)
