# nirmalcs10/ssctechcare architecture

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

- Interactive diagram: https://gitdiagram.com/nirmalcs10/ssctechcare
- Repository: https://github.com/nirmalcs10/ssctechcare

## Overview

SSC TechCare is a repair-shop management application. Staff use the React workspace to intake devices, manage repair stages and parts, track customers, and invoice jobs; customers can separately look up repair progress. The documented workflow spans intake, diagnosis/quotation, repair and testing, pickup, and billing. The tree also contains a Cloudflare Worker API implementation alongside the Express backend; the excerpts show their entry points and database layers, but not how deployments select between them.

Main entry points: [`client/src/api/index.js`](https://github.com/nirmalcs10/ssctechcare/blob/main/client/src/api/index.js) (REST client), [`server/src/server.js`](https://github.com/nirmalcs10/ssctechcare/blob/main/server/src/server.js) (Express API), [`server/src/db/database.js`](https://github.com/nirmalcs10/ssctechcare/blob/main/server/src/db/database.js) (SQLite / PostgreSQL), [`client/src/App.jsx`](https://github.com/nirmalcs10/ssctechcare/blob/main/client/src/App.jsx) (Workspace router)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workspace["Staff Workspace"]
  node_app["Workspace router<br/>[App.jsx]"]
  node_api_client["REST client<br/>[index.js]"]
  node_intake["Device intake<br/>[NewTicketModal.jsx]"]
  node_ticket_workbench["Ticket workbench<br/>[TicketDetail.jsx]"]
  node_ticket_views["Ticket views<br/>[Tickets.jsx]"]
  node_kanban["Workshop board<br/>[KanbanBoard.jsx]"]
  node_public_track["Public tracker<br/>[PublicTrack.jsx]"]
  node_print_job["Job sheet<br/>[PrintJobCard.jsx]"]
  node_print_invoice["Tax invoice print<br/>[PrintInvoice.jsx]"]
end

subgraph group_workshop["Repair Operations"]
  node_ticket_api["Ticket operations<br/>[tickets.js]"]
  node_tracking_api["Tracking lookup<br/>[tracking.js]"]
end

subgraph group_business["Shop Management"]
  node_inventory_ui["Inventory workspace<br/>[Inventory.jsx]"]
  node_customer_ui["Customer directory<br/>[Customers.jsx]"]
  node_invoice_ui["Billing workspace<br/>[Invoices.jsx]"]
  node_revenue_ui["Revenue reporting<br/>[RevenueModal.jsx]"]
  node_dashboard_ui["Workshop dashboard<br/>[Dashboard.jsx]"]
  node_technicians_ui["Technician management<br/>[Technicians.jsx]"]
  node_settings_ui["Shop settings<br/>[Settings.jsx]"]
  node_auth_ui["Staff sign-in<br/>[MainLogin.jsx]"]
end

subgraph group_platform["API and Persistence"]
  node_express["Express API<br/>[server.js]"]
  node_auth_api["Authentication<br/>[auth.js]"]
  node_customer_api["Customer operations<br/>[customers.js]"]
  node_inventory_api["Inventory operations<br/>[inventory.js]"]
  node_invoice_api["Invoice operations<br/>[invoices.js]"]
  node_dashboard_api["Dashboard metrics<br/>[dashboard.js]"]
  node_revenue_api["Revenue operations<br/>[revenue.js]"]
  node_technician_api["Technician operations<br/>[technicians.js]"]
  node_settings_api["Settings operations<br/>[settings.js]"]
  node_database[("SQLite / PostgreSQL<br/>[database.js]")]
  node_worker["Cloudflare Worker<br/>[index.js]"]
  node_worker_routes["Worker API routes<br/>[routes.js]"]
  node_d1[("D1 schema and helpers<br/>[d1.js]")]
end

node_staff(("Shop staff"))
node_customer(("Customer"))

node_staff -->|"uses"| node_app
node_app -->|"opens"| node_intake
node_app -->|"routes to"| node_ticket_workbench
node_app -->|"routes to"| node_ticket_views
node_app -->|"routes to"| node_kanban
node_app -->|"routes to"| node_public_track
node_intake -->|"submits via"| node_api_client
node_ticket_workbench -->|"requests via"| node_api_client
node_ticket_views -.->|"requests via"| node_api_client
node_kanban -.->|"requests via"| node_api_client
node_public_track -.->|"requests via"| node_api_client
node_ticket_workbench -->|"prints"| node_print_job
node_ticket_workbench -->|"prints"| node_print_invoice
node_customer -->|"checks progress"| node_public_track
node_api_client -.->|"sends API requests"| node_express
node_express -->|"mounts"| node_auth_api
node_express -->|"mounts"| node_ticket_api
node_express -->|"mounts"| node_tracking_api
node_express -->|"mounts"| node_customer_api
node_express -->|"mounts"| node_inventory_api
node_express -->|"mounts"| node_invoice_api
node_express -->|"mounts"| node_dashboard_api
node_express -->|"mounts"| node_revenue_api
node_express -->|"mounts"| node_technician_api
node_express -->|"mounts"| node_settings_api
node_ticket_api -->|"queries"| node_database
node_tracking_api -->|"queries"| node_database
node_auth_api -->|"queries"| node_database
node_customer_api -->|"queries"| node_database
node_inventory_api -->|"queries"| node_database
node_invoice_api -->|"queries"| node_database
node_dashboard_api -->|"queries"| node_database
node_revenue_api -->|"queries"| node_database
node_settings_api -->|"queries"| node_database
node_inventory_ui -->|"requests via"| node_api_client
node_customer_ui -.->|"requests via"| node_api_client
node_invoice_ui -->|"requests via"| node_api_client
node_invoice_ui -->|"opens"| node_revenue_ui
node_invoice_ui -.->|"prints"| node_print_invoice
node_dashboard_ui -.->|"requests via"| node_api_client
node_technicians_ui -->|"requests via"| node_api_client
node_settings_ui -->|"requests via"| node_api_client
node_auth_ui -->|"authenticates via"| node_api_client
node_worker -->|"dispatches API"| node_worker_routes
node_worker -->|"initializes schema"| node_d1
node_worker_routes -->|"queries and authenticates"| node_d1

click node_app "https://github.com/nirmalcs10/ssctechcare/blob/main/client/src/App.jsx"
click node_api_client "https://github.com/nirmalcs10/ssctechcare/blob/main/client/src/api/index.js"
click node_intake "https://github.com/nirmalcs10/ssctechcare/blob/main/client/src/components/NewTicketModal.jsx"
click node_ticket_workbench "https://github.com/nirmalcs10/ssctechcare/blob/main/client/src/pages/TicketDetail.jsx"
click node_ticket_views "https://github.com/nirmalcs10/ssctechcare/blob/main/client/src/pages/Tickets.jsx"
click node_kanban "https://github.com/nirmalcs10/ssctechcare/blob/main/client/src/pages/KanbanBoard.jsx"
click node_public_track "https://github.com/nirmalcs10/ssctechcare/blob/main/client/src/pages/PublicTrack.jsx"
click node_print_job "https://github.com/nirmalcs10/ssctechcare/blob/main/client/src/components/PrintJobCard.jsx"
click node_print_invoice "https://github.com/nirmalcs10/ssctechcare/blob/main/client/src/components/PrintInvoice.jsx"
click node_ticket_api "https://github.com/nirmalcs10/ssctechcare/blob/main/server/src/routes/tickets.js"
click node_tracking_api "https://github.com/nirmalcs10/ssctechcare/blob/main/server/src/routes/tracking.js"
click node_inventory_ui "https://github.com/nirmalcs10/ssctechcare/blob/main/client/src/pages/Inventory.jsx"
click node_customer_ui "https://github.com/nirmalcs10/ssctechcare/blob/main/client/src/pages/Customers.jsx"
click node_invoice_ui "https://github.com/nirmalcs10/ssctechcare/blob/main/client/src/pages/Invoices.jsx"
click node_revenue_ui "https://github.com/nirmalcs10/ssctechcare/blob/main/client/src/components/RevenueModal.jsx"
click node_dashboard_ui "https://github.com/nirmalcs10/ssctechcare/blob/main/client/src/pages/Dashboard.jsx"
click node_technicians_ui "https://github.com/nirmalcs10/ssctechcare/blob/main/client/src/pages/Technicians.jsx"
click node_settings_ui "https://github.com/nirmalcs10/ssctechcare/blob/main/client/src/pages/Settings.jsx"
click node_auth_ui "https://github.com/nirmalcs10/ssctechcare/blob/main/client/src/pages/MainLogin.jsx"
click node_express "https://github.com/nirmalcs10/ssctechcare/blob/main/server/src/server.js"
click node_auth_api "https://github.com/nirmalcs10/ssctechcare/blob/main/server/src/routes/auth.js"
click node_customer_api "https://github.com/nirmalcs10/ssctechcare/blob/main/server/src/routes/customers.js"
click node_inventory_api "https://github.com/nirmalcs10/ssctechcare/blob/main/server/src/routes/inventory.js"
click node_invoice_api "https://github.com/nirmalcs10/ssctechcare/blob/main/server/src/routes/invoices.js"
click node_dashboard_api "https://github.com/nirmalcs10/ssctechcare/blob/main/server/src/routes/dashboard.js"
click node_revenue_api "https://github.com/nirmalcs10/ssctechcare/blob/main/server/src/routes/revenue.js"
click node_technician_api "https://github.com/nirmalcs10/ssctechcare/blob/main/server/src/routes/technicians.js"
click node_settings_api "https://github.com/nirmalcs10/ssctechcare/blob/main/server/src/routes/settings.js"
click node_database "https://github.com/nirmalcs10/ssctechcare/blob/main/server/src/db/database.js"
click node_worker "https://github.com/nirmalcs10/ssctechcare/blob/main/src/index.js"
click node_worker_routes "https://github.com/nirmalcs10/ssctechcare/blob/main/src/api/routes.js"
click node_d1 "https://github.com/nirmalcs10/ssctechcare/blob/main/src/db/d1.js"

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_api_client,node_intake,node_ticket_workbench,node_ticket_views,node_kanban,node_public_track,node_print_job,node_print_invoice toneBlue
class node_ticket_api,node_tracking_api toneAmber
class node_inventory_ui,node_customer_ui,node_invoice_ui,node_revenue_ui,node_dashboard_ui,node_technicians_ui,node_settings_ui,node_auth_ui toneMint
class node_express,node_auth_api,node_customer_api,node_inventory_api,node_invoice_api,node_dashboard_api,node_revenue_api,node_technician_api,node_settings_api,node_database,node_worker,node_worker_routes,node_d1 toneRose
class node_staff,node_customer toneIndigo
```

## Components

### Staff Workspace

- [Workspace router](https://github.com/nirmalcs10/ssctechcare/blob/main/client/src/App.jsx): `client/src/App.jsx`
- [REST client](https://github.com/nirmalcs10/ssctechcare/blob/main/client/src/api/index.js): `client/src/api/index.js`
- [Device intake](https://github.com/nirmalcs10/ssctechcare/blob/main/client/src/components/NewTicketModal.jsx): `client/src/components/NewTicketModal.jsx`
- [Ticket workbench](https://github.com/nirmalcs10/ssctechcare/blob/main/client/src/pages/TicketDetail.jsx): `client/src/pages/TicketDetail.jsx`
- [Ticket views](https://github.com/nirmalcs10/ssctechcare/blob/main/client/src/pages/Tickets.jsx): `client/src/pages/Tickets.jsx`
- [Workshop board](https://github.com/nirmalcs10/ssctechcare/blob/main/client/src/pages/KanbanBoard.jsx): `client/src/pages/KanbanBoard.jsx`
- [Public tracker](https://github.com/nirmalcs10/ssctechcare/blob/main/client/src/pages/PublicTrack.jsx): `client/src/pages/PublicTrack.jsx`
- [Job sheet](https://github.com/nirmalcs10/ssctechcare/blob/main/client/src/components/PrintJobCard.jsx): `client/src/components/PrintJobCard.jsx`
- [Tax invoice print](https://github.com/nirmalcs10/ssctechcare/blob/main/client/src/components/PrintInvoice.jsx): `client/src/components/PrintInvoice.jsx`

### Repair Operations

- [Ticket operations](https://github.com/nirmalcs10/ssctechcare/blob/main/server/src/routes/tickets.js): `server/src/routes/tickets.js`
- [Tracking lookup](https://github.com/nirmalcs10/ssctechcare/blob/main/server/src/routes/tracking.js): `server/src/routes/tracking.js`

### Shop Management

- [Inventory workspace](https://github.com/nirmalcs10/ssctechcare/blob/main/client/src/pages/Inventory.jsx): `client/src/pages/Inventory.jsx`
- [Customer directory](https://github.com/nirmalcs10/ssctechcare/blob/main/client/src/pages/Customers.jsx): `client/src/pages/Customers.jsx`
- [Billing workspace](https://github.com/nirmalcs10/ssctechcare/blob/main/client/src/pages/Invoices.jsx): `client/src/pages/Invoices.jsx`
- [Revenue reporting](https://github.com/nirmalcs10/ssctechcare/blob/main/client/src/components/RevenueModal.jsx): `client/src/components/RevenueModal.jsx`
- [Workshop dashboard](https://github.com/nirmalcs10/ssctechcare/blob/main/client/src/pages/Dashboard.jsx): `client/src/pages/Dashboard.jsx`
- [Technician management](https://github.com/nirmalcs10/ssctechcare/blob/main/client/src/pages/Technicians.jsx): `client/src/pages/Technicians.jsx`
- [Shop settings](https://github.com/nirmalcs10/ssctechcare/blob/main/client/src/pages/Settings.jsx): `client/src/pages/Settings.jsx`
- [Staff sign-in](https://github.com/nirmalcs10/ssctechcare/blob/main/client/src/pages/MainLogin.jsx): `client/src/pages/MainLogin.jsx`

### API and Persistence

- [Express API](https://github.com/nirmalcs10/ssctechcare/blob/main/server/src/server.js): `server/src/server.js`
- [Authentication](https://github.com/nirmalcs10/ssctechcare/blob/main/server/src/routes/auth.js): `server/src/routes/auth.js`
- [Customer operations](https://github.com/nirmalcs10/ssctechcare/blob/main/server/src/routes/customers.js): `server/src/routes/customers.js`
- [Inventory operations](https://github.com/nirmalcs10/ssctechcare/blob/main/server/src/routes/inventory.js): `server/src/routes/inventory.js`
- [Invoice operations](https://github.com/nirmalcs10/ssctechcare/blob/main/server/src/routes/invoices.js): `server/src/routes/invoices.js`
- [Dashboard metrics](https://github.com/nirmalcs10/ssctechcare/blob/main/server/src/routes/dashboard.js): `server/src/routes/dashboard.js`
- [Revenue operations](https://github.com/nirmalcs10/ssctechcare/blob/main/server/src/routes/revenue.js): `server/src/routes/revenue.js`
- [Technician operations](https://github.com/nirmalcs10/ssctechcare/blob/main/server/src/routes/technicians.js): `server/src/routes/technicians.js`
- [Settings operations](https://github.com/nirmalcs10/ssctechcare/blob/main/server/src/routes/settings.js): `server/src/routes/settings.js`
- [SQLite / PostgreSQL](https://github.com/nirmalcs10/ssctechcare/blob/main/server/src/db/database.js): `server/src/db/database.js`
- [Cloudflare Worker](https://github.com/nirmalcs10/ssctechcare/blob/main/src/index.js): `src/index.js`
- [Worker API routes](https://github.com/nirmalcs10/ssctechcare/blob/main/src/api/routes.js): `src/api/routes.js`
- [D1 schema and helpers](https://github.com/nirmalcs10/ssctechcare/blob/main/src/db/d1.js): `src/db/d1.js`

### Other components

- **Shop staff**
- **Customer**

## Connections

- Shop staff → Workspace router: uses (evidence: `README.md`)
- Workspace router → Device intake: opens (evidence: `client/src/App.jsx`)
- Workspace router → Ticket workbench: routes to (evidence: `client/src/App.jsx`)
- Workspace router → Ticket views: routes to (evidence: `client/src/App.jsx`)
- Workspace router → Workshop board: routes to (evidence: `client/src/App.jsx`)
- Workspace router → Public tracker: routes to (evidence: `client/src/App.jsx`)
- Device intake → REST client: submits via (evidence: `client/src/components/NewTicketModal.jsx`)
- Ticket workbench → REST client: requests via (evidence: `client/src/pages/TicketDetail.jsx`)
- Ticket views → REST client: requests via
- Workshop board → REST client: requests via
- Public tracker → REST client: requests via
- Ticket workbench → Job sheet: prints (evidence: `client/src/App.jsx`)
- Ticket workbench → Tax invoice print: prints (evidence: `client/src/App.jsx`)
- Customer → Public tracker: checks progress (evidence: `README.md`)
- REST client → Express API: sends API requests
- Express API → Authentication: mounts (evidence: `server/src/server.js`)
- Express API → Ticket operations: mounts (evidence: `server/src/server.js`)
- Express API → Tracking lookup: mounts (evidence: `server/src/server.js`)
- Express API → Customer operations: mounts (evidence: `server/src/server.js`)
- Express API → Inventory operations: mounts (evidence: `server/src/server.js`)
- Express API → Invoice operations: mounts (evidence: `server/src/server.js`)
- Express API → Dashboard metrics: mounts (evidence: `server/src/server.js`)
- Express API → Revenue operations: mounts (evidence: `server/src/server.js`)
- Express API → Technician operations: mounts (evidence: `server/src/server.js`)
- Express API → Settings operations: mounts (evidence: `server/src/server.js`)
- Ticket operations → SQLite / PostgreSQL: queries (evidence: `server/src/routes/tickets.js`)
- Tracking lookup → SQLite / PostgreSQL: queries (evidence: `server/src/routes/tracking.js`)
- Authentication → SQLite / PostgreSQL: queries (evidence: `server/src/routes/auth.js`)
- Customer operations → SQLite / PostgreSQL: queries (evidence: `server/src/routes/customers.js`)
- Inventory operations → SQLite / PostgreSQL: queries (evidence: `server/src/routes/inventory.js`)
- Invoice operations → SQLite / PostgreSQL: queries (evidence: `server/src/routes/invoices.js`)
- Dashboard metrics → SQLite / PostgreSQL: queries (evidence: `server/src/routes/dashboard.js`)
- Revenue operations → SQLite / PostgreSQL: queries (evidence: `server/src/routes/revenue.js`)
- Settings operations → SQLite / PostgreSQL: queries (evidence: `server/src/routes/settings.js`)
- Inventory workspace → REST client: requests via (evidence: `client/src/pages/Inventory.jsx`)
- Customer directory → REST client: requests via
- Billing workspace → REST client: requests via (evidence: `client/src/pages/Invoices.jsx`)
- Billing workspace → Revenue reporting: opens (evidence: `client/src/pages/Invoices.jsx`)
- Billing workspace → Tax invoice print: prints
- Workshop dashboard → REST client: requests via
- Technician management → REST client: requests via (evidence: `client/src/pages/Technicians.jsx`)
- Shop settings → REST client: requests via (evidence: `client/src/pages/Settings.jsx`)
- Staff sign-in → REST client: authenticates via (evidence: `client/src/pages/MainLogin.jsx`)
- Cloudflare Worker → Worker API routes: dispatches API (evidence: `src/index.js`)
- Cloudflare Worker → D1 schema and helpers: initializes schema (evidence: `src/index.js`)
- Worker API routes → D1 schema and helpers: queries and authenticates (evidence: `src/api/routes.js`)
