# shubh0710/manifest architecture

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

- Interactive diagram: https://gitdiagram.com/shubh0710/manifest
- Repository: https://github.com/shubh0710/manifest

## Overview

Manifest is a trucking-submission case-management application: users sign in, create or start cases, and work with open, assigned, and closed cases. The React client routes these workflows and shares authentication and case state; an Express API handles requests, authorization, and domain operations backed by Prisma. The README is a generic Vite template and documents no product capabilities. Some client case pages and server routing were not excerpted, so the graph omits unsupported links between them and the case API.

Main entry points: [`server/src/controllers/authController.ts`](https://github.com/shubh0710/manifest/blob/main/server/src/controllers/authController.ts) (Auth controller), [`server/src/services/casesService.ts`](https://github.com/shubh0710/manifest/blob/main/server/src/services/casesService.ts) (Case service), [`server/src/middleware/requireAuth.ts`](https://github.com/shubh0710/manifest/blob/main/server/src/middleware/requireAuth.ts) (Auth middleware), [`src/App.tsx`](https://github.com/shubh0710/manifest/blob/main/src/App.tsx) (Route application)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["React client"]
  node_app["Route application<br/>[App.tsx]"]
  node_authpages["Login and signup<br/>[LogInPage.tsx]"]
  node_casepages["Case workflow pages"]
  node_selfstart["Self-start form<br/>[SelfStartPanel.tsx]"]
  node_authprovider["Authentication state<br/>[AuthProvider.tsx]"]
  node_authcontext["Auth context<br/>[authContext.ts]"]
  node_casesprovider["Case state<br/>[CasesProvider.tsx]"]
  node_casescontext["Case context<br/>[casesContext.ts]"]
  node_authapi["Auth API client<br/>[auth.ts]"]
  node_casesapi["Cases API client<br/>[cases.ts]"]
  node_httpclient["HTTP request client<br/>[client.ts]"]
end

subgraph group_server["API server"]
  node_backend["Express application<br/>[app.ts]"]
  node_authroutes["Auth routes<br/>[auth.ts]"]
  node_authcontroller["Auth controller<br/>[authController.ts]"]
  node_caseroutes["Case routes<br/>[cases.ts]"]
  node_casecontroller["Case controller<br/>[casesController.ts]"]
  node_authguard["Auth middleware<br/>[requireAuth.ts]"]
  node_session["Session handling<br/>[session.ts]"]
end

subgraph group_domain["Case domain"]
  node_authservice["Account service<br/>[authService.ts]"]
  node_caseservice["Case service<br/>[casesService.ts]"]
  node_validation["Case validation<br/>[caseDetails.ts]"]
  node_casecontract["Case data contract<br/>[case.ts]"]
  node_usercontract["User data contract<br/>[user.ts]"]
  node_caseclientcontract["Client case contract<br/>[case.ts]"]
end

subgraph group_data["Persistence"]
  node_database[("Prisma database<br/>[db.ts]")]
end

node_user(("User"))

node_user -->|"uses"| node_app
node_app -->|"routes to"| node_authpages
node_app -->|"routes to"| node_casepages
node_authprovider -->|"loads and updates"| node_authapi
node_authprovider -->|"provides state"| node_authcontext
node_casesprovider -->|"loads and mutates"| node_casesapi
node_casesprovider -->|"provides state"| node_casescontext
node_authapi -->|"sends requests"| node_httpclient
node_casesapi -->|"sends requests"| node_httpclient
node_selfstart -->|"uses"| node_httpclient
node_backend -->|"mounts"| node_authroutes
node_backend -->|"mounts"| node_caseroutes
node_authroutes -->|"dispatches to"| node_authcontroller
node_authcontroller -->|"calls"| node_authservice
node_authcontroller -->|"starts or ends"| node_session
node_authcontroller -->|"reads current user"| node_authguard
node_caseroutes -.->|"dispatches to"| node_casecontroller
node_casecontroller -->|"uses"| node_authguard
node_casecontroller -->|"calls"| node_caseservice
node_authguard -->|"reads session"| node_session
node_authguard -->|"finds user"| node_authservice
node_authservice -->|"reads and writes"| node_database
node_caseservice -->|"reads and writes"| node_database
node_caseservice -->|"uses details"| node_validation
node_caseservice -->|"maps case data"| node_casecontract
node_authapi -->|"types responses"| node_usercontract
node_casesapi -->|"types responses"| node_caseclientcontract

click node_app "https://github.com/shubh0710/manifest/blob/main/src/App.tsx"
click node_authpages "https://github.com/shubh0710/manifest/blob/main/src/pages/LogInPage.tsx"
click node_casepages "https://github.com/shubh0710/manifest/tree/main/src/pages"
click node_selfstart "https://github.com/shubh0710/manifest/blob/main/src/components/SelfStartPanel.tsx"
click node_authprovider "https://github.com/shubh0710/manifest/blob/main/src/context/AuthProvider.tsx"
click node_authcontext "https://github.com/shubh0710/manifest/blob/main/src/context/authContext.ts"
click node_casesprovider "https://github.com/shubh0710/manifest/blob/main/src/context/CasesProvider.tsx"
click node_casescontext "https://github.com/shubh0710/manifest/blob/main/src/context/casesContext.ts"
click node_authapi "https://github.com/shubh0710/manifest/blob/main/src/api/auth.ts"
click node_casesapi "https://github.com/shubh0710/manifest/blob/main/src/api/cases.ts"
click node_httpclient "https://github.com/shubh0710/manifest/blob/main/src/api/client.ts"
click node_backend "https://github.com/shubh0710/manifest/blob/main/server/src/app.ts"
click node_authroutes "https://github.com/shubh0710/manifest/blob/main/server/src/routes/auth.ts"
click node_authcontroller "https://github.com/shubh0710/manifest/blob/main/server/src/controllers/authController.ts"
click node_caseroutes "https://github.com/shubh0710/manifest/blob/main/server/src/routes/cases.ts"
click node_casecontroller "https://github.com/shubh0710/manifest/blob/main/server/src/controllers/casesController.ts"
click node_authguard "https://github.com/shubh0710/manifest/blob/main/server/src/middleware/requireAuth.ts"
click node_session "https://github.com/shubh0710/manifest/blob/main/server/src/session.ts"
click node_authservice "https://github.com/shubh0710/manifest/blob/main/server/src/services/authService.ts"
click node_caseservice "https://github.com/shubh0710/manifest/blob/main/server/src/services/casesService.ts"
click node_validation "https://github.com/shubh0710/manifest/blob/main/server/src/validation/caseDetails.ts"
click node_casecontract "https://github.com/shubh0710/manifest/blob/main/server/src/types/case.ts"
click node_database "https://github.com/shubh0710/manifest/blob/main/server/src/db.ts"
click node_usercontract "https://github.com/shubh0710/manifest/blob/main/src/types/user.ts"
click node_caseclientcontract "https://github.com/shubh0710/manifest/blob/main/src/types/case.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_authpages,node_casepages,node_selfstart,node_authprovider,node_authcontext,node_casesprovider,node_casescontext,node_authapi,node_casesapi,node_httpclient,node_user toneBlue
class node_backend,node_authroutes,node_authcontroller,node_caseroutes,node_casecontroller,node_authguard,node_session toneAmber
class node_authservice,node_caseservice,node_validation,node_casecontract,node_usercontract,node_caseclientcontract toneMint
class node_database toneRose
```

## Components

### React client

- [Route application](https://github.com/shubh0710/manifest/blob/main/src/App.tsx): `src/App.tsx`
- [Login and signup](https://github.com/shubh0710/manifest/blob/main/src/pages/LogInPage.tsx): `src/pages/LogInPage.tsx`
- [Case workflow pages](https://github.com/shubh0710/manifest/tree/main/src/pages): `src/pages`
- [Self-start form](https://github.com/shubh0710/manifest/blob/main/src/components/SelfStartPanel.tsx): `src/components/SelfStartPanel.tsx`
- [Authentication state](https://github.com/shubh0710/manifest/blob/main/src/context/AuthProvider.tsx): `src/context/AuthProvider.tsx`
- [Auth context](https://github.com/shubh0710/manifest/blob/main/src/context/authContext.ts): `src/context/authContext.ts`
- [Case state](https://github.com/shubh0710/manifest/blob/main/src/context/CasesProvider.tsx): `src/context/CasesProvider.tsx`
- [Case context](https://github.com/shubh0710/manifest/blob/main/src/context/casesContext.ts): `src/context/casesContext.ts`
- [Auth API client](https://github.com/shubh0710/manifest/blob/main/src/api/auth.ts): `src/api/auth.ts`
- [Cases API client](https://github.com/shubh0710/manifest/blob/main/src/api/cases.ts): `src/api/cases.ts`
- [HTTP request client](https://github.com/shubh0710/manifest/blob/main/src/api/client.ts): `src/api/client.ts`

### API server

- [Express application](https://github.com/shubh0710/manifest/blob/main/server/src/app.ts): `server/src/app.ts`
- [Auth routes](https://github.com/shubh0710/manifest/blob/main/server/src/routes/auth.ts): `server/src/routes/auth.ts`
- [Auth controller](https://github.com/shubh0710/manifest/blob/main/server/src/controllers/authController.ts): `server/src/controllers/authController.ts`
- [Case routes](https://github.com/shubh0710/manifest/blob/main/server/src/routes/cases.ts): `server/src/routes/cases.ts`
- [Case controller](https://github.com/shubh0710/manifest/blob/main/server/src/controllers/casesController.ts): `server/src/controllers/casesController.ts`
- [Auth middleware](https://github.com/shubh0710/manifest/blob/main/server/src/middleware/requireAuth.ts): `server/src/middleware/requireAuth.ts`
- [Session handling](https://github.com/shubh0710/manifest/blob/main/server/src/session.ts): `server/src/session.ts`

### Case domain

- [Account service](https://github.com/shubh0710/manifest/blob/main/server/src/services/authService.ts): `server/src/services/authService.ts`
- [Case service](https://github.com/shubh0710/manifest/blob/main/server/src/services/casesService.ts): `server/src/services/casesService.ts`
- [Case validation](https://github.com/shubh0710/manifest/blob/main/server/src/validation/caseDetails.ts): `server/src/validation/caseDetails.ts`
- [Case data contract](https://github.com/shubh0710/manifest/blob/main/server/src/types/case.ts): `server/src/types/case.ts`
- [User data contract](https://github.com/shubh0710/manifest/blob/main/src/types/user.ts): `src/types/user.ts`
- [Client case contract](https://github.com/shubh0710/manifest/blob/main/src/types/case.ts): `src/types/case.ts`

### Persistence

- [Prisma database](https://github.com/shubh0710/manifest/blob/main/server/src/db.ts): `server/src/db.ts`

### Other components

- **User**

## Connections

- User → Route application: uses
- Route application → Login and signup: routes to (evidence: `src/App.tsx`)
- Route application → Case workflow pages: routes to (evidence: `src/App.tsx`)
- Authentication state → Auth API client: loads and updates (evidence: `src/context/AuthProvider.tsx`)
- Authentication state → Auth context: provides state (evidence: `src/context/AuthProvider.tsx`)
- Case state → Cases API client: loads and mutates (evidence: `src/context/CasesProvider.tsx`)
- Case state → Case context: provides state (evidence: `src/context/CasesProvider.tsx`)
- Auth API client → HTTP request client: sends requests (evidence: `src/api/auth.ts`)
- Cases API client → HTTP request client: sends requests (evidence: `src/api/cases.ts`)
- Self-start form → HTTP request client: uses (evidence: `src/components/SelfStartPanel.tsx`)
- Express application → Auth routes: mounts (evidence: `server/src/app.ts`)
- Express application → Case routes: mounts (evidence: `server/src/app.ts`)
- Auth routes → Auth controller: dispatches to (evidence: `server/src/routes/auth.ts`)
- Auth controller → Account service: calls (evidence: `server/src/controllers/authController.ts`)
- Auth controller → Session handling: starts or ends (evidence: `server/src/controllers/authController.ts`)
- Auth controller → Auth middleware: reads current user (evidence: `server/src/controllers/authController.ts`)
- Case routes → Case controller: dispatches to
- Case controller → Auth middleware: uses (evidence: `server/src/controllers/casesController.ts`)
- Case controller → Case service: calls (evidence: `server/src/controllers/casesController.ts`)
- Auth middleware → Session handling: reads session (evidence: `server/src/middleware/requireAuth.ts`)
- Auth middleware → Account service: finds user (evidence: `server/src/middleware/requireAuth.ts`)
- Account service → Prisma database: reads and writes (evidence: `server/src/services/authService.ts`)
- Case service → Prisma database: reads and writes (evidence: `server/src/services/casesService.ts`)
- Case service → Case validation: uses details (evidence: `server/src/services/casesService.ts`)
- Case service → Case data contract: maps case data (evidence: `server/src/services/casesService.ts`)
- Auth API client → User data contract: types responses (evidence: `src/api/auth.ts`)
- Cases API client → Client case contract: types responses (evidence: `src/api/cases.ts`)
