# khushisingh-22/crm-panel. architecture

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

- Interactive diagram: https://gitdiagram.com/khushisingh-22/crm-panel.
- Repository: https://github.com/khushisingh-22/crm-panel.

## Overview

Dr. Washit is a React-based CRM and workshop operations app for automotive detailing centers. Staff use its authenticated workspace to manage bookings, customers, bay progress, billing, staff, inventory, and shop settings; customers can also use booking and public-invoice views. The root App coordinates views and data updates, with local storage and Firebase synchronization supporting persistence. The README documents broader capabilities, including workflow automation and WhatsApp messaging. Some component-to-component wiring is not shown in the excerpts, so the map limits edges to visible references or documented relationships.

Main entry points: [`src/App.tsx`](https://github.com/khushisingh-22/crm-panel./blob/main/src/App.tsx) (Workspace router), [`src/utils/firebaseSync.ts`](https://github.com/khushisingh-22/crm-panel./blob/main/src/utils/firebaseSync.ts) (Firebase synchronization), [`src/utils/whatsapp.ts`](https://github.com/khushisingh-22/crm-panel./blob/main/src/utils/whatsapp.ts) (WhatsApp sender), [`src/components/LoginScreen.tsx`](https://github.com/khushisingh-22/crm-panel./blob/main/src/components/LoginScreen.tsx) (Login screen)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workspace["Workspace"]
  node_app["Workspace router<br/>[App.tsx]"]
  node_login["Login screen<br/>[LoginScreen.tsx]"]
  node_dashboard["Dashboard"]
  node_settings["Shop settings<br/>[SettingsPanel.tsx]"]
end

subgraph group_service_flow["Service flow"]
  node_booking_portal["Booking portal<br/>[BookingPortal.tsx]"]
  node_bookings["Booking management"]
  node_appointments["Appointment list"]
  node_workboard["Bay workboard<br/>[BayWorkboard.tsx]"]
  node_waitlist["Waitlist"]
  node_recurring["Recurring services"]
end

subgraph group_business_ops["Business operations"]
  node_customers["Customer CRM<br/>[CustomerCRM.tsx]"]
  node_billing["Billing and invoices<br/>[BillingManager.tsx]"]
  node_public_invoice["Public invoice"]
  node_payments["Payments"]
  node_staff_ops["Staff management"]
  node_expenses["Expense tracking"]
  node_inventory["Inventory control"]
  node_catalog["Services and packages"]
  node_packages["Package management"]
  node_automations["Workflow automation"]
  node_workflows["Workflow manager"]
end

subgraph group_persistence["Persistence"]
  node_auth["Custom authentication<br/>[customAuth.ts]"]
  node_sync["Firebase synchronization<br/>[firebaseSync.ts]"]
  node_local_storage[("Local storage<br/>[storage.ts]")]
  node_firebase[("Firebase services<br/>[firebase.ts]")]
  node_domain_types["CRM data contracts<br/>[crm.ts]"]
end

subgraph group_integrations["Integrations"]
  node_whatsapp["WhatsApp sender<br/>[whatsapp.ts]"]
  node_whatsapp_service["WhatsApp gateway"]
end

node_staff_user(("Staff user"))
node_customer(("Customer"))

node_staff_user -->|"uses"| node_app
node_customer -->|"requests booking"| node_booking_portal
node_app -->|"routes to"| node_login
node_app -->|"renders"| node_dashboard
node_app -->|"renders"| node_booking_portal
node_app -->|"renders"| node_bookings
node_app -->|"renders"| node_appointments
node_app -->|"renders"| node_workboard
node_app -->|"renders"| node_waitlist
node_app -->|"renders"| node_recurring
node_app -->|"renders"| node_customers
node_app -->|"renders"| node_billing
node_app -->|"renders"| node_public_invoice
node_app -->|"renders"| node_payments
node_app -->|"renders"| node_staff_ops
node_app -->|"renders"| node_expenses
node_app -->|"renders"| node_inventory
node_app -->|"renders"| node_catalog
node_app -->|"renders"| node_packages
node_app -->|"renders"| node_automations
node_app -->|"renders"| node_workflows
node_app -->|"renders"| node_settings
node_login -->|"authenticates with"| node_auth
node_auth -->|"reads and writes"| node_firebase
node_app -->|"loads and saves"| node_sync
node_app -->|"loads and saves"| node_local_storage
node_sync -->|"reads and writes"| node_firebase
node_sync -->|"uses contracts"| node_domain_types
node_local_storage -->|"uses contracts"| node_domain_types
node_bookings -->|"sends messages"| node_whatsapp
node_billing -->|"sends messages"| node_whatsapp
node_whatsapp -->|"posts messages"| node_whatsapp_service
node_public_invoice -.->|"shows receipt"| node_customer

click node_app "https://github.com/khushisingh-22/crm-panel./blob/main/src/App.tsx"
click node_login "https://github.com/khushisingh-22/crm-panel./blob/main/src/components/LoginScreen.tsx"
click node_dashboard "https://github.com/khushisingh-22/crm-panel./blob/main/src/components/DashboardOverview.tsx"
click node_settings "https://github.com/khushisingh-22/crm-panel./blob/main/src/components/SettingsPanel.tsx"
click node_booking_portal "https://github.com/khushisingh-22/crm-panel./blob/main/src/components/BookingPortal.tsx"
click node_bookings "https://github.com/khushisingh-22/crm-panel./blob/main/src/components/BookingsManager.tsx"
click node_appointments "https://github.com/khushisingh-22/crm-panel./blob/main/src/components/AppointmentsList.tsx"
click node_workboard "https://github.com/khushisingh-22/crm-panel./blob/main/src/components/BayWorkboard.tsx"
click node_waitlist "https://github.com/khushisingh-22/crm-panel./blob/main/src/components/WaitlistManager.tsx"
click node_recurring "https://github.com/khushisingh-22/crm-panel./blob/main/src/components/RecurringManager.tsx"
click node_customers "https://github.com/khushisingh-22/crm-panel./blob/main/src/components/CustomerCRM.tsx"
click node_billing "https://github.com/khushisingh-22/crm-panel./blob/main/src/components/BillingManager.tsx"
click node_public_invoice "https://github.com/khushisingh-22/crm-panel./blob/main/src/components/PublicInvoiceView.tsx"
click node_payments "https://github.com/khushisingh-22/crm-panel./blob/main/src/components/PaymentsManager.tsx"
click node_staff_ops "https://github.com/khushisingh-22/crm-panel./blob/main/src/components/EmployeeManagement.tsx"
click node_expenses "https://github.com/khushisingh-22/crm-panel./blob/main/src/components/ExpensesManager.tsx"
click node_inventory "https://github.com/khushisingh-22/crm-panel./blob/main/src/components/InventoryManager.tsx"
click node_catalog "https://github.com/khushisingh-22/crm-panel./blob/main/src/components/ServicesCatalog.tsx"
click node_packages "https://github.com/khushisingh-22/crm-panel./blob/main/src/components/PackagesManager.tsx"
click node_automations "https://github.com/khushisingh-22/crm-panel./blob/main/src/components/AutomationsManager.tsx"
click node_workflows "https://github.com/khushisingh-22/crm-panel./blob/main/src/components/WorkflowsManager.tsx"
click node_auth "https://github.com/khushisingh-22/crm-panel./blob/main/src/lib/customAuth.ts"
click node_sync "https://github.com/khushisingh-22/crm-panel./blob/main/src/utils/firebaseSync.ts"
click node_local_storage "https://github.com/khushisingh-22/crm-panel./blob/main/src/utils/storage.ts"
click node_firebase "https://github.com/khushisingh-22/crm-panel./blob/main/src/lib/firebase.ts"
click node_domain_types "https://github.com/khushisingh-22/crm-panel./blob/main/src/types/crm.ts"
click node_whatsapp "https://github.com/khushisingh-22/crm-panel./blob/main/src/utils/whatsapp.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_login,node_dashboard,node_settings,node_staff_user toneBlue
class node_booking_portal,node_bookings,node_appointments,node_workboard,node_waitlist,node_recurring toneAmber
class node_customers,node_billing,node_public_invoice,node_payments,node_staff_ops,node_expenses,node_inventory,node_catalog,node_packages,node_automations,node_workflows toneMint
class node_auth,node_sync,node_local_storage,node_firebase,node_domain_types toneRose
class node_whatsapp,node_whatsapp_service,node_customer toneIndigo
```

## Components

### Workspace

- [Workspace router](https://github.com/khushisingh-22/crm-panel./blob/main/src/App.tsx): `src/App.tsx`
- [Login screen](https://github.com/khushisingh-22/crm-panel./blob/main/src/components/LoginScreen.tsx): `src/components/LoginScreen.tsx`
- [Dashboard](https://github.com/khushisingh-22/crm-panel./blob/main/src/components/DashboardOverview.tsx): `src/components/DashboardOverview.tsx`
- [Shop settings](https://github.com/khushisingh-22/crm-panel./blob/main/src/components/SettingsPanel.tsx): `src/components/SettingsPanel.tsx`

### Service flow

- [Booking portal](https://github.com/khushisingh-22/crm-panel./blob/main/src/components/BookingPortal.tsx): `src/components/BookingPortal.tsx`
- [Booking management](https://github.com/khushisingh-22/crm-panel./blob/main/src/components/BookingsManager.tsx): `src/components/BookingsManager.tsx`
- [Appointment list](https://github.com/khushisingh-22/crm-panel./blob/main/src/components/AppointmentsList.tsx): `src/components/AppointmentsList.tsx`
- [Bay workboard](https://github.com/khushisingh-22/crm-panel./blob/main/src/components/BayWorkboard.tsx): `src/components/BayWorkboard.tsx`
- [Waitlist](https://github.com/khushisingh-22/crm-panel./blob/main/src/components/WaitlistManager.tsx): `src/components/WaitlistManager.tsx`
- [Recurring services](https://github.com/khushisingh-22/crm-panel./blob/main/src/components/RecurringManager.tsx): `src/components/RecurringManager.tsx`

### Business operations

- [Customer CRM](https://github.com/khushisingh-22/crm-panel./blob/main/src/components/CustomerCRM.tsx): `src/components/CustomerCRM.tsx`
- [Billing and invoices](https://github.com/khushisingh-22/crm-panel./blob/main/src/components/BillingManager.tsx): `src/components/BillingManager.tsx`
- [Public invoice](https://github.com/khushisingh-22/crm-panel./blob/main/src/components/PublicInvoiceView.tsx): `src/components/PublicInvoiceView.tsx`
- [Payments](https://github.com/khushisingh-22/crm-panel./blob/main/src/components/PaymentsManager.tsx): `src/components/PaymentsManager.tsx`
- [Staff management](https://github.com/khushisingh-22/crm-panel./blob/main/src/components/EmployeeManagement.tsx): `src/components/EmployeeManagement.tsx`
- [Expense tracking](https://github.com/khushisingh-22/crm-panel./blob/main/src/components/ExpensesManager.tsx): `src/components/ExpensesManager.tsx`
- [Inventory control](https://github.com/khushisingh-22/crm-panel./blob/main/src/components/InventoryManager.tsx): `src/components/InventoryManager.tsx`
- [Services and packages](https://github.com/khushisingh-22/crm-panel./blob/main/src/components/ServicesCatalog.tsx): `src/components/ServicesCatalog.tsx`
- [Package management](https://github.com/khushisingh-22/crm-panel./blob/main/src/components/PackagesManager.tsx): `src/components/PackagesManager.tsx`
- [Workflow automation](https://github.com/khushisingh-22/crm-panel./blob/main/src/components/AutomationsManager.tsx): `src/components/AutomationsManager.tsx`
- [Workflow manager](https://github.com/khushisingh-22/crm-panel./blob/main/src/components/WorkflowsManager.tsx): `src/components/WorkflowsManager.tsx`

### Persistence

- [Custom authentication](https://github.com/khushisingh-22/crm-panel./blob/main/src/lib/customAuth.ts): `src/lib/customAuth.ts`
- [Firebase synchronization](https://github.com/khushisingh-22/crm-panel./blob/main/src/utils/firebaseSync.ts): `src/utils/firebaseSync.ts`
- [Local storage](https://github.com/khushisingh-22/crm-panel./blob/main/src/utils/storage.ts): `src/utils/storage.ts`
- [Firebase services](https://github.com/khushisingh-22/crm-panel./blob/main/src/lib/firebase.ts): `src/lib/firebase.ts`
- [CRM data contracts](https://github.com/khushisingh-22/crm-panel./blob/main/src/types/crm.ts): `src/types/crm.ts`

### Integrations

- [WhatsApp sender](https://github.com/khushisingh-22/crm-panel./blob/main/src/utils/whatsapp.ts): `src/utils/whatsapp.ts`
- **WhatsApp gateway**

### Other components

- **Staff user**
- **Customer**

## Connections

- Staff user → Workspace router: uses (evidence: `README.md`)
- Customer → Booking portal: requests booking (evidence: `README.md`)
- Workspace router → Login screen: routes to (evidence: `src/App.tsx`)
- Workspace router → Dashboard: renders (evidence: `src/App.tsx`)
- Workspace router → Booking portal: renders (evidence: `src/App.tsx`)
- Workspace router → Booking management: renders (evidence: `src/App.tsx`)
- Workspace router → Appointment list: renders (evidence: `src/App.tsx`)
- Workspace router → Bay workboard: renders (evidence: `src/App.tsx`)
- Workspace router → Waitlist: renders (evidence: `src/App.tsx`)
- Workspace router → Recurring services: renders (evidence: `src/App.tsx`)
- Workspace router → Customer CRM: renders (evidence: `src/App.tsx`)
- Workspace router → Billing and invoices: renders (evidence: `src/App.tsx`)
- Workspace router → Public invoice: renders (evidence: `src/App.tsx`)
- Workspace router → Payments: renders (evidence: `src/App.tsx`)
- Workspace router → Staff management: renders (evidence: `src/App.tsx`)
- Workspace router → Expense tracking: renders (evidence: `src/App.tsx`)
- Workspace router → Inventory control: renders (evidence: `src/App.tsx`)
- Workspace router → Services and packages: renders (evidence: `src/App.tsx`)
- Workspace router → Package management: renders (evidence: `src/App.tsx`)
- Workspace router → Workflow automation: renders (evidence: `src/App.tsx`)
- Workspace router → Workflow manager: renders (evidence: `src/App.tsx`)
- Workspace router → Shop settings: renders (evidence: `src/App.tsx`)
- Login screen → Custom authentication: authenticates with (evidence: `src/components/LoginScreen.tsx`)
- Custom authentication → Firebase services: reads and writes (evidence: `src/lib/customAuth.ts`)
- Workspace router → Firebase synchronization: loads and saves (evidence: `src/App.tsx`)
- Workspace router → Local storage: loads and saves (evidence: `src/App.tsx`)
- Firebase synchronization → Firebase services: reads and writes (evidence: `src/utils/firebaseSync.ts`)
- Firebase synchronization → CRM data contracts: uses contracts (evidence: `src/utils/firebaseSync.ts`)
- Local storage → CRM data contracts: uses contracts (evidence: `src/utils/storage.ts`)
- Booking management → WhatsApp sender: sends messages (evidence: `src/components/BookingsManager.tsx`)
- Billing and invoices → WhatsApp sender: sends messages (evidence: `src/components/BillingManager.tsx`)
- WhatsApp sender → WhatsApp gateway: posts messages (evidence: `src/utils/whatsapp.ts`)
- Public invoice → Customer: shows receipt (evidence: `README.md`)
