# dap112023/kosavi architecture

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

- Interactive diagram: https://gitdiagram.com/dap112023/kosavi
- Repository: https://github.com/dap112023/kosavi

## Overview

KosaviApp is a multi-area business application for ERP sales and manufacturing, CRM, HRM, and production operations. Users authenticate, select a system, then work through domain screens—for example, creating quotations and job cards before workshop, production, and dispatch activities. The UI also includes master-data maintenance and employee lifecycle/payroll functions. The tree and sampled route files establish the system boundaries and several entry points; many feature implementations were not sampled, so their internal wiring and persistence are intentionally not asserted.

Main entry points: [`src/routes/ErpAppRoutes.jsx`](https://github.com/dap112023/kosavi/blob/kosaviApp/src/routes/ErpAppRoutes.jsx) (ERP routes), [`src/App.jsx`](https://github.com/dap112023/kosavi/blob/kosaviApp/src/App.jsx) (App shell), [`src/routes/HrmAppRoutes.jsx`](https://github.com/dap112023/kosavi/blob/kosaviApp/src/routes/HrmAppRoutes.jsx) (HRM routes), [`src/layouts/CrmLayout.jsx`](https://github.com/dap112023/kosavi/blob/kosaviApp/src/layouts/CrmLayout.jsx) (CRM workspace)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Application entry"]
  node_app["App shell<br/>[App.jsx]"]
  node_auth["Authentication state<br/>[AuthContext.jsx]"]
  node_system["System selector<br/>[SystemSelector.jsx]"]
end

subgraph group_erp["ERP operations"]
  node_erp_routes["ERP routes<br/>[ErpAppRoutes.jsx]"]
  node_quotes["Quotes"]
  node_enquiries["Enquiries and measurements"]
  node_masters["Master data<br/>[MasterRoutes.jsx]"]
  node_price_lists["Price lists"]
end

subgraph group_manufacturing["Manufacturing flow"]
  node_job_cards["Job cards"]
  node_production["Production tracking"]
  node_dispatch["Dispatch and delivery"]
end

subgraph group_people["People operations"]
  node_hrm_routes["HRM routes<br/>[HrmAppRoutes.jsx]"]
  node_employee_lifecycle["Employee lifecycle"]
  node_attendance["Attendance and leave"]
  node_payroll["Payroll management"]
end

subgraph group_crm["Customer relations"]
  node_crm_layout["CRM workspace<br/>[CrmLayout.jsx]"]
  node_pipeline["Sales pipeline<br/>[Pipeline.jsx]"]
  node_service["Service operations"]
end

node_user(("Business user"))
node_backend{{"Application API"}}

node_user -->|"uses"| node_app
node_app -->|"provides auth"| node_auth
node_app -->|"routes to"| node_system
node_app -->|"mounts ERP"| node_erp_routes
node_app -->|"mounts HRM"| node_hrm_routes
node_app -->|"mounts CRM"| node_crm_layout
node_system -->|"selects system"| node_erp_routes
node_erp_routes -->|"routes to"| node_quotes
node_erp_routes -->|"routes to"| node_enquiries
node_erp_routes -->|"routes to"| node_masters
node_erp_routes -->|"routes to"| node_price_lists
node_erp_routes -->|"routes to"| node_job_cards
node_erp_routes -->|"routes to"| node_dispatch
node_erp_routes -->|"routes to"| node_production
node_hrm_routes -->|"routes to"| node_employee_lifecycle
node_hrm_routes -->|"routes to"| node_attendance
node_hrm_routes -->|"routes to"| node_payroll
node_crm_layout -->|"hosts"| node_pipeline
node_crm_layout -->|"hosts"| node_service
node_pipeline -->|"reads and updates"| node_backend

click node_app "https://github.com/dap112023/kosavi/blob/kosaviApp/src/App.jsx"
click node_auth "https://github.com/dap112023/kosavi/blob/kosaviApp/src/contexts/AuthContext.jsx"
click node_system "https://github.com/dap112023/kosavi/blob/kosaviApp/src/pages/SystemSelector.jsx"
click node_erp_routes "https://github.com/dap112023/kosavi/blob/kosaviApp/src/routes/ErpAppRoutes.jsx"
click node_quotes "https://github.com/dap112023/kosavi/tree/kosaviApp/src/pages/quotes"
click node_enquiries "https://github.com/dap112023/kosavi/tree/kosaviApp/src/pages/enquiry"
click node_masters "https://github.com/dap112023/kosavi/blob/kosaviApp/src/routes/MasterRoutes.jsx"
click node_price_lists "https://github.com/dap112023/kosavi/tree/kosaviApp/src/components/price-lists"
click node_job_cards "https://github.com/dap112023/kosavi/tree/kosaviApp/src/components/jobCard/door"
click node_production "https://github.com/dap112023/kosavi/tree/kosaviApp/src/components/production"
click node_dispatch "https://github.com/dap112023/kosavi/tree/kosaviApp/src/pages/dispatch"
click node_hrm_routes "https://github.com/dap112023/kosavi/blob/kosaviApp/src/routes/HrmAppRoutes.jsx"
click node_employee_lifecycle "https://github.com/dap112023/kosavi/tree/kosaviApp/src/hrm/pages/onBoarding"
click node_attendance "https://github.com/dap112023/kosavi/tree/kosaviApp/src/hrm/pages/attendance"
click node_payroll "https://github.com/dap112023/kosavi/tree/kosaviApp/src/hrm/pages/paysheetManagement"
click node_crm_layout "https://github.com/dap112023/kosavi/blob/kosaviApp/src/layouts/CrmLayout.jsx"
click node_pipeline "https://github.com/dap112023/kosavi/blob/kosaviApp/src/crm/pages/pipeline/Pipeline.jsx"
click node_service "https://github.com/dap112023/kosavi/tree/kosaviApp/src/crm/pages/service"

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_auth,node_system,node_user toneBlue
class node_erp_routes,node_quotes,node_enquiries,node_masters,node_price_lists toneAmber
class node_job_cards,node_production,node_dispatch,node_backend toneMint
class node_hrm_routes,node_employee_lifecycle,node_attendance,node_payroll toneRose
class node_crm_layout,node_pipeline,node_service toneIndigo
```

## Components

### Application entry

- [App shell](https://github.com/dap112023/kosavi/blob/kosaviApp/src/App.jsx): `src/App.jsx`
- [Authentication state](https://github.com/dap112023/kosavi/blob/kosaviApp/src/contexts/AuthContext.jsx): `src/contexts/AuthContext.jsx`
- [System selector](https://github.com/dap112023/kosavi/blob/kosaviApp/src/pages/SystemSelector.jsx): `src/pages/SystemSelector.jsx`

### ERP operations

- [ERP routes](https://github.com/dap112023/kosavi/blob/kosaviApp/src/routes/ErpAppRoutes.jsx): `src/routes/ErpAppRoutes.jsx`
- [Quotes](https://github.com/dap112023/kosavi/tree/kosaviApp/src/pages/quotes): `src/pages/quotes`
- [Enquiries and measurements](https://github.com/dap112023/kosavi/tree/kosaviApp/src/pages/enquiry): `src/pages/enquiry`
- [Master data](https://github.com/dap112023/kosavi/blob/kosaviApp/src/routes/MasterRoutes.jsx): `src/routes/MasterRoutes.jsx`
- [Price lists](https://github.com/dap112023/kosavi/tree/kosaviApp/src/components/price-lists): `src/components/price-lists`

### Manufacturing flow

- [Job cards](https://github.com/dap112023/kosavi/tree/kosaviApp/src/components/jobCard/door): `src/components/jobCard/door`
- [Production tracking](https://github.com/dap112023/kosavi/tree/kosaviApp/src/components/production): `src/components/production`
- [Dispatch and delivery](https://github.com/dap112023/kosavi/tree/kosaviApp/src/pages/dispatch): `src/pages/dispatch`

### People operations

- [HRM routes](https://github.com/dap112023/kosavi/blob/kosaviApp/src/routes/HrmAppRoutes.jsx): `src/routes/HrmAppRoutes.jsx`
- [Employee lifecycle](https://github.com/dap112023/kosavi/tree/kosaviApp/src/hrm/pages/onBoarding): `src/hrm/pages/onBoarding`
- [Attendance and leave](https://github.com/dap112023/kosavi/tree/kosaviApp/src/hrm/pages/attendance): `src/hrm/pages/attendance`
- [Payroll management](https://github.com/dap112023/kosavi/tree/kosaviApp/src/hrm/pages/paysheetManagement): `src/hrm/pages/paysheetManagement`

### Customer relations

- [CRM workspace](https://github.com/dap112023/kosavi/blob/kosaviApp/src/layouts/CrmLayout.jsx): `src/layouts/CrmLayout.jsx`
- [Sales pipeline](https://github.com/dap112023/kosavi/blob/kosaviApp/src/crm/pages/pipeline/Pipeline.jsx): `src/crm/pages/pipeline/Pipeline.jsx`
- [Service operations](https://github.com/dap112023/kosavi/tree/kosaviApp/src/crm/pages/service): `src/crm/pages/service`

### Other components

- **Business user**
- **Application API**

## Connections

- Business user → App shell: uses
- App shell → Authentication state: provides auth
- App shell → System selector: routes to
- App shell → ERP routes: mounts ERP
- App shell → HRM routes: mounts HRM
- App shell → CRM workspace: mounts CRM
- System selector → ERP routes: selects system
- ERP routes → Quotes: routes to
- ERP routes → Enquiries and measurements: routes to
- ERP routes → Master data: routes to
- ERP routes → Price lists: routes to
- ERP routes → Job cards: routes to
- ERP routes → Dispatch and delivery: routes to
- ERP routes → Production tracking: routes to
- HRM routes → Employee lifecycle: routes to
- HRM routes → Attendance and leave: routes to
- HRM routes → Payroll management: routes to
- CRM workspace → Sales pipeline: hosts
- CRM workspace → Service operations: hosts
- Sales pipeline → Application API: reads and updates
