# jiel109/unified-clearance-information-system architecture

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

- Interactive diagram: https://gitdiagram.com/jiel109/unified-clearance-information-system
- Repository: https://github.com/jiel109/unified-clearance-information-system

## Overview

UCIS is a role-based clearance and document-processing web app. Users sign in, then students submit and track document requests; department staff record approvals or holds; registrars audit requests; and clerks schedule pickup and mark releases. Admins manage accounts. The UI delegates request, schedule, account, and authentication operations to services backed by Supabase. The README also describes student records, but the sampled layout does not show how that page is reached; unsampled source relationships are omitted or marked unverified.

Main entry points: [`src/components/AppLayout.tsx`](https://github.com/jiel109/unified-clearance-information-system/blob/main/src/components/AppLayout.tsx) (Role Layout), [`src/components/AuthGate.tsx`](https://github.com/jiel109/unified-clearance-information-system/blob/main/src/components/AuthGate.tsx) (Auth Gate), [`src/services/auth_service.ts`](https://github.com/jiel109/unified-clearance-information-system/blob/main/src/services/auth_service.ts) (Authentication Service), [`src/services/request_service.ts`](https://github.com/jiel109/unified-clearance-information-system/blob/main/src/services/request_service.ts) (Request Service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Application and Access"]
  node_app["App<br/>[App.tsx]"]
  node_authgate["Auth Gate<br/>[AuthGate.tsx]"]
  node_login["Login<br/>[LoginPage.tsx]"]
  node_layout["Role Layout<br/>[AppLayout.tsx]"]
  node_navbar["Navigation<br/>[NavBar.tsx]"]
  node_profile["Profile Modal<br/>[ProfileModal.tsx]"]
end

subgraph group_workflows["Clearance Workflows"]
  node_student["Student Requests"]
  node_requestmodal["Request Modal<br/>[RequestModal.tsx]"]
  node_department["Department Clearance"]
  node_registrar["Registrar Audit"]
  node_scheduling["Pickup Scheduling<br/>[SchedulingPage.tsx]"]
  node_confirmation["Confirmation Modal"]
end

subgraph group_admin["Administration"]
  node_records["Student Records"]
  node_studentform["Student Form"]
  node_accounts["Account Management"]
end

subgraph group_services["Services and Data"]
  node_authsvc["Authentication Service<br/>[auth_service.ts]"]
  node_requestsvc["Request Service<br/>[request_service.ts]"]
  node_schedulesvc["Schedule Service"]
  node_adminsvc["Admin Service<br/>[admin_service.ts]"]
end

node_user(("User"))
node_supabase[("Supabase")]

node_user -->|"uses"| node_app
node_app -->|"renders"| node_authgate
node_authgate -->|"checks session"| node_authsvc
node_authgate -->|"shows signed out"| node_login
node_authgate -->|"shows signed in"| node_layout
node_login -->|"authenticates"| node_authsvc
node_layout -->|"renders"| node_navbar
node_layout -->|"renders"| node_profile
node_layout -->|"signs out"| node_authsvc
node_layout -->|"loads and updates"| node_requestsvc
node_layout -->|"updates pickup"| node_schedulesvc
node_layout -->|"routes requests"| node_student
node_layout -->|"routes clearance"| node_department
node_layout -->|"routes audit"| node_registrar
node_layout -->|"routes pickup"| node_scheduling
node_layout -->|"routes accounts"| node_accounts
node_student -->|"opens request form"| node_requestmodal
node_student -->|"shows confirmation"| node_confirmation
node_department -->|"records decisions"| node_requestsvc
node_registrar -->|"reads request data"| node_requestsvc
node_scheduling -->|"shows confirmation"| node_confirmation
node_scheduling -->|"requests pickup changes"| node_schedulesvc
node_accounts -->|"manages accounts"| node_adminsvc
node_records -->|"uses form"| node_studentform
node_authsvc -->|"auth and RPC"| node_supabase
node_requestsvc -->|"reads and writes"| node_supabase
node_schedulesvc -->|"updates pickup"| node_supabase
node_adminsvc -->|"account RPCs"| node_supabase
node_layout -.->|"page access unclear"| node_records

click node_app "https://github.com/jiel109/unified-clearance-information-system/blob/main/src/App.tsx"
click node_authgate "https://github.com/jiel109/unified-clearance-information-system/blob/main/src/components/AuthGate.tsx"
click node_login "https://github.com/jiel109/unified-clearance-information-system/blob/main/src/pages/LoginPage.tsx"
click node_layout "https://github.com/jiel109/unified-clearance-information-system/blob/main/src/components/AppLayout.tsx"
click node_navbar "https://github.com/jiel109/unified-clearance-information-system/blob/main/src/components/NavBar.tsx"
click node_profile "https://github.com/jiel109/unified-clearance-information-system/blob/main/src/components/ProfileModal.tsx"
click node_student "https://github.com/jiel109/unified-clearance-information-system/blob/main/src/pages/StudentDashboard.tsx"
click node_requestmodal "https://github.com/jiel109/unified-clearance-information-system/blob/main/src/components/RequestModal.tsx"
click node_department "https://github.com/jiel109/unified-clearance-information-system/blob/main/src/pages/DepartmentClearancePage.tsx"
click node_registrar "https://github.com/jiel109/unified-clearance-information-system/blob/main/src/pages/RegistrarDashboard.tsx"
click node_scheduling "https://github.com/jiel109/unified-clearance-information-system/blob/main/src/pages/SchedulingPage.tsx"
click node_confirmation "https://github.com/jiel109/unified-clearance-information-system/blob/main/src/components/ConfirmationModal.tsx"
click node_records "https://github.com/jiel109/unified-clearance-information-system/blob/main/src/pages/StudentRecordsPage.tsx"
click node_studentform "https://github.com/jiel109/unified-clearance-information-system/blob/main/src/components/StudentFormModal.tsx"
click node_accounts "https://github.com/jiel109/unified-clearance-information-system/blob/main/src/pages/AccountManagementPage.tsx"
click node_authsvc "https://github.com/jiel109/unified-clearance-information-system/blob/main/src/services/auth_service.ts"
click node_requestsvc "https://github.com/jiel109/unified-clearance-information-system/blob/main/src/services/request_service.ts"
click node_schedulesvc "https://github.com/jiel109/unified-clearance-information-system/blob/main/src/services/schedule_service.ts"
click node_adminsvc "https://github.com/jiel109/unified-clearance-information-system/blob/main/src/services/admin_service.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_authgate,node_login,node_layout,node_navbar,node_profile,node_user toneBlue
class node_student,node_requestmodal,node_department,node_registrar,node_scheduling,node_confirmation,node_supabase toneAmber
class node_records,node_studentform,node_accounts toneMint
class node_authsvc,node_requestsvc,node_schedulesvc,node_adminsvc toneRose
```

## Components

### Application and Access

- [App](https://github.com/jiel109/unified-clearance-information-system/blob/main/src/App.tsx): `src/App.tsx`
- [Auth Gate](https://github.com/jiel109/unified-clearance-information-system/blob/main/src/components/AuthGate.tsx): `src/components/AuthGate.tsx`
- [Login](https://github.com/jiel109/unified-clearance-information-system/blob/main/src/pages/LoginPage.tsx): `src/pages/LoginPage.tsx`
- [Role Layout](https://github.com/jiel109/unified-clearance-information-system/blob/main/src/components/AppLayout.tsx): `src/components/AppLayout.tsx`
- [Navigation](https://github.com/jiel109/unified-clearance-information-system/blob/main/src/components/NavBar.tsx): `src/components/NavBar.tsx`
- [Profile Modal](https://github.com/jiel109/unified-clearance-information-system/blob/main/src/components/ProfileModal.tsx): `src/components/ProfileModal.tsx`

### Clearance Workflows

- [Student Requests](https://github.com/jiel109/unified-clearance-information-system/blob/main/src/pages/StudentDashboard.tsx): `src/pages/StudentDashboard.tsx`
- [Request Modal](https://github.com/jiel109/unified-clearance-information-system/blob/main/src/components/RequestModal.tsx): `src/components/RequestModal.tsx`
- [Department Clearance](https://github.com/jiel109/unified-clearance-information-system/blob/main/src/pages/DepartmentClearancePage.tsx): `src/pages/DepartmentClearancePage.tsx`
- [Registrar Audit](https://github.com/jiel109/unified-clearance-information-system/blob/main/src/pages/RegistrarDashboard.tsx): `src/pages/RegistrarDashboard.tsx`
- [Pickup Scheduling](https://github.com/jiel109/unified-clearance-information-system/blob/main/src/pages/SchedulingPage.tsx): `src/pages/SchedulingPage.tsx`
- [Confirmation Modal](https://github.com/jiel109/unified-clearance-information-system/blob/main/src/components/ConfirmationModal.tsx): `src/components/ConfirmationModal.tsx`

### Administration

- [Student Records](https://github.com/jiel109/unified-clearance-information-system/blob/main/src/pages/StudentRecordsPage.tsx): `src/pages/StudentRecordsPage.tsx`
- [Student Form](https://github.com/jiel109/unified-clearance-information-system/blob/main/src/components/StudentFormModal.tsx): `src/components/StudentFormModal.tsx`
- [Account Management](https://github.com/jiel109/unified-clearance-information-system/blob/main/src/pages/AccountManagementPage.tsx): `src/pages/AccountManagementPage.tsx`

### Services and Data

- [Authentication Service](https://github.com/jiel109/unified-clearance-information-system/blob/main/src/services/auth_service.ts): `src/services/auth_service.ts`
- [Request Service](https://github.com/jiel109/unified-clearance-information-system/blob/main/src/services/request_service.ts): `src/services/request_service.ts`
- [Schedule Service](https://github.com/jiel109/unified-clearance-information-system/blob/main/src/services/schedule_service.ts): `src/services/schedule_service.ts`
- [Admin Service](https://github.com/jiel109/unified-clearance-information-system/blob/main/src/services/admin_service.ts): `src/services/admin_service.ts`

### Other components

- **User**
- **Supabase**

## Connections

- User → App: uses (evidence: `README.md`)
- App → Auth Gate: renders (evidence: `src/App.tsx`)
- Auth Gate → Authentication Service: checks session (evidence: `src/components/AuthGate.tsx`)
- Auth Gate → Login: shows signed out (evidence: `src/components/AuthGate.tsx`)
- Auth Gate → Role Layout: shows signed in (evidence: `src/components/AuthGate.tsx`)
- Login → Authentication Service: authenticates (evidence: `src/pages/LoginPage.tsx`)
- Role Layout → Navigation: renders (evidence: `src/components/AppLayout.tsx`)
- Role Layout → Profile Modal: renders (evidence: `src/components/AppLayout.tsx`)
- Role Layout → Authentication Service: signs out (evidence: `src/components/AppLayout.tsx`)
- Role Layout → Request Service: loads and updates (evidence: `src/components/AppLayout.tsx`)
- Role Layout → Schedule Service: updates pickup (evidence: `src/components/AppLayout.tsx`)
- Role Layout → Student Requests: routes requests (evidence: `src/components/AppLayout.tsx`)
- Role Layout → Department Clearance: routes clearance (evidence: `src/components/AppLayout.tsx`)
- Role Layout → Registrar Audit: routes audit (evidence: `src/components/AppLayout.tsx`)
- Role Layout → Pickup Scheduling: routes pickup (evidence: `src/components/AppLayout.tsx`)
- Role Layout → Account Management: routes accounts (evidence: `src/components/AppLayout.tsx`)
- Student Requests → Request Modal: opens request form (evidence: `src/pages/StudentDashboard.tsx`)
- Student Requests → Confirmation Modal: shows confirmation (evidence: `src/pages/StudentDashboard.tsx`)
- Department Clearance → Request Service: records decisions (evidence: `src/components/AppLayout.tsx`)
- Registrar Audit → Request Service: reads request data (evidence: `src/components/AppLayout.tsx`)
- Pickup Scheduling → Confirmation Modal: shows confirmation (evidence: `src/pages/SchedulingPage.tsx`)
- Pickup Scheduling → Schedule Service: requests pickup changes (evidence: `src/components/AppLayout.tsx`)
- Account Management → Admin Service: manages accounts (evidence: `src/pages/AccountManagementPage.tsx`)
- Student Records → Student Form: uses form (evidence: `src/pages/StudentRecordsPage.tsx`)
- Authentication Service → Supabase: auth and RPC (evidence: `src/services/auth_service.ts`)
- Request Service → Supabase: reads and writes (evidence: `src/services/request_service.ts`)
- Schedule Service → Supabase: updates pickup (evidence: `src/services/schedule_service.ts`)
- Admin Service → Supabase: account RPCs (evidence: `src/services/admin_service.ts`)
- Role Layout → Student Records: page access unclear
