# ashhh02/accrediflow architecture

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

- Interactive diagram: https://gitdiagram.com/ashhh02/accrediflow
- Repository: https://github.com/ashhh02/accrediflow

## Overview

AccrediFlow is JMCFI’s PACUCOA accreditation management system. Its central workflow is role-based evidence submission, sequential Dean/Area Chair/QA review, and compliance tracking; QA also assigns tasks and oversees users, workflows, and the calendar. The graph includes major documented capabilities and sampled data layers. Several UI and API modules are unsampled, so their internal connections are omitted unless shown by the README or source index.

Main entry points: [`src/lib/evidenceStore.ts`](https://github.com/ashhh02/accrediflow/blob/main/src/lib/evidenceStore.ts) (Submission records), [`src/lib/supabase.ts`](https://github.com/ashhh02/accrediflow/blob/main/src/lib/supabase.ts) (Supabase client), [`src/context/AuthContext.tsx`](https://github.com/ashhh02/accrediflow/blob/main/src/context/AuthContext.tsx) (Authentication), [`src/components/modules/DocumentRepositoryView.tsx`](https://github.com/ashhh02/accrediflow/blob/main/src/components/modules/DocumentRepositoryView.tsx) (Evidence repository)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and roles"]
  node_app["App entry<br/>[App.tsx]"]
  node_auth["Authentication<br/>[AuthContext.tsx]"]
  node_accounts["Role accounts<br/>[authAccounts.ts]"]
  node_access_requests["Access requests<br/>[accessRequests.ts]"]
  node_permissions["Permissions<br/>[permissions.ts]"]
  node_users["User administration<br/>[systemUsers.ts]"]
end

subgraph group_evidence["Evidence workflow"]
  node_catalogue["PACUCOA catalogue"]
  node_repository["Evidence repository"]
  node_review["Evidence review"]
  node_evidence_store["Submission records<br/>[evidenceStore.ts]"]
  node_progress["Readiness progress"]
  node_repository_cards["Program readiness cards"]
end

subgraph group_operations["Tasks and oversight"]
  node_tasks["Task management<br/>[TasksView.tsx]"]
  node_analytics["Analytics<br/>[AnalyticsView.tsx]"]
  node_calendar["Calendar context"]
  node_notifications["Notifications"]
  node_program_admin["Program administration"]
end

subgraph group_assistant["Assistant and services"]
  node_chat_ui["Assistant interface<br/>[ChatView.tsx]"]
  node_chat_api["Assistant API<br/>[chat.ts]"]
  node_aira_api["Aira query API<br/>[aira-query.ts]"]
  node_server["API server<br/>[server.ts]"]
end

node_staff(("Accreditation users"))
node_supabase_client["Supabase client<br/>[supabase.ts]"]
node_supabase[("Supabase database")]

node_staff -->|"uses"| node_app
node_app -->|"provides auth"| node_auth
node_auth -->|"resolves roles"| node_accounts
node_accounts -->|"checks requests"| node_access_requests
node_staff -->|"uploads evidence"| node_repository
node_repository -->|"uses checklist"| node_catalogue
node_repository -->|"reads and writes"| node_evidence_store
node_review -->|"reviews submissions"| node_evidence_store
node_staff -->|"reviews by role"| node_review
node_evidence_store -->|"supplies submissions"| node_progress
node_progress -->|"provides readiness"| node_repository_cards
node_staff -->|"completes tasks"| node_tasks
node_staff -->|"views readiness"| node_analytics
node_staff -->|"uses calendar"| node_calendar
node_access_requests -->|"pushes notifications"| node_notifications
node_staff -->|"manages programs"| node_program_admin
node_staff -->|"uses assistant"| node_chat_ui
node_server -->|"routes requests"| node_chat_api
node_server -->|"routes requests"| node_aira_api
node_auth -->|"uses client"| node_supabase_client
node_evidence_store -->|"uses client"| node_supabase_client
node_notifications -->|"uses client"| node_supabase_client
node_supabase_client -->|"connects"| node_supabase

click node_app "https://github.com/ashhh02/accrediflow/blob/main/src/App.tsx"
click node_auth "https://github.com/ashhh02/accrediflow/blob/main/src/context/AuthContext.tsx"
click node_accounts "https://github.com/ashhh02/accrediflow/blob/main/src/data/authAccounts.ts"
click node_access_requests "https://github.com/ashhh02/accrediflow/blob/main/src/lib/accessRequests.ts"
click node_permissions "https://github.com/ashhh02/accrediflow/blob/main/src/lib/permissions.ts"
click node_users "https://github.com/ashhh02/accrediflow/blob/main/src/lib/systemUsers.ts"
click node_catalogue "https://github.com/ashhh02/accrediflow/blob/main/src/data/accreditationStructure.ts"
click node_repository "https://github.com/ashhh02/accrediflow/blob/main/src/components/modules/DocumentRepositoryView.tsx"
click node_review "https://github.com/ashhh02/accrediflow/blob/main/src/components/modules/ReviewSubmissionsView.tsx"
click node_evidence_store "https://github.com/ashhh02/accrediflow/blob/main/src/lib/evidenceStore.ts"
click node_progress "https://github.com/ashhh02/accrediflow/blob/main/src/lib/repositoryProgress.ts"
click node_repository_cards "https://github.com/ashhh02/accrediflow/blob/main/src/components/ProgramRepositoryCards.tsx"
click node_tasks "https://github.com/ashhh02/accrediflow/blob/main/src/components/modules/TasksView.tsx"
click node_analytics "https://github.com/ashhh02/accrediflow/blob/main/src/components/modules/AnalyticsView.tsx"
click node_calendar "https://github.com/ashhh02/accrediflow/blob/main/src/context/CalendarContext.tsx"
click node_notifications "https://github.com/ashhh02/accrediflow/blob/main/src/lib/notificationsStore.ts"
click node_program_admin "https://github.com/ashhh02/accrediflow/blob/main/src/components/modules/ProgramAreaManager.tsx"
click node_chat_ui "https://github.com/ashhh02/accrediflow/blob/main/src/components/modules/ChatView.tsx"
click node_chat_api "https://github.com/ashhh02/accrediflow/blob/main/api/chat.ts"
click node_aira_api "https://github.com/ashhh02/accrediflow/blob/main/api/aira-query.ts"
click node_server "https://github.com/ashhh02/accrediflow/blob/main/server.ts"
click node_supabase_client "https://github.com/ashhh02/accrediflow/blob/main/src/lib/supabase.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_auth,node_accounts,node_access_requests,node_permissions,node_users,node_staff,node_supabase_client toneBlue
class node_catalogue,node_repository,node_review,node_evidence_store,node_progress,node_repository_cards,node_supabase toneAmber
class node_tasks,node_analytics,node_calendar,node_notifications,node_program_admin toneMint
class node_chat_ui,node_chat_api,node_aira_api,node_server toneRose
```

## Components

### Access and roles

- [App entry](https://github.com/ashhh02/accrediflow/blob/main/src/App.tsx): `src/App.tsx`
- [Authentication](https://github.com/ashhh02/accrediflow/blob/main/src/context/AuthContext.tsx): `src/context/AuthContext.tsx`
- [Role accounts](https://github.com/ashhh02/accrediflow/blob/main/src/data/authAccounts.ts): `src/data/authAccounts.ts`
- [Access requests](https://github.com/ashhh02/accrediflow/blob/main/src/lib/accessRequests.ts): `src/lib/accessRequests.ts`
- [Permissions](https://github.com/ashhh02/accrediflow/blob/main/src/lib/permissions.ts): `src/lib/permissions.ts`
- [User administration](https://github.com/ashhh02/accrediflow/blob/main/src/lib/systemUsers.ts): `src/lib/systemUsers.ts`

### Evidence workflow

- [PACUCOA catalogue](https://github.com/ashhh02/accrediflow/blob/main/src/data/accreditationStructure.ts): `src/data/accreditationStructure.ts`
- [Evidence repository](https://github.com/ashhh02/accrediflow/blob/main/src/components/modules/DocumentRepositoryView.tsx): `src/components/modules/DocumentRepositoryView.tsx`
- [Evidence review](https://github.com/ashhh02/accrediflow/blob/main/src/components/modules/ReviewSubmissionsView.tsx): `src/components/modules/ReviewSubmissionsView.tsx`
- [Submission records](https://github.com/ashhh02/accrediflow/blob/main/src/lib/evidenceStore.ts): `src/lib/evidenceStore.ts`
- [Readiness progress](https://github.com/ashhh02/accrediflow/blob/main/src/lib/repositoryProgress.ts): `src/lib/repositoryProgress.ts`
- [Program readiness cards](https://github.com/ashhh02/accrediflow/blob/main/src/components/ProgramRepositoryCards.tsx): `src/components/ProgramRepositoryCards.tsx`

### Tasks and oversight

- [Task management](https://github.com/ashhh02/accrediflow/blob/main/src/components/modules/TasksView.tsx): `src/components/modules/TasksView.tsx`
- [Analytics](https://github.com/ashhh02/accrediflow/blob/main/src/components/modules/AnalyticsView.tsx): `src/components/modules/AnalyticsView.tsx`
- [Calendar context](https://github.com/ashhh02/accrediflow/blob/main/src/context/CalendarContext.tsx): `src/context/CalendarContext.tsx`
- [Notifications](https://github.com/ashhh02/accrediflow/blob/main/src/lib/notificationsStore.ts): `src/lib/notificationsStore.ts`
- [Program administration](https://github.com/ashhh02/accrediflow/blob/main/src/components/modules/ProgramAreaManager.tsx): `src/components/modules/ProgramAreaManager.tsx`

### Assistant and services

- [Assistant interface](https://github.com/ashhh02/accrediflow/blob/main/src/components/modules/ChatView.tsx): `src/components/modules/ChatView.tsx`
- [Assistant API](https://github.com/ashhh02/accrediflow/blob/main/api/chat.ts): `api/chat.ts`
- [Aira query API](https://github.com/ashhh02/accrediflow/blob/main/api/aira-query.ts): `api/aira-query.ts`
- [API server](https://github.com/ashhh02/accrediflow/blob/main/server.ts): `server.ts`

### Other components

- **Accreditation users**
- [Supabase client](https://github.com/ashhh02/accrediflow/blob/main/src/lib/supabase.ts): `src/lib/supabase.ts`
- **Supabase database**

## Connections

- Accreditation users → App entry: uses (evidence: `README.md`)
- App entry → Authentication: provides auth (evidence: `src/App.tsx`)
- Authentication → Role accounts: resolves roles (evidence: `src/context/AuthContext.tsx`)
- Role accounts → Access requests: checks requests (evidence: `src/data/authAccounts.ts`)
- Accreditation users → Evidence repository: uploads evidence (evidence: `README.md`)
- Evidence repository → PACUCOA catalogue: uses checklist (evidence: `src/components/modules/DocumentRepositoryView.tsx`)
- Evidence repository → Submission records: reads and writes (evidence: `src/components/modules/DocumentRepositoryView.tsx`)
- Evidence review → Submission records: reviews submissions (evidence: `README.md`)
- Accreditation users → Evidence review: reviews by role (evidence: `README.md`)
- Submission records → Readiness progress: supplies submissions (evidence: `src/lib/repositoryProgress.ts`)
- Readiness progress → Program readiness cards: provides readiness (evidence: `src/components/ProgramRepositoryCards.tsx`)
- Accreditation users → Task management: completes tasks (evidence: `README.md`)
- Accreditation users → Analytics: views readiness (evidence: `README.md`)
- Accreditation users → Calendar context: uses calendar (evidence: `README.md`)
- Access requests → Notifications: pushes notifications (evidence: `src/lib/accessRequests.ts`)
- Accreditation users → Program administration: manages programs (evidence: `README.md`)
- Accreditation users → Assistant interface: uses assistant (evidence: `README.md`)
- API server → Assistant API: routes requests (evidence: `server.ts`)
- API server → Aira query API: routes requests (evidence: `server.ts`)
- Authentication → Supabase client: uses client (evidence: `src/context/AuthContext.tsx`)
- Submission records → Supabase client: uses client (evidence: `src/lib/evidenceStore.ts`)
- Notifications → Supabase client: uses client (evidence: `src/lib/notificationsStore.ts`)
- Supabase client → Supabase database: connects (evidence: `src/lib/supabase.ts`)
