# basy110/-basak- architecture

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

- Interactive diagram: https://gitdiagram.com/basy110/-basak-
- Repository: https://github.com/basy110/-basak-

## Overview

Basak is a university bus-subscription system with an admin dashboard, mobile apps, and a Supabase backend. The available source supports a detailed map of the dashboard’s authentication, company/platform workspaces, and administrative capabilities, plus the documented backend boundary. Mobile application runtime files and most backend implementations are absent from the supplied tree, so those are represented only at the documented system level; feature-level edges are limited to route evidence and README statements.

Main entry points: [`admin_web/src/areas/Workspace.tsx`](https://github.com/basy110/-basak-/blob/main/admin_web/src/areas/Workspace.tsx) (Company workspace), [`admin_web/src/areas/PlatformArea.tsx`](https://github.com/basy110/-basak-/blob/main/admin_web/src/areas/PlatformArea.tsx) (Platform workspace), [`admin_web/src/App.tsx`](https://github.com/basy110/-basak-/blob/main/admin_web/src/App.tsx) (Dashboard app), [`admin_web/src/lib/routes.ts`](https://github.com/basy110/-basak-/blob/main/admin_web/src/lib/routes.ts) (Page routing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_dashboard["Admin dashboard"]
  node_app["Dashboard app<br/>[App.tsx]"]
  node_routing["Page routing<br/>[routes.ts]"]
  node_query_cache["Scoped query cache<br/>[query.ts]"]
end

subgraph group_workspace["Company operations"]
  node_workspace_shell["Company workspace<br/>[Workspace.tsx]"]
  node_today["Daily overview<br/>[TodayPage.tsx]"]
  node_lines["Bus lines<br/>[LinesPage.tsx]"]
  node_students["Student subscriptions<br/>[StudentsPage.tsx]"]
  node_receipts["Receipt review<br/>[ReceiptsPage.tsx]"]
  node_team["Staff management<br/>[TeamPage.tsx]"]
  node_notifications["Notifications"]
  node_reporting["Reports and analytics<br/>[ReportsPage.tsx]"]
end

subgraph group_platform["Platform management"]
  node_platform_area["Platform workspace<br/>[PlatformArea.tsx]"]
  node_companies["Company administration<br/>[CompaniesPage.tsx]"]
  node_platform_students["Platform students"]
  node_offers["Merchants and offers<br/>[OffersPage.tsx]"]
  node_platform_billing["Platform billing"]
  node_platform_analytics["Platform analytics"]
end

subgraph group_backend["Cloud backend"]
  node_supabase[("Supabase services")]
  node_edge_functions["Edge functions"]
end

node_admin(("Admin user"))

node_admin -->|"opens"| node_app
node_app -->|"selects pages"| node_routing
node_routing -->|"routes to"| node_workspace_shell
node_workspace_shell -->|"routes to"| node_today
node_workspace_shell -->|"routes to"| node_lines
node_workspace_shell -->|"routes to"| node_students
node_workspace_shell -->|"routes to"| node_receipts
node_workspace_shell -->|"routes to"| node_team
node_workspace_shell -->|"routes to"| node_notifications
node_workspace_shell -->|"routes to"| node_reporting
node_app -->|"routes to"| node_platform_area
node_platform_area -->|"routes to"| node_companies
node_platform_area -->|"routes to"| node_platform_students
node_platform_area -->|"routes to"| node_offers
node_platform_area -->|"routes to"| node_platform_billing
node_platform_area -->|"routes to"| node_platform_analytics
node_app -->|"configures"| node_query_cache
node_workspace_shell -->|"uses cloud backend"| node_supabase
node_platform_area -->|"uses cloud backend"| node_supabase
node_supabase -->|"provides functions"| node_edge_functions

click node_app "https://github.com/basy110/-basak-/blob/main/admin_web/src/App.tsx"
click node_routing "https://github.com/basy110/-basak-/blob/main/admin_web/src/lib/routes.ts"
click node_workspace_shell "https://github.com/basy110/-basak-/blob/main/admin_web/src/areas/Workspace.tsx"
click node_today "https://github.com/basy110/-basak-/blob/main/admin_web/src/pages/TodayPage.tsx"
click node_lines "https://github.com/basy110/-basak-/blob/main/admin_web/src/pages/LinesPage.tsx"
click node_students "https://github.com/basy110/-basak-/blob/main/admin_web/src/pages/StudentsPage.tsx"
click node_receipts "https://github.com/basy110/-basak-/blob/main/admin_web/src/pages/ReceiptsPage.tsx"
click node_team "https://github.com/basy110/-basak-/blob/main/admin_web/src/pages/TeamPage.tsx"
click node_notifications "https://github.com/basy110/-basak-/blob/main/admin_web/src/pages/NotificationsPage.tsx"
click node_reporting "https://github.com/basy110/-basak-/blob/main/admin_web/src/pages/ReportsPage.tsx"
click node_platform_area "https://github.com/basy110/-basak-/blob/main/admin_web/src/areas/PlatformArea.tsx"
click node_companies "https://github.com/basy110/-basak-/blob/main/admin_web/src/pages/platform/CompaniesPage.tsx"
click node_platform_students "https://github.com/basy110/-basak-/blob/main/admin_web/src/pages/platform/AllStudentsPage.tsx"
click node_offers "https://github.com/basy110/-basak-/blob/main/admin_web/src/pages/platform/OffersPage.tsx"
click node_platform_billing "https://github.com/basy110/-basak-/blob/main/admin_web/src/pages/platform/PlatformBillingPage.tsx"
click node_platform_analytics "https://github.com/basy110/-basak-/blob/main/admin_web/src/pages/platform/PlatformAnalyticsPage.tsx"
click node_query_cache "https://github.com/basy110/-basak-/blob/main/admin_web/src/lib/query.ts"
click node_edge_functions "https://github.com/basy110/-basak-/tree/main/supabase/functions"

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_routing,node_query_cache,node_admin toneBlue
class node_workspace_shell,node_today,node_lines,node_students,node_receipts,node_team,node_notifications,node_reporting toneAmber
class node_platform_area,node_companies,node_platform_students,node_offers,node_platform_billing,node_platform_analytics toneMint
class node_supabase,node_edge_functions toneRose
```

## Components

### Admin dashboard

- [Dashboard app](https://github.com/basy110/-basak-/blob/main/admin_web/src/App.tsx): `admin_web/src/App.tsx`
- [Page routing](https://github.com/basy110/-basak-/blob/main/admin_web/src/lib/routes.ts): `admin_web/src/lib/routes.ts`
- [Scoped query cache](https://github.com/basy110/-basak-/blob/main/admin_web/src/lib/query.ts): `admin_web/src/lib/query.ts`

### Company operations

- [Company workspace](https://github.com/basy110/-basak-/blob/main/admin_web/src/areas/Workspace.tsx): `admin_web/src/areas/Workspace.tsx`
- [Daily overview](https://github.com/basy110/-basak-/blob/main/admin_web/src/pages/TodayPage.tsx): `admin_web/src/pages/TodayPage.tsx`
- [Bus lines](https://github.com/basy110/-basak-/blob/main/admin_web/src/pages/LinesPage.tsx): `admin_web/src/pages/LinesPage.tsx`
- [Student subscriptions](https://github.com/basy110/-basak-/blob/main/admin_web/src/pages/StudentsPage.tsx): `admin_web/src/pages/StudentsPage.tsx`
- [Receipt review](https://github.com/basy110/-basak-/blob/main/admin_web/src/pages/ReceiptsPage.tsx): `admin_web/src/pages/ReceiptsPage.tsx`
- [Staff management](https://github.com/basy110/-basak-/blob/main/admin_web/src/pages/TeamPage.tsx): `admin_web/src/pages/TeamPage.tsx`
- [Notifications](https://github.com/basy110/-basak-/blob/main/admin_web/src/pages/NotificationsPage.tsx): `admin_web/src/pages/NotificationsPage.tsx`
- [Reports and analytics](https://github.com/basy110/-basak-/blob/main/admin_web/src/pages/ReportsPage.tsx): `admin_web/src/pages/ReportsPage.tsx`

### Platform management

- [Platform workspace](https://github.com/basy110/-basak-/blob/main/admin_web/src/areas/PlatformArea.tsx): `admin_web/src/areas/PlatformArea.tsx`
- [Company administration](https://github.com/basy110/-basak-/blob/main/admin_web/src/pages/platform/CompaniesPage.tsx): `admin_web/src/pages/platform/CompaniesPage.tsx`
- [Platform students](https://github.com/basy110/-basak-/blob/main/admin_web/src/pages/platform/AllStudentsPage.tsx): `admin_web/src/pages/platform/AllStudentsPage.tsx`
- [Merchants and offers](https://github.com/basy110/-basak-/blob/main/admin_web/src/pages/platform/OffersPage.tsx): `admin_web/src/pages/platform/OffersPage.tsx`
- [Platform billing](https://github.com/basy110/-basak-/blob/main/admin_web/src/pages/platform/PlatformBillingPage.tsx): `admin_web/src/pages/platform/PlatformBillingPage.tsx`
- [Platform analytics](https://github.com/basy110/-basak-/blob/main/admin_web/src/pages/platform/PlatformAnalyticsPage.tsx): `admin_web/src/pages/platform/PlatformAnalyticsPage.tsx`

### Cloud backend

- **Supabase services**
- [Edge functions](https://github.com/basy110/-basak-/tree/main/supabase/functions): `supabase/functions`

### Other components

- **Admin user**

## Connections

- Admin user → Dashboard app: opens (evidence: `README.md`)
- Dashboard app → Page routing: selects pages (evidence: `admin_web/src/App.tsx`)
- Page routing → Company workspace: routes to (evidence: `admin_web/src/lib/routes.ts`)
- Company workspace → Daily overview: routes to (evidence: `admin_web/src/areas/Workspace.tsx`)
- Company workspace → Bus lines: routes to (evidence: `admin_web/src/areas/Workspace.tsx`)
- Company workspace → Student subscriptions: routes to (evidence: `admin_web/src/areas/Workspace.tsx`)
- Company workspace → Receipt review: routes to (evidence: `admin_web/src/areas/Workspace.tsx`)
- Company workspace → Staff management: routes to (evidence: `admin_web/src/areas/Workspace.tsx`)
- Company workspace → Notifications: routes to (evidence: `admin_web/src/areas/Workspace.tsx`)
- Company workspace → Reports and analytics: routes to (evidence: `admin_web/src/lib/routes.ts`)
- Dashboard app → Platform workspace: routes to (evidence: `admin_web/src/App.tsx`)
- Platform workspace → Company administration: routes to (evidence: `admin_web/src/lib/routes.ts`)
- Platform workspace → Platform students: routes to (evidence: `admin_web/src/lib/routes.ts`)
- Platform workspace → Merchants and offers: routes to (evidence: `admin_web/src/lib/routes.ts`)
- Platform workspace → Platform billing: routes to (evidence: `admin_web/src/lib/routes.ts`)
- Platform workspace → Platform analytics: routes to (evidence: `admin_web/src/lib/routes.ts`)
- Dashboard app → Scoped query cache: configures (evidence: `admin_web/src/App.tsx`)
- Company workspace → Supabase services: uses cloud backend (evidence: `README.md`)
- Platform workspace → Supabase services: uses cloud backend (evidence: `README.md`)
- Supabase services → Edge functions: provides functions (evidence: `README.md`)
