# subi-83/idhayam-erp architecture

> Architecture diagram of the GitHub repository subi-83/idhayam-erp, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/subi-83/idhayam-erp
- Repository: https://github.com/subi-83/idhayam-erp

## Overview

Idhayam-ERP is a modular ERP with a React client, Django REST API, and relational database. The documented user-to-result path is an HTTP request through routing, a view and serializer, business logic, and ORM-backed storage, with a response returning to the client. Product domains include process configuration and records, master data, workforce, accounting, procurement/workflow, material movement, and reporting. The README documents the general request flow; links between specific domain modules are limited where sampled source does not establish their runtime wiring.

Main entry points: [`backend/apps/process_engine/models.py`](https://github.com/subi-83/idhayam-erp/blob/main/backend/apps/process_engine/models.py) (Process records), [`backend/apps/core/runtime/views.py`](https://github.com/subi-83/idhayam-erp/blob/main/backend/apps/core/runtime/views.py) (Views and serializers), [`frontend/src/app/App.jsx`](https://github.com/subi-83/idhayam-erp/blob/main/frontend/src/app/App.jsx) (React application), [`frontend/src/controllers`](https://github.com/subi-83/idhayam-erp/tree/main/frontend/src/controllers) (Feature controllers)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["User interface"]
  node_react["React application<br/>[App.jsx]"]
  node_controllers["Feature controllers"]
end

subgraph group_platform["Platform services"]
  node_router["Django URL router<br/>[urls.py]"]
  node_api["Views and serializers<br/>[views.py]"]
  node_shared["Core runtime<br/>[records.py]"]
  node_access["Access and scope<br/>[access.py]"]
  node_company[("Company structure<br/>[companies.py]")]
  node_numbering["Identifier numbering<br/>[numbering.py]"]
  node_database[("Relational database")]
end

subgraph group_engine["Configurable engines"]
  node_masters[("Master data<br/>[models.py]")]
  node_process["Process definitions<br/>[schema_api.py]"]
  node_process_records[("Process records<br/>[models.py]")]
  node_constraints["Process constraints"]
  node_workcenter["Work center reviews<br/>[policy.py]"]
end

subgraph group_operations["Business operations"]
  node_employee["Employee and HR"]
  node_accounting["Accounting"]
  node_workflow["Procurement workflow"]
  node_movement["Material movement"]
  node_calendar["Calendar hub"]
end

subgraph group_insight["Communication and insight"]
  node_reports["Reports and search"]
  node_audit["Audit records"]
  node_notifications["Notifications"]
  node_backup["Backup jobs"]
end

node_user(("ERP user"))

node_user -->|"uses"| node_react
node_react -.->|"invokes"| node_controllers
node_controllers -->|"HTTP requests"| node_router
node_router -->|"routes"| node_api
node_api -.->|"uses runtime"| node_shared
node_api -->|"reads or writes"| node_database
node_shared -->|"ORM access"| node_database
node_api -->|"API response"| node_user
node_access -.->|"checks access"| node_company
node_numbering -.->|"allocates IDs"| node_database
node_process -.->|"configures records"| node_process_records
node_process_records -.->|"validates writes"| node_constraints
node_masters -.->|"provides values"| node_process
node_workcenter -->|"extends records"| node_process_records
node_employee -.->|"stores workforce data"| node_process_records
node_workflow -.->|"may use processes"| node_process_records
node_accounting -.->|"stores accounts"| node_database
node_movement -.->|"stores movements"| node_database
node_calendar -.->|"stores events"| node_database
node_reports -.->|"queries data"| node_database
node_audit -.->|"stores audit records"| node_database
node_notifications -.->|"delivers updates"| node_user
node_backup -.->|"backs up data"| node_database

click node_react "https://github.com/subi-83/idhayam-erp/blob/main/frontend/src/app/App.jsx"
click node_controllers "https://github.com/subi-83/idhayam-erp/tree/main/frontend/src/controllers"
click node_router "https://github.com/subi-83/idhayam-erp/blob/main/backend/config/urls.py"
click node_api "https://github.com/subi-83/idhayam-erp/blob/main/backend/apps/core/runtime/views.py"
click node_shared "https://github.com/subi-83/idhayam-erp/blob/main/backend/apps/core/runtime/records.py"
click node_access "https://github.com/subi-83/idhayam-erp/blob/main/backend/apps/core/services/access.py"
click node_company "https://github.com/subi-83/idhayam-erp/blob/main/backend/apps/core/models/companies.py"
click node_numbering "https://github.com/subi-83/idhayam-erp/blob/main/backend/apps/utils/services/numbering.py"
click node_masters "https://github.com/subi-83/idhayam-erp/blob/main/backend/apps/masters/models.py"
click node_process "https://github.com/subi-83/idhayam-erp/blob/main/backend/apps/process_engine/schema_api.py"
click node_process_records "https://github.com/subi-83/idhayam-erp/blob/main/backend/apps/process_engine/models.py"
click node_constraints "https://github.com/subi-83/idhayam-erp/blob/main/backend/apps/process_engine/constraint_engine.py"
click node_workcenter "https://github.com/subi-83/idhayam-erp/blob/main/backend/apps/workcenter/policy.py"
click node_employee "https://github.com/subi-83/idhayam-erp/tree/main/backend/apps/employee"
click node_accounting "https://github.com/subi-83/idhayam-erp/tree/main/backend/apps/accounting"
click node_workflow "https://github.com/subi-83/idhayam-erp/tree/main/backend/apps/workflow"
click node_movement "https://github.com/subi-83/idhayam-erp/tree/main/backend/apps/material_movement"
click node_calendar "https://github.com/subi-83/idhayam-erp/tree/main/backend/apps/calendar_hub"
click node_reports "https://github.com/subi-83/idhayam-erp/tree/main/backend/apps/reports"
click node_audit "https://github.com/subi-83/idhayam-erp/tree/main/backend/apps/audit"
click node_notifications "https://github.com/subi-83/idhayam-erp/tree/main/backend/apps/notifications"
click node_backup "https://github.com/subi-83/idhayam-erp/tree/main/backend/apps/backup"

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_react,node_controllers,node_user toneBlue
class node_router,node_api,node_shared,node_access,node_company,node_numbering,node_database toneAmber
class node_masters,node_process,node_process_records,node_constraints,node_workcenter toneMint
class node_employee,node_accounting,node_workflow,node_movement,node_calendar toneRose
class node_reports,node_audit,node_notifications,node_backup toneIndigo
```

## Components

### User interface

- [React application](https://github.com/subi-83/idhayam-erp/blob/main/frontend/src/app/App.jsx): `frontend/src/app/App.jsx`
- [Feature controllers](https://github.com/subi-83/idhayam-erp/tree/main/frontend/src/controllers): `frontend/src/controllers`

### Platform services

- [Django URL router](https://github.com/subi-83/idhayam-erp/blob/main/backend/config/urls.py): `backend/config/urls.py`
- [Views and serializers](https://github.com/subi-83/idhayam-erp/blob/main/backend/apps/core/runtime/views.py): `backend/apps/core/runtime/views.py`
- [Core runtime](https://github.com/subi-83/idhayam-erp/blob/main/backend/apps/core/runtime/records.py): `backend/apps/core/runtime/records.py`
- [Access and scope](https://github.com/subi-83/idhayam-erp/blob/main/backend/apps/core/services/access.py): `backend/apps/core/services/access.py`
- [Company structure](https://github.com/subi-83/idhayam-erp/blob/main/backend/apps/core/models/companies.py): `backend/apps/core/models/companies.py`
- [Identifier numbering](https://github.com/subi-83/idhayam-erp/blob/main/backend/apps/utils/services/numbering.py): `backend/apps/utils/services/numbering.py`
- **Relational database**

### Configurable engines

- [Master data](https://github.com/subi-83/idhayam-erp/blob/main/backend/apps/masters/models.py): `backend/apps/masters/models.py`
- [Process definitions](https://github.com/subi-83/idhayam-erp/blob/main/backend/apps/process_engine/schema_api.py): `backend/apps/process_engine/schema_api.py`
- [Process records](https://github.com/subi-83/idhayam-erp/blob/main/backend/apps/process_engine/models.py): `backend/apps/process_engine/models.py`
- [Process constraints](https://github.com/subi-83/idhayam-erp/blob/main/backend/apps/process_engine/constraint_engine.py): `backend/apps/process_engine/constraint_engine.py`
- [Work center reviews](https://github.com/subi-83/idhayam-erp/blob/main/backend/apps/workcenter/policy.py): `backend/apps/workcenter/policy.py`

### Business operations

- [Employee and HR](https://github.com/subi-83/idhayam-erp/tree/main/backend/apps/employee): `backend/apps/employee`
- [Accounting](https://github.com/subi-83/idhayam-erp/tree/main/backend/apps/accounting): `backend/apps/accounting`
- [Procurement workflow](https://github.com/subi-83/idhayam-erp/tree/main/backend/apps/workflow): `backend/apps/workflow`
- [Material movement](https://github.com/subi-83/idhayam-erp/tree/main/backend/apps/material_movement): `backend/apps/material_movement`
- [Calendar hub](https://github.com/subi-83/idhayam-erp/tree/main/backend/apps/calendar_hub): `backend/apps/calendar_hub`

### Communication and insight

- [Reports and search](https://github.com/subi-83/idhayam-erp/tree/main/backend/apps/reports): `backend/apps/reports`
- [Audit records](https://github.com/subi-83/idhayam-erp/tree/main/backend/apps/audit): `backend/apps/audit`
- [Notifications](https://github.com/subi-83/idhayam-erp/tree/main/backend/apps/notifications): `backend/apps/notifications`
- [Backup jobs](https://github.com/subi-83/idhayam-erp/tree/main/backend/apps/backup): `backend/apps/backup`

### Other components

- **ERP user**

## Connections

- ERP user → React application: uses (evidence: `README.md`)
- React application → Feature controllers: invokes
- Feature controllers → Django URL router: HTTP requests (evidence: `README.md`)
- Django URL router → Views and serializers: routes (evidence: `README.md`)
- Views and serializers → Core runtime: uses runtime
- Views and serializers → Relational database: reads or writes (evidence: `README.md`)
- Core runtime → Relational database: ORM access (evidence: `README.md`)
- Views and serializers → ERP user: API response (evidence: `README.md`)
- Access and scope → Company structure: checks access
- Identifier numbering → Relational database: allocates IDs
- Process definitions → Process records: configures records
- Process records → Process constraints: validates writes (evidence: `backend/apps/process_engine/constraint_engine.py`)
- Master data → Process definitions: provides values
- Work center reviews → Process records: extends records (evidence: `backend/apps/workcenter/apps.py`)
- Employee and HR → Process records: stores workforce data (evidence: `backend/apps/employee/management/commands/seed_hr_engine.py`)
- Procurement workflow → Process records: may use processes
- Accounting → Relational database: stores accounts
- Material movement → Relational database: stores movements
- Calendar hub → Relational database: stores events
- Reports and search → Relational database: queries data
- Audit records → Relational database: stores audit records
- Notifications → ERP user: delivers updates
- Backup jobs → Relational database: backs up data
