# psabhishek298-sys/clint-manegement-system architecture

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

- Interactive diagram: https://gitdiagram.com/psabhishek298-sys/clint-manegement-system
- Repository: https://github.com/psabhishek298-sys/clint-manegement-system

## Overview

TRUQEN CRM manages sales leads through client onboarding, outreach and follow-up, demo tracking, and conversion/completion, with dashboards and reporting across the lifecycle. The routed React app uses shared auth and client contexts; the client context persists records through Supabase. Edges reflect shown routes, imports, calls, or README statements. Some feature pages are indexed but not excerpted, so their detailed internal behavior is not inferred.

Main entry points: [`src/App.tsx`](https://github.com/psabhishek298-sys/clint-manegement-system/blob/main/src/App.tsx) (App Router), [`src/context/ClientContext.tsx`](https://github.com/psabhishek298-sys/clint-manegement-system/blob/main/src/context/ClientContext.tsx) (Client Context), [`src/pages/Dashboard.tsx`](https://github.com/psabhishek298-sys/clint-manegement-system/blob/main/src/pages/Dashboard.tsx) (Executive Dashboard), [`src/pages/AllClients.tsx`](https://github.com/psabhishek298-sys/clint-manegement-system/blob/main/src/pages/AllClients.tsx) (Client Directory)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App Shell"]
  node_app["App Router<br/>[App.tsx]"]
  node_layout["Dashboard Layout"]
  node_sidebar["Navigation<br/>[Sidebar.tsx]"]
  node_theme["Theme State<br/>[ThemeContext.tsx]"]
end

subgraph group_lifecycle["Client Lifecycle"]
  node_clientstate["Client Context<br/>[ClientContext.tsx]"]
  node_onboard["Client Onboarding<br/>[AddClient.tsx]"]
  node_clientform["Client Form<br/>[ClientForm.tsx]"]
  node_clientlist["Client Directory<br/>[AllClients.tsx]"]
  node_filters["Client Filters<br/>[ClientFilters.tsx]"]
  node_table["Client Table<br/>[ClientTable.tsx]"]
  node_details["Client Profile<br/>[ClientDetails.tsx]"]
  node_followups["Follow-up Manager<br/>[FollowUps.tsx]"]
  node_demos["Demo Projects<br/>[DemoProjects.tsx]"]
  node_completed["Completed Projects"]
  node_categories["Category Manager<br/>[Categories.tsx]"]
  node_importpage["Client Import<br/>[ImportClients.tsx]"]
  node_excel["Spreadsheet Parser<br/>[excelImport.ts]"]
  node_cashfund["Cash Fund<br/>[CashFund.tsx]"]
  node_helpers["CRM Utilities<br/>[helpers.ts]"]
end

subgraph group_insights["Insights and Reporting"]
  node_dashboard["Executive Dashboard<br/>[Dashboard.tsx]"]
  node_activity["Activity Feed<br/>[ActivityFeed.tsx]"]
  node_statuschart["Status Overview"]
  node_categorychart["Category Distribution"]
  node_alerts["Follow-up Alerts<br/>[FollowUpAlerts.tsx]"]
end

subgraph group_platform["Identity and Persistence"]
  node_login["Sign In<br/>[Login.tsx]"]
  node_auth["Auth Context<br/>[AuthContext.tsx]"]
  node_supabase["Supabase Client<br/>[supabase.ts]"]
  node_settings["Settings<br/>[Settings.tsx]"]
end

node_staff(("CRM Staff"))
node_remote[("Supabase Backend")]

node_staff -->|"signs in"| node_login
node_login -->|"requests auth"| node_auth
node_auth -->|"uses client"| node_supabase
node_supabase -->|"auth and data"| node_remote
node_app -->|"provides state"| node_auth
node_app -->|"provides state"| node_clientstate
node_app -->|"provides theme"| node_theme
node_app -->|"routes through"| node_layout
node_app -->|"routes to"| node_login
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_clientlist
node_app -->|"routes to"| node_onboard
node_app -->|"routes to"| node_details
node_app -->|"routes to"| node_followups
node_app -->|"routes to"| node_demos
node_app -->|"routes to"| node_categories
node_app -->|"routes to"| node_importpage
node_app -->|"routes to"| node_completed
node_app -->|"routes to"| node_cashfund
node_app -->|"routes to"| node_settings
node_layout -->|"renders"| node_sidebar
node_onboard -->|"renders"| node_clientform
node_clientform -->|"reads categories"| node_clientstate
node_onboard -->|"adds client"| node_clientstate
node_clientlist -->|"reads clients"| node_clientstate
node_clientlist -->|"renders"| node_filters
node_clientlist -->|"renders"| node_table
node_clientlist -->|"filters and exports"| node_helpers
node_table -->|"exports selected"| node_helpers
node_details -->|"reads and updates"| node_clientstate
node_details -->|"renders edit form"| node_clientform
node_followups -->|"manages schedules"| node_clientstate
node_demos -->|"updates demos"| node_clientstate
node_completed -->|"reads clients"| node_clientstate
node_categories -->|"manages categories"| node_clientstate
node_importpage -->|"parses workbook"| node_excel
node_importpage -->|"imports records"| node_clientstate
node_clientstate -->|"persists records"| node_supabase
node_dashboard -->|"reads client data"| node_clientstate
node_dashboard -->|"renders"| node_activity
node_dashboard -->|"renders"| node_statuschart
node_dashboard -->|"renders"| node_categorychart
node_dashboard -->|"renders"| node_alerts
node_settings -->|"controls theme"| node_theme
node_settings -->|"resets legacy data"| node_clientstate
node_settings -->|"checks configuration"| node_supabase
node_cashfund -->|"reads clients"| node_clientstate

click node_app "https://github.com/psabhishek298-sys/clint-manegement-system/blob/main/src/App.tsx"
click node_layout "https://github.com/psabhishek298-sys/clint-manegement-system/blob/main/src/components/layout/DashboardLayout.tsx"
click node_sidebar "https://github.com/psabhishek298-sys/clint-manegement-system/blob/main/src/components/layout/Sidebar.tsx"
click node_theme "https://github.com/psabhishek298-sys/clint-manegement-system/blob/main/src/context/ThemeContext.tsx"
click node_login "https://github.com/psabhishek298-sys/clint-manegement-system/blob/main/src/pages/Login.tsx"
click node_auth "https://github.com/psabhishek298-sys/clint-manegement-system/blob/main/src/context/AuthContext.tsx"
click node_supabase "https://github.com/psabhishek298-sys/clint-manegement-system/blob/main/src/services/supabase.ts"
click node_clientstate "https://github.com/psabhishek298-sys/clint-manegement-system/blob/main/src/context/ClientContext.tsx"
click node_onboard "https://github.com/psabhishek298-sys/clint-manegement-system/blob/main/src/pages/AddClient.tsx"
click node_clientform "https://github.com/psabhishek298-sys/clint-manegement-system/blob/main/src/components/clients/ClientForm.tsx"
click node_clientlist "https://github.com/psabhishek298-sys/clint-manegement-system/blob/main/src/pages/AllClients.tsx"
click node_filters "https://github.com/psabhishek298-sys/clint-manegement-system/blob/main/src/components/clients/ClientFilters.tsx"
click node_table "https://github.com/psabhishek298-sys/clint-manegement-system/blob/main/src/components/clients/ClientTable.tsx"
click node_details "https://github.com/psabhishek298-sys/clint-manegement-system/blob/main/src/pages/ClientDetails.tsx"
click node_followups "https://github.com/psabhishek298-sys/clint-manegement-system/blob/main/src/pages/FollowUps.tsx"
click node_demos "https://github.com/psabhishek298-sys/clint-manegement-system/blob/main/src/pages/DemoProjects.tsx"
click node_completed "https://github.com/psabhishek298-sys/clint-manegement-system/blob/main/src/pages/CompletedProjects.tsx"
click node_categories "https://github.com/psabhishek298-sys/clint-manegement-system/blob/main/src/pages/Categories.tsx"
click node_importpage "https://github.com/psabhishek298-sys/clint-manegement-system/blob/main/src/pages/ImportClients.tsx"
click node_excel "https://github.com/psabhishek298-sys/clint-manegement-system/blob/main/src/utils/excelImport.ts"
click node_dashboard "https://github.com/psabhishek298-sys/clint-manegement-system/blob/main/src/pages/Dashboard.tsx"
click node_activity "https://github.com/psabhishek298-sys/clint-manegement-system/blob/main/src/components/dashboard/ActivityFeed.tsx"
click node_statuschart "https://github.com/psabhishek298-sys/clint-manegement-system/blob/main/src/components/dashboard/StatusOverviewChart.tsx"
click node_categorychart "https://github.com/psabhishek298-sys/clint-manegement-system/blob/main/src/components/dashboard/CategoryDistribution.tsx"
click node_alerts "https://github.com/psabhishek298-sys/clint-manegement-system/blob/main/src/components/dashboard/FollowUpAlerts.tsx"
click node_settings "https://github.com/psabhishek298-sys/clint-manegement-system/blob/main/src/pages/Settings.tsx"
click node_cashfund "https://github.com/psabhishek298-sys/clint-manegement-system/blob/main/src/pages/CashFund.tsx"
click node_helpers "https://github.com/psabhishek298-sys/clint-manegement-system/blob/main/src/utils/helpers.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_layout,node_sidebar,node_theme toneBlue
class node_clientstate,node_onboard,node_clientform,node_clientlist,node_filters,node_table,node_details,node_followups,node_demos,node_completed,node_categories,node_importpage,node_excel,node_cashfund,node_helpers,node_remote toneAmber
class node_dashboard,node_activity,node_statuschart,node_categorychart,node_alerts toneMint
class node_login,node_auth,node_supabase,node_settings toneRose
class node_staff toneIndigo
```

## Components

### App Shell

- [App Router](https://github.com/psabhishek298-sys/clint-manegement-system/blob/main/src/App.tsx): `src/App.tsx`
- [Dashboard Layout](https://github.com/psabhishek298-sys/clint-manegement-system/blob/main/src/components/layout/DashboardLayout.tsx): `src/components/layout/DashboardLayout.tsx`
- [Navigation](https://github.com/psabhishek298-sys/clint-manegement-system/blob/main/src/components/layout/Sidebar.tsx): `src/components/layout/Sidebar.tsx`
- [Theme State](https://github.com/psabhishek298-sys/clint-manegement-system/blob/main/src/context/ThemeContext.tsx): `src/context/ThemeContext.tsx`

### Client Lifecycle

- [Client Context](https://github.com/psabhishek298-sys/clint-manegement-system/blob/main/src/context/ClientContext.tsx): `src/context/ClientContext.tsx`
- [Client Onboarding](https://github.com/psabhishek298-sys/clint-manegement-system/blob/main/src/pages/AddClient.tsx): `src/pages/AddClient.tsx`
- [Client Form](https://github.com/psabhishek298-sys/clint-manegement-system/blob/main/src/components/clients/ClientForm.tsx): `src/components/clients/ClientForm.tsx`
- [Client Directory](https://github.com/psabhishek298-sys/clint-manegement-system/blob/main/src/pages/AllClients.tsx): `src/pages/AllClients.tsx`
- [Client Filters](https://github.com/psabhishek298-sys/clint-manegement-system/blob/main/src/components/clients/ClientFilters.tsx): `src/components/clients/ClientFilters.tsx`
- [Client Table](https://github.com/psabhishek298-sys/clint-manegement-system/blob/main/src/components/clients/ClientTable.tsx): `src/components/clients/ClientTable.tsx`
- [Client Profile](https://github.com/psabhishek298-sys/clint-manegement-system/blob/main/src/pages/ClientDetails.tsx): `src/pages/ClientDetails.tsx`
- [Follow-up Manager](https://github.com/psabhishek298-sys/clint-manegement-system/blob/main/src/pages/FollowUps.tsx): `src/pages/FollowUps.tsx`
- [Demo Projects](https://github.com/psabhishek298-sys/clint-manegement-system/blob/main/src/pages/DemoProjects.tsx): `src/pages/DemoProjects.tsx`
- [Completed Projects](https://github.com/psabhishek298-sys/clint-manegement-system/blob/main/src/pages/CompletedProjects.tsx): `src/pages/CompletedProjects.tsx`
- [Category Manager](https://github.com/psabhishek298-sys/clint-manegement-system/blob/main/src/pages/Categories.tsx): `src/pages/Categories.tsx`
- [Client Import](https://github.com/psabhishek298-sys/clint-manegement-system/blob/main/src/pages/ImportClients.tsx): `src/pages/ImportClients.tsx`
- [Spreadsheet Parser](https://github.com/psabhishek298-sys/clint-manegement-system/blob/main/src/utils/excelImport.ts): `src/utils/excelImport.ts`
- [Cash Fund](https://github.com/psabhishek298-sys/clint-manegement-system/blob/main/src/pages/CashFund.tsx): `src/pages/CashFund.tsx`
- [CRM Utilities](https://github.com/psabhishek298-sys/clint-manegement-system/blob/main/src/utils/helpers.ts): `src/utils/helpers.ts`

### Insights and Reporting

- [Executive Dashboard](https://github.com/psabhishek298-sys/clint-manegement-system/blob/main/src/pages/Dashboard.tsx): `src/pages/Dashboard.tsx`
- [Activity Feed](https://github.com/psabhishek298-sys/clint-manegement-system/blob/main/src/components/dashboard/ActivityFeed.tsx): `src/components/dashboard/ActivityFeed.tsx`
- [Status Overview](https://github.com/psabhishek298-sys/clint-manegement-system/blob/main/src/components/dashboard/StatusOverviewChart.tsx): `src/components/dashboard/StatusOverviewChart.tsx`
- [Category Distribution](https://github.com/psabhishek298-sys/clint-manegement-system/blob/main/src/components/dashboard/CategoryDistribution.tsx): `src/components/dashboard/CategoryDistribution.tsx`
- [Follow-up Alerts](https://github.com/psabhishek298-sys/clint-manegement-system/blob/main/src/components/dashboard/FollowUpAlerts.tsx): `src/components/dashboard/FollowUpAlerts.tsx`

### Identity and Persistence

- [Sign In](https://github.com/psabhishek298-sys/clint-manegement-system/blob/main/src/pages/Login.tsx): `src/pages/Login.tsx`
- [Auth Context](https://github.com/psabhishek298-sys/clint-manegement-system/blob/main/src/context/AuthContext.tsx): `src/context/AuthContext.tsx`
- [Supabase Client](https://github.com/psabhishek298-sys/clint-manegement-system/blob/main/src/services/supabase.ts): `src/services/supabase.ts`
- [Settings](https://github.com/psabhishek298-sys/clint-manegement-system/blob/main/src/pages/Settings.tsx): `src/pages/Settings.tsx`

### Other components

- **CRM Staff**
- **Supabase Backend**

## Connections

- CRM Staff → Sign In: signs in (evidence: `README.md`)
- Sign In → Auth Context: requests auth (evidence: `src/pages/Login.tsx`)
- Auth Context → Supabase Client: uses client (evidence: `src/context/AuthContext.tsx`)
- Supabase Client → Supabase Backend: auth and data (evidence: `README.md`)
- App Router → Auth Context: provides state (evidence: `src/App.tsx`)
- App Router → Client Context: provides state (evidence: `src/App.tsx`)
- App Router → Theme State: provides theme (evidence: `src/App.tsx`)
- App Router → Dashboard Layout: routes through (evidence: `src/App.tsx`)
- App Router → Sign In: routes to (evidence: `src/App.tsx`)
- App Router → Executive Dashboard: routes to (evidence: `src/App.tsx`)
- App Router → Client Directory: routes to (evidence: `src/App.tsx`)
- App Router → Client Onboarding: routes to (evidence: `src/App.tsx`)
- App Router → Client Profile: routes to (evidence: `src/App.tsx`)
- App Router → Follow-up Manager: routes to (evidence: `src/App.tsx`)
- App Router → Demo Projects: routes to (evidence: `src/App.tsx`)
- App Router → Category Manager: routes to (evidence: `src/App.tsx`)
- App Router → Client Import: routes to (evidence: `src/App.tsx`)
- App Router → Completed Projects: routes to (evidence: `src/App.tsx`)
- App Router → Cash Fund: routes to (evidence: `src/App.tsx`)
- App Router → Settings: routes to (evidence: `src/App.tsx`)
- Dashboard Layout → Navigation: renders (evidence: `src/components/layout/DashboardLayout.tsx`)
- Client Onboarding → Client Form: renders (evidence: `src/pages/AddClient.tsx`)
- Client Form → Client Context: reads categories (evidence: `src/components/clients/ClientForm.tsx`)
- Client Onboarding → Client Context: adds client (evidence: `src/pages/AddClient.tsx`)
- Client Directory → Client Context: reads clients (evidence: `src/pages/AllClients.tsx`)
- Client Directory → Client Filters: renders (evidence: `src/pages/AllClients.tsx`)
- Client Directory → Client Table: renders (evidence: `src/pages/AllClients.tsx`)
- Client Directory → CRM Utilities: filters and exports (evidence: `src/pages/AllClients.tsx`)
- Client Table → CRM Utilities: exports selected (evidence: `src/components/clients/ClientTable.tsx`)
- Client Profile → Client Context: reads and updates (evidence: `src/pages/ClientDetails.tsx`)
- Client Profile → Client Form: renders edit form (evidence: `src/pages/ClientDetails.tsx`)
- Follow-up Manager → Client Context: manages schedules (evidence: `src/pages/FollowUps.tsx`)
- Demo Projects → Client Context: updates demos (evidence: `src/pages/DemoProjects.tsx`)
- Completed Projects → Client Context: reads clients (evidence: `src/pages/CompletedProjects.tsx`)
- Category Manager → Client Context: manages categories (evidence: `src/pages/Categories.tsx`)
- Client Import → Spreadsheet Parser: parses workbook (evidence: `src/pages/ImportClients.tsx`)
- Client Import → Client Context: imports records (evidence: `src/pages/ImportClients.tsx`)
- Client Context → Supabase Client: persists records (evidence: `README.md`)
- Executive Dashboard → Client Context: reads client data (evidence: `src/pages/Dashboard.tsx`)
- Executive Dashboard → Activity Feed: renders (evidence: `src/pages/Dashboard.tsx`)
- Executive Dashboard → Status Overview: renders (evidence: `src/pages/Dashboard.tsx`)
- Executive Dashboard → Category Distribution: renders (evidence: `src/pages/Dashboard.tsx`)
- Executive Dashboard → Follow-up Alerts: renders (evidence: `src/pages/Dashboard.tsx`)
- Settings → Theme State: controls theme (evidence: `src/pages/Settings.tsx`)
- Settings → Client Context: resets legacy data (evidence: `src/pages/Settings.tsx`)
- Settings → Supabase Client: checks configuration (evidence: `src/pages/Settings.tsx`)
- Cash Fund → Client Context: reads clients (evidence: `src/pages/CashFund.tsx`)
