# muhasinbiruar/amazaing-strange-funeral-home-system architecture

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

- Interactive diagram: https://gitdiagram.com/muhasinbiruar/amazaing-strange-funeral-home-system
- Repository: https://github.com/muhasinbiruar/amazaing-strange-funeral-home-system

## Overview

This is a funeral-home operations system: staff use a dashboard to register cases, manage contracts and inventory, track finances, and administer staff. A clear workflow is intake form → staged submission of representative and deceased records, optional life-plan data, and documents. The server exposes domain routes and authentication; shared schemas define data contracts. The README describes setup but not product behavior, so the graph relies on the shown intake, admin, API, and server excerpts. Many domain routes and dashboard pages are listed but unsampled; their internal behavior is not inferred.

Main entry points: [`client/app/dashboard/intake/_hooks/useSubmitIntake.ts`](https://github.com/muhasinbiruar/amazaing-strange-funeral-home-system/blob/master/client/app/dashboard/intake/_hooks/useSubmitIntake.ts) (Intake submission), [`server/src/app.ts`](https://github.com/muhasinbiruar/amazaing-strange-funeral-home-system/blob/master/server/src/app.ts) (HTTP application), [`client/services/api.ts`](https://github.com/muhasinbiruar/amazaing-strange-funeral-home-system/blob/master/client/services/api.ts) (HTTP client), [`client/app/dashboard/case-management/page.tsx`](https://github.com/muhasinbiruar/amazaing-strange-funeral-home-system/blob/master/client/app/dashboard/case-management/page.tsx) (Case management)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_intake["Case intake"]
  node_intakeform["Intake form<br/>[page.tsx]"]
  node_submit["Intake submission<br/>[useSubmitIntake.ts]"]
  node_representative["Representative records<br/>[representatives.ts]"]
  node_deceased["Deceased records<br/>[deceasedrecords.ts]"]
  node_lifeplans["Life plans<br/>[lifeplans.ts]"]
  node_documents["Case documents<br/>[documents.ts]"]
end

subgraph group_operations["Case operations"]
  node_casepage["Case management<br/>[page.tsx]"]
  node_casetable["Case table<br/>[index.tsx]"]
  node_contract["Contract creation<br/>[index.tsx]"]
  node_inventory["Inventory management<br/>[page.tsx]"]
end

subgraph group_finance["Financial operations"]
  node_financialpage["Financial dashboard<br/>[page.tsx]"]
  node_financialservice["Financial API client"]
  node_financialroutes["Financial routes<br/>[financial.ts]"]
end

subgraph group_platform["Application platform"]
  node_adminpage["Staff administration<br/>[page.tsx]"]
  node_staffpanel["Staff editor<br/>[index.tsx]"]
  node_auditpanel["Audit log viewer<br/>[index.tsx]"]
  node_auth["Authentication<br/>[auth.ts]"]
  node_serverapp["HTTP application<br/>[app.ts]"]
  node_shared["Shared schemas<br/>[index.ts]"]
  node_api["HTTP client<br/>[api.ts]"]
end

node_staff(("Dashboard staff"))

node_staff -->|"enters intake"| node_intakeform
node_intakeform -->|"submits form"| node_submit
node_submit -->|"creates representative"| node_representative
node_submit -->|"creates record"| node_deceased
node_submit -->|"creates plan"| node_lifeplans
node_submit -->|"uploads documents"| node_documents
node_casepage -->|"renders table"| node_casetable
node_casepage -->|"renders creation flow"| node_contract
node_adminpage -->|"opens editor"| node_staffpanel
node_adminpage -->|"opens audit log"| node_auditpanel
node_staffpanel -.->|"loads and saves staff"| node_api
node_financialservice -->|"sends requests"| node_api
node_financialpage -.->|"uses financial data"| node_financialservice
node_serverapp -->|"routes auth requests"| node_auth
node_serverapp -->|"mounts routes"| node_financialroutes
node_serverapp -->|"mounts routes"| node_deceased
node_api -.->|"calls HTTP API"| node_serverapp
node_submit -->|"posts records"| node_api
node_submit -.->|"uses query types"| node_shared

click node_intakeform "https://github.com/muhasinbiruar/amazaing-strange-funeral-home-system/blob/master/client/app/dashboard/intake/page.tsx"
click node_submit "https://github.com/muhasinbiruar/amazaing-strange-funeral-home-system/blob/master/client/app/dashboard/intake/_hooks/useSubmitIntake.ts"
click node_representative "https://github.com/muhasinbiruar/amazaing-strange-funeral-home-system/blob/master/server/src/routes/representatives.ts"
click node_deceased "https://github.com/muhasinbiruar/amazaing-strange-funeral-home-system/blob/master/server/src/routes/deceasedrecords.ts"
click node_lifeplans "https://github.com/muhasinbiruar/amazaing-strange-funeral-home-system/blob/master/server/src/routes/lifeplans.ts"
click node_documents "https://github.com/muhasinbiruar/amazaing-strange-funeral-home-system/blob/master/server/src/routes/documents.ts"
click node_casepage "https://github.com/muhasinbiruar/amazaing-strange-funeral-home-system/blob/master/client/app/dashboard/case-management/page.tsx"
click node_casetable "https://github.com/muhasinbiruar/amazaing-strange-funeral-home-system/blob/master/client/app/dashboard/case-management/_components/caseTable/index.tsx"
click node_contract "https://github.com/muhasinbiruar/amazaing-strange-funeral-home-system/blob/master/client/app/dashboard/case-management/_components/newContract/index.tsx"
click node_inventory "https://github.com/muhasinbiruar/amazaing-strange-funeral-home-system/blob/master/client/app/dashboard/inventory/page.tsx"
click node_financialpage "https://github.com/muhasinbiruar/amazaing-strange-funeral-home-system/blob/master/client/app/dashboard/financials/page.tsx"
click node_financialservice "https://github.com/muhasinbiruar/amazaing-strange-funeral-home-system/blob/master/client/services/financialService.ts"
click node_financialroutes "https://github.com/muhasinbiruar/amazaing-strange-funeral-home-system/blob/master/server/src/routes/financial.ts"
click node_adminpage "https://github.com/muhasinbiruar/amazaing-strange-funeral-home-system/blob/master/client/app/dashboard/admin/page.tsx"
click node_staffpanel "https://github.com/muhasinbiruar/amazaing-strange-funeral-home-system/blob/master/client/app/dashboard/admin/_components/staffPanel/index.tsx"
click node_auditpanel "https://github.com/muhasinbiruar/amazaing-strange-funeral-home-system/blob/master/client/app/dashboard/admin/_components/auditLogPanel/index.tsx"
click node_auth "https://github.com/muhasinbiruar/amazaing-strange-funeral-home-system/blob/master/server/src/lib/auth.ts"
click node_serverapp "https://github.com/muhasinbiruar/amazaing-strange-funeral-home-system/blob/master/server/src/app.ts"
click node_shared "https://github.com/muhasinbiruar/amazaing-strange-funeral-home-system/blob/master/shared/src/index.ts"
click node_api "https://github.com/muhasinbiruar/amazaing-strange-funeral-home-system/blob/master/client/services/api.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_intakeform,node_submit,node_representative,node_deceased,node_lifeplans,node_documents toneBlue
class node_casepage,node_casetable,node_contract,node_inventory toneAmber
class node_financialpage,node_financialservice,node_financialroutes toneMint
class node_adminpage,node_staffpanel,node_auditpanel,node_auth,node_serverapp,node_shared,node_api toneRose
class node_staff toneIndigo
```

## Components

### Case intake

- [Intake form](https://github.com/muhasinbiruar/amazaing-strange-funeral-home-system/blob/master/client/app/dashboard/intake/page.tsx): `client/app/dashboard/intake/page.tsx`
- [Intake submission](https://github.com/muhasinbiruar/amazaing-strange-funeral-home-system/blob/master/client/app/dashboard/intake/_hooks/useSubmitIntake.ts): `client/app/dashboard/intake/_hooks/useSubmitIntake.ts`
- [Representative records](https://github.com/muhasinbiruar/amazaing-strange-funeral-home-system/blob/master/server/src/routes/representatives.ts): `server/src/routes/representatives.ts`
- [Deceased records](https://github.com/muhasinbiruar/amazaing-strange-funeral-home-system/blob/master/server/src/routes/deceasedrecords.ts): `server/src/routes/deceasedrecords.ts`
- [Life plans](https://github.com/muhasinbiruar/amazaing-strange-funeral-home-system/blob/master/server/src/routes/lifeplans.ts): `server/src/routes/lifeplans.ts`
- [Case documents](https://github.com/muhasinbiruar/amazaing-strange-funeral-home-system/blob/master/server/src/routes/documents.ts): `server/src/routes/documents.ts`

### Case operations

- [Case management](https://github.com/muhasinbiruar/amazaing-strange-funeral-home-system/blob/master/client/app/dashboard/case-management/page.tsx): `client/app/dashboard/case-management/page.tsx`
- [Case table](https://github.com/muhasinbiruar/amazaing-strange-funeral-home-system/blob/master/client/app/dashboard/case-management/_components/caseTable/index.tsx): `client/app/dashboard/case-management/_components/caseTable/index.tsx`
- [Contract creation](https://github.com/muhasinbiruar/amazaing-strange-funeral-home-system/blob/master/client/app/dashboard/case-management/_components/newContract/index.tsx): `client/app/dashboard/case-management/_components/newContract/index.tsx`
- [Inventory management](https://github.com/muhasinbiruar/amazaing-strange-funeral-home-system/blob/master/client/app/dashboard/inventory/page.tsx): `client/app/dashboard/inventory/page.tsx`

### Financial operations

- [Financial dashboard](https://github.com/muhasinbiruar/amazaing-strange-funeral-home-system/blob/master/client/app/dashboard/financials/page.tsx): `client/app/dashboard/financials/page.tsx`
- [Financial API client](https://github.com/muhasinbiruar/amazaing-strange-funeral-home-system/blob/master/client/services/financialService.ts): `client/services/financialService.ts`
- [Financial routes](https://github.com/muhasinbiruar/amazaing-strange-funeral-home-system/blob/master/server/src/routes/financial.ts): `server/src/routes/financial.ts`

### Application platform

- [Staff administration](https://github.com/muhasinbiruar/amazaing-strange-funeral-home-system/blob/master/client/app/dashboard/admin/page.tsx): `client/app/dashboard/admin/page.tsx`
- [Staff editor](https://github.com/muhasinbiruar/amazaing-strange-funeral-home-system/blob/master/client/app/dashboard/admin/_components/staffPanel/index.tsx): `client/app/dashboard/admin/_components/staffPanel/index.tsx`
- [Audit log viewer](https://github.com/muhasinbiruar/amazaing-strange-funeral-home-system/blob/master/client/app/dashboard/admin/_components/auditLogPanel/index.tsx): `client/app/dashboard/admin/_components/auditLogPanel/index.tsx`
- [Authentication](https://github.com/muhasinbiruar/amazaing-strange-funeral-home-system/blob/master/server/src/lib/auth.ts): `server/src/lib/auth.ts`
- [HTTP application](https://github.com/muhasinbiruar/amazaing-strange-funeral-home-system/blob/master/server/src/app.ts): `server/src/app.ts`
- [Shared schemas](https://github.com/muhasinbiruar/amazaing-strange-funeral-home-system/blob/master/shared/src/index.ts): `shared/src/index.ts`
- [HTTP client](https://github.com/muhasinbiruar/amazaing-strange-funeral-home-system/blob/master/client/services/api.ts): `client/services/api.ts`

### Other components

- **Dashboard staff**

## Connections

- Dashboard staff → Intake form: enters intake (evidence: `client/app/dashboard/intake/page.tsx`)
- Intake form → Intake submission: submits form (evidence: `client/app/dashboard/intake/page.tsx`)
- Intake submission → Representative records: creates representative (evidence: `client/app/dashboard/intake/_hooks/useSubmitIntake.ts`)
- Intake submission → Deceased records: creates record (evidence: `client/app/dashboard/intake/_hooks/useSubmitIntake.ts`)
- Intake submission → Life plans: creates plan (evidence: `client/app/dashboard/intake/_hooks/useSubmitIntake.ts`)
- Intake submission → Case documents: uploads documents (evidence: `client/app/dashboard/intake/_hooks/useSubmitIntake.ts`)
- Case management → Case table: renders table (evidence: `client/app/dashboard/case-management/page.tsx`)
- Case management → Contract creation: renders creation flow (evidence: `client/app/dashboard/case-management/page.tsx`)
- Staff administration → Staff editor: opens editor (evidence: `client/app/dashboard/admin/page.tsx`)
- Staff administration → Audit log viewer: opens audit log (evidence: `client/app/dashboard/admin/page.tsx`)
- Staff editor → HTTP client: loads and saves staff
- Financial API client → HTTP client: sends requests (evidence: `client/services/financialService.ts`)
- Financial dashboard → Financial API client: uses financial data
- HTTP application → Authentication: routes auth requests (evidence: `server/src/app.ts`)
- HTTP application → Financial routes: mounts routes (evidence: `server/src/app.ts`)
- HTTP application → Deceased records: mounts routes (evidence: `server/src/app.ts`)
- HTTP client → HTTP application: calls HTTP API
- Intake submission → HTTP client: posts records (evidence: `client/app/dashboard/intake/_hooks/useSubmitIntake.ts`)
- Intake submission → Shared schemas: uses query types
