# geetabangde/lims-kailtech-lab architecture

> Architecture diagram of the GitHub repository geetabangde/lims-kailtech-lab, 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/geetabangde/lims-kailtech-lab
- Repository: https://github.com/geetabangde/lims-kailtech-lab

## Overview

Kailtech is a React dashboard for laboratory operations, with action-item workflows for sample handling, testing, and report review alongside accounting and master-data screens. The main traceable workflow starts at the application shell, enters routed dashboard pages, and includes HOD/QA report review with approval, retest, and report-export actions. The tree also indicates HR, records, and calibration capabilities. Source excerpts establish report/API and app/router relationships; unsampled route wiring and most domain-page interactions are not asserted.

Main entry points: [`src/app/router/router.jsx`](https://github.com/geetabangde/lims-kailtech-lab/blob/main/src/app/router/router.jsx) (Route assembly), [`src/app/pages/dashboards/action-items/review-by-hod/ReviewByHodDetail.jsx`](https://github.com/geetabangde/lims-kailtech-lab/blob/main/src/app/pages/dashboards/action-items/review-by-hod/ReviewByHodDetail.jsx) (HOD report review), [`src/app/pages/dashboards/action-items/review-by-qa/ReviewByQaDetail.jsx`](https://github.com/geetabangde/lims-kailtech-lab/blob/main/src/app/pages/dashboards/action-items/review-by-qa/ReviewByQaDetail.jsx) (QA report review), [`src/app/pages/dashboards/action-items/signed-reports/ExportTestingReportWOLH.jsx`](https://github.com/geetabangde/lims-kailtech-lab/blob/main/src/app/pages/dashboards/action-items/signed-reports/ExportTestingReportWOLH.jsx) (No-letterhead export)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application shell"]
  node_entry["React entry<br/>[main.jsx]"]
  node_app_shell["App providers<br/>[App.jsx]"]
  node_router["Route assembly<br/>[router.jsx]"]
  node_auth_guard["Auth guard<br/>[AuthGuard.jsx]"]
  node_auth_context["Auth context<br/>[context.js]"]
end

subgraph group_lab["Lab operations"]
  node_calibration["Calibration entry"]
  node_observations["Observation handling<br/>[useObservations.js]"]
  node_sample_accept["Sample acceptance<br/>[index.jsx]"]
  node_sample_allot["Sample allotment<br/>[index.jsx]"]
  node_chemist["Chemist assignment<br/>[index.jsx]"]
  node_testing["Testing tasks"]
end

subgraph group_reports["Report review"]
  node_hod_review["HOD report review"]
  node_qa_review["QA report review"]
  node_hod_pdf["Report PDF output<br/>[TestReportPdf.jsx]"]
  node_report_export["No-letterhead export"]
end

subgraph group_accounts["Accounts"]
  node_invoice_list["Calibration invoices<br/>[index.jsx]"]
  node_payments["Payments<br/>[index.jsx]"]
  node_ledger["Complete ledger<br/>[index.jsx]"]
end

node_user(("Dashboard user"))
node_api{{"Kailtech API"}}

node_user -->|"opens app"| node_entry
node_entry -->|"renders"| node_app_shell
node_app_shell -->|"provides routes"| node_router
node_router -.->|"guards access"| node_auth_guard
node_auth_guard -->|"reads auth"| node_auth_context
node_router -.->|"routes to"| node_hod_review
node_router -.->|"routes to"| node_qa_review
node_hod_review -->|"fetches and submits"| node_api
node_qa_review -->|"fetches and submits"| node_api
node_hod_review -->|"renders PDF"| node_hod_pdf
node_qa_review -->|"renders PDF"| node_hod_pdf
node_hod_review -->|"offers export"| node_report_export
node_qa_review -->|"offers export"| node_report_export
node_report_export -.->|"reuses report data"| node_hod_pdf

click node_entry "https://github.com/geetabangde/lims-kailtech-lab/blob/main/src/main.jsx"
click node_app_shell "https://github.com/geetabangde/lims-kailtech-lab/blob/main/src/App.jsx"
click node_router "https://github.com/geetabangde/lims-kailtech-lab/blob/main/src/app/router/router.jsx"
click node_auth_guard "https://github.com/geetabangde/lims-kailtech-lab/blob/main/src/middleware/AuthGuard.jsx"
click node_auth_context "https://github.com/geetabangde/lims-kailtech-lab/blob/main/src/app/contexts/auth/context.js"
click node_calibration "https://github.com/geetabangde/lims-kailtech-lab/blob/main/src/app/pages/dashboards/calibration-process/inward-entry-lab/CalibrationDataManager.jsx"
click node_observations "https://github.com/geetabangde/lims-kailtech-lab/blob/main/src/hooks/useObservations.js"
click node_sample_accept "https://github.com/geetabangde/lims-kailtech-lab/blob/main/src/app/pages/dashboards/action-items/accept-sample/index.jsx"
click node_sample_allot "https://github.com/geetabangde/lims-kailtech-lab/blob/main/src/app/pages/dashboards/action-items/allot-sample/index.jsx"
click node_chemist "https://github.com/geetabangde/lims-kailtech-lab/blob/main/src/app/pages/dashboards/action-items/assign-chemist/index.jsx"
click node_testing "https://github.com/geetabangde/lims-kailtech-lab/blob/main/src/app/pages/dashboards/action-items/perform-testing/PerformTestDetail.jsx"
click node_hod_review "https://github.com/geetabangde/lims-kailtech-lab/blob/main/src/app/pages/dashboards/action-items/review-by-hod/ReviewByHodDetail.jsx"
click node_qa_review "https://github.com/geetabangde/lims-kailtech-lab/blob/main/src/app/pages/dashboards/action-items/review-by-qa/ReviewByQaDetail.jsx"
click node_hod_pdf "https://github.com/geetabangde/lims-kailtech-lab/blob/main/src/app/pages/dashboards/action-items/review-by-hod/TestReportPdf.jsx"
click node_report_export "https://github.com/geetabangde/lims-kailtech-lab/blob/main/src/app/pages/dashboards/action-items/signed-reports/ExportTestingReportWOLH.jsx"
click node_invoice_list "https://github.com/geetabangde/lims-kailtech-lab/blob/main/src/app/pages/dashboards/accounts/calibration-invoice-list/index.jsx"
click node_payments "https://github.com/geetabangde/lims-kailtech-lab/blob/main/src/app/pages/dashboards/accounts/payment-list/index.jsx"
click node_ledger "https://github.com/geetabangde/lims-kailtech-lab/blob/main/src/app/pages/dashboards/accounts/complete-ledger/index.jsx"

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_entry,node_app_shell,node_router,node_auth_guard,node_auth_context,node_user toneBlue
class node_calibration,node_observations,node_sample_accept,node_sample_allot,node_chemist,node_testing toneAmber
class node_hod_review,node_qa_review,node_hod_pdf,node_report_export,node_api toneMint
class node_invoice_list,node_payments,node_ledger toneRose
```

## Components

### Application shell

- [React entry](https://github.com/geetabangde/lims-kailtech-lab/blob/main/src/main.jsx): `src/main.jsx`
- [App providers](https://github.com/geetabangde/lims-kailtech-lab/blob/main/src/App.jsx): `src/App.jsx`
- [Route assembly](https://github.com/geetabangde/lims-kailtech-lab/blob/main/src/app/router/router.jsx): `src/app/router/router.jsx`
- [Auth guard](https://github.com/geetabangde/lims-kailtech-lab/blob/main/src/middleware/AuthGuard.jsx): `src/middleware/AuthGuard.jsx`
- [Auth context](https://github.com/geetabangde/lims-kailtech-lab/blob/main/src/app/contexts/auth/context.js): `src/app/contexts/auth/context.js`

### Lab operations

- [Calibration entry](https://github.com/geetabangde/lims-kailtech-lab/blob/main/src/app/pages/dashboards/calibration-process/inward-entry-lab/CalibrationDataManager.jsx): `src/app/pages/dashboards/calibration-process/inward-entry-lab/CalibrationDataManager.jsx`
- [Observation handling](https://github.com/geetabangde/lims-kailtech-lab/blob/main/src/hooks/useObservations.js): `src/hooks/useObservations.js`
- [Sample acceptance](https://github.com/geetabangde/lims-kailtech-lab/blob/main/src/app/pages/dashboards/action-items/accept-sample/index.jsx): `src/app/pages/dashboards/action-items/accept-sample/index.jsx`
- [Sample allotment](https://github.com/geetabangde/lims-kailtech-lab/blob/main/src/app/pages/dashboards/action-items/allot-sample/index.jsx): `src/app/pages/dashboards/action-items/allot-sample/index.jsx`
- [Chemist assignment](https://github.com/geetabangde/lims-kailtech-lab/blob/main/src/app/pages/dashboards/action-items/assign-chemist/index.jsx): `src/app/pages/dashboards/action-items/assign-chemist/index.jsx`
- [Testing tasks](https://github.com/geetabangde/lims-kailtech-lab/blob/main/src/app/pages/dashboards/action-items/perform-testing/PerformTestDetail.jsx): `src/app/pages/dashboards/action-items/perform-testing/PerformTestDetail.jsx`

### Report review

- [HOD report review](https://github.com/geetabangde/lims-kailtech-lab/blob/main/src/app/pages/dashboards/action-items/review-by-hod/ReviewByHodDetail.jsx): `src/app/pages/dashboards/action-items/review-by-hod/ReviewByHodDetail.jsx`
- [QA report review](https://github.com/geetabangde/lims-kailtech-lab/blob/main/src/app/pages/dashboards/action-items/review-by-qa/ReviewByQaDetail.jsx): `src/app/pages/dashboards/action-items/review-by-qa/ReviewByQaDetail.jsx`
- [Report PDF output](https://github.com/geetabangde/lims-kailtech-lab/blob/main/src/app/pages/dashboards/action-items/review-by-hod/TestReportPdf.jsx): `src/app/pages/dashboards/action-items/review-by-hod/TestReportPdf.jsx`
- [No-letterhead export](https://github.com/geetabangde/lims-kailtech-lab/blob/main/src/app/pages/dashboards/action-items/signed-reports/ExportTestingReportWOLH.jsx): `src/app/pages/dashboards/action-items/signed-reports/ExportTestingReportWOLH.jsx`

### Accounts

- [Calibration invoices](https://github.com/geetabangde/lims-kailtech-lab/blob/main/src/app/pages/dashboards/accounts/calibration-invoice-list/index.jsx): `src/app/pages/dashboards/accounts/calibration-invoice-list/index.jsx`
- [Payments](https://github.com/geetabangde/lims-kailtech-lab/blob/main/src/app/pages/dashboards/accounts/payment-list/index.jsx): `src/app/pages/dashboards/accounts/payment-list/index.jsx`
- [Complete ledger](https://github.com/geetabangde/lims-kailtech-lab/blob/main/src/app/pages/dashboards/accounts/complete-ledger/index.jsx): `src/app/pages/dashboards/accounts/complete-ledger/index.jsx`

### Other components

- **Dashboard user**
- **Kailtech API**

## Connections

- Dashboard user → React entry: opens app (evidence: `src/main.jsx`)
- React entry → App providers: renders (evidence: `src/main.jsx`)
- App providers → Route assembly: provides routes (evidence: `src/App.jsx`)
- Route assembly → Auth guard: guards access
- Auth guard → Auth context: reads auth (evidence: `src/middleware/AuthGuard.jsx`)
- Route assembly → HOD report review: routes to
- Route assembly → QA report review: routes to
- HOD report review → Kailtech API: fetches and submits (evidence: `src/app/pages/dashboards/action-items/review-by-hod/ReviewByHodDetail.jsx`)
- QA report review → Kailtech API: fetches and submits (evidence: `src/app/pages/dashboards/action-items/review-by-qa/ReviewByQaDetail.jsx`)
- HOD report review → Report PDF output: renders PDF (evidence: `src/app/pages/dashboards/action-items/review-by-hod/ReviewByHodDetail.jsx`)
- QA report review → Report PDF output: renders PDF (evidence: `src/app/pages/dashboards/action-items/review-by-qa/ReviewByQaDetail.jsx`)
- HOD report review → No-letterhead export: offers export (evidence: `src/app/pages/dashboards/action-items/review-by-hod/ReviewByHodDetail.jsx`)
- QA report review → No-letterhead export: offers export (evidence: `src/app/pages/dashboards/action-items/review-by-qa/ReviewByQaDetail.jsx`)
- No-letterhead export → Report PDF output: reuses report data
