# devaprasad-nesa/erpnext-vms-system architecture

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

- Interactive diagram: https://gitdiagram.com/devaprasad-nesa/erpnext-vms-system
- Repository: https://github.com/devaprasad-nesa/erpnext-vms-system

## Overview

VMS is a Frappe/ERPNext vehicle-service management application. Its main user journey runs from customer account and vehicle setup through service-slot booking, technician inspection and spare-parts identification, mechanic work, and accounts billing. The custom apps provide the workflow and role-aware interfaces, while the account services integrate with ERPNext records for sales, stock, payments, and related operations. The README documents the broader role dashboards and workflow; sampled source confirms selected API/service calls, but not every dashboard or integration link.

Main entry points: [`vms-system/apps/vms_inspection/vms_inspection/services.py`](https://github.com/devaprasad-nesa/erpnext-vms-system/blob/main/vms-system/apps/vms_inspection/vms_inspection/services.py) (Inspection Services), [`vms-system/apps/vms_account/vms_account/services`](https://github.com/devaprasad-nesa/erpnext-vms-system/tree/main/vms-system/apps/vms_account/vms_account/services) (ERPNext Services), [`vms-system/apps/vms_user/vms_user/services/services.py`](https://github.com/devaprasad-nesa/erpnext-vms-system/blob/main/vms-system/apps/vms_user/vms_user/services/services.py) (User Services), [`vms-system/apps/vms_vehicle/vms_vehicle/api.py`](https://github.com/devaprasad-nesa/erpnext-vms-system/blob/main/vms-system/apps/vms_vehicle/vms_vehicle/api.py) (Vehicle API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_identity["Users and Access"]
  node_user_api["User Services<br/>[services.py]"]
  node_login["Role Login<br/>[login_service.py]"]
  node_customer_profile["Customer Profile"]
end

subgraph group_vehicles["Vehicles and Booking"]
  node_vehicle_api["Vehicle API<br/>[api.py]"]
  node_vehicle_records["Vehicle Records"]
  node_booking["Service Booking"]
end

subgraph group_workshop["Workshop Operations"]
  node_inspection_api["Inspection Services<br/>[services.py]"]
  node_inspection_record["Inspection Record"]
  node_mechanic_dashboard["Mechanic Dashboard"]
  node_pagination["Pagination<br/>[pagination.py]"]
end

subgraph group_finance["Accounts Integration"]
  node_account_api["Accounts API<br/>[api.py]"]
  node_account_services["ERPNext Services"]
  node_sales["Sales and Invoices<br/>[erpnext_sales.py]"]
  node_stock["Stock Operations<br/>[erpnext_stock.py]"]
end

node_customer(("Customer"))
node_staff(("Workshop Staff"))
node_erpnext[("ERPNext Records")]

node_customer -->|"registers"| node_user_api
node_user_api -->|"uses login"| node_login
node_user_api -.->|"manages profile"| node_customer_profile
node_customer -->|"manages vehicles"| node_vehicle_api
node_vehicle_api -->|"validates relationship"| node_vehicle_records
node_vehicle_api -->|"calls booking logic"| node_booking
node_customer -->|"books service"| node_booking
node_staff -->|"inspects vehicle"| node_inspection_api
node_inspection_api -->|"creates records"| node_inspection_record
node_inspection_record -->|"uses services"| node_inspection_api
node_inspection_api -->|"looks up items"| node_account_services
node_staff -->|"views assignments"| node_mechanic_dashboard
node_mechanic_dashboard -.->|"views inspection"| node_inspection_record
node_account_api -->|"dispatches requests"| node_account_services
node_account_services -->|"exports services"| node_sales
node_account_services -->|"exports services"| node_stock
node_sales -->|"uses stock logic"| node_stock
node_sales -->|"creates invoices"| node_erpnext
node_stock -.->|"manages inventory"| node_erpnext
node_account_api -->|"creates payments"| node_erpnext
node_pagination -->|"queries records"| node_erpnext

click node_user_api "https://github.com/devaprasad-nesa/erpnext-vms-system/blob/main/vms-system/apps/vms_user/vms_user/services/services.py"
click node_login "https://github.com/devaprasad-nesa/erpnext-vms-system/blob/main/vms-system/apps/vms_user/vms_user/services/login_service.py"
click node_customer_profile "https://github.com/devaprasad-nesa/erpnext-vms-system/blob/main/vms-system/apps/vms_user/vms_user/vms_user/doctype/vms_customer_profile/vms_customer_profile.py"
click node_vehicle_api "https://github.com/devaprasad-nesa/erpnext-vms-system/blob/main/vms-system/apps/vms_vehicle/vms_vehicle/api.py"
click node_vehicle_records "https://github.com/devaprasad-nesa/erpnext-vms-system/blob/main/vms-system/apps/vms_vehicle/vms_vehicle/vms_vehicle/doctype/vms_vehicle_registration/vms_vehicle_registration.py"
click node_booking "https://github.com/devaprasad-nesa/erpnext-vms-system/blob/main/vms-system/apps/vms_vehicle/vms_vehicle/service_registration.py"
click node_inspection_api "https://github.com/devaprasad-nesa/erpnext-vms-system/blob/main/vms-system/apps/vms_inspection/vms_inspection/services.py"
click node_inspection_record "https://github.com/devaprasad-nesa/erpnext-vms-system/blob/main/vms-system/apps/vms_inspection/vms_inspection/vms_inspection/doctype/vms_vehicle_inspection/vms_vehicle_inspection.py"
click node_mechanic_dashboard "https://github.com/devaprasad-nesa/erpnext-vms-system/blob/main/vms-system/apps/vms_user/vms_user/www/vms_user_dashboard/mechanic_dashboard/mechanic_dashboard.py"
click node_pagination "https://github.com/devaprasad-nesa/erpnext-vms-system/blob/main/vms-system/apps/vms_user/vms_user/pagination.py"
click node_account_api "https://github.com/devaprasad-nesa/erpnext-vms-system/blob/main/vms-system/apps/vms_account/vms_account/api.py"
click node_account_services "https://github.com/devaprasad-nesa/erpnext-vms-system/tree/main/vms-system/apps/vms_account/vms_account/services"
click node_sales "https://github.com/devaprasad-nesa/erpnext-vms-system/blob/main/vms-system/apps/vms_account/vms_account/services/erpnext_sales.py"
click node_stock "https://github.com/devaprasad-nesa/erpnext-vms-system/blob/main/vms-system/apps/vms_account/vms_account/services/erpnext_stock.py"

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_user_api,node_login,node_customer_profile toneBlue
class node_vehicle_api,node_vehicle_records,node_booking,node_erpnext toneAmber
class node_inspection_api,node_inspection_record,node_mechanic_dashboard,node_pagination toneMint
class node_account_api,node_account_services,node_sales,node_stock toneRose
class node_customer,node_staff toneIndigo
```

## Components

### Users and Access

- [User Services](https://github.com/devaprasad-nesa/erpnext-vms-system/blob/main/vms-system/apps/vms_user/vms_user/services/services.py): `vms-system/apps/vms_user/vms_user/services/services.py`
- [Role Login](https://github.com/devaprasad-nesa/erpnext-vms-system/blob/main/vms-system/apps/vms_user/vms_user/services/login_service.py): `vms-system/apps/vms_user/vms_user/services/login_service.py`
- [Customer Profile](https://github.com/devaprasad-nesa/erpnext-vms-system/blob/main/vms-system/apps/vms_user/vms_user/vms_user/doctype/vms_customer_profile/vms_customer_profile.py): `vms-system/apps/vms_user/vms_user/vms_user/doctype/vms_customer_profile/vms_customer_profile.py`

### Vehicles and Booking

- [Vehicle API](https://github.com/devaprasad-nesa/erpnext-vms-system/blob/main/vms-system/apps/vms_vehicle/vms_vehicle/api.py): `vms-system/apps/vms_vehicle/vms_vehicle/api.py`
- [Vehicle Records](https://github.com/devaprasad-nesa/erpnext-vms-system/blob/main/vms-system/apps/vms_vehicle/vms_vehicle/vms_vehicle/doctype/vms_vehicle_registration/vms_vehicle_registration.py): `vms-system/apps/vms_vehicle/vms_vehicle/vms_vehicle/doctype/vms_vehicle_registration/vms_vehicle_registration.py`
- [Service Booking](https://github.com/devaprasad-nesa/erpnext-vms-system/blob/main/vms-system/apps/vms_vehicle/vms_vehicle/service_registration.py): `vms-system/apps/vms_vehicle/vms_vehicle/service_registration.py`

### Workshop Operations

- [Inspection Services](https://github.com/devaprasad-nesa/erpnext-vms-system/blob/main/vms-system/apps/vms_inspection/vms_inspection/services.py): `vms-system/apps/vms_inspection/vms_inspection/services.py`
- [Inspection Record](https://github.com/devaprasad-nesa/erpnext-vms-system/blob/main/vms-system/apps/vms_inspection/vms_inspection/vms_inspection/doctype/vms_vehicle_inspection/vms_vehicle_inspection.py): `vms-system/apps/vms_inspection/vms_inspection/vms_inspection/doctype/vms_vehicle_inspection/vms_vehicle_inspection.py`
- [Mechanic Dashboard](https://github.com/devaprasad-nesa/erpnext-vms-system/blob/main/vms-system/apps/vms_user/vms_user/www/vms_user_dashboard/mechanic_dashboard/mechanic_dashboard.py): `vms-system/apps/vms_user/vms_user/www/vms_user_dashboard/mechanic_dashboard/mechanic_dashboard.py`
- [Pagination](https://github.com/devaprasad-nesa/erpnext-vms-system/blob/main/vms-system/apps/vms_user/vms_user/pagination.py): `vms-system/apps/vms_user/vms_user/pagination.py`

### Accounts Integration

- [Accounts API](https://github.com/devaprasad-nesa/erpnext-vms-system/blob/main/vms-system/apps/vms_account/vms_account/api.py): `vms-system/apps/vms_account/vms_account/api.py`
- [ERPNext Services](https://github.com/devaprasad-nesa/erpnext-vms-system/tree/main/vms-system/apps/vms_account/vms_account/services): `vms-system/apps/vms_account/vms_account/services`
- [Sales and Invoices](https://github.com/devaprasad-nesa/erpnext-vms-system/blob/main/vms-system/apps/vms_account/vms_account/services/erpnext_sales.py): `vms-system/apps/vms_account/vms_account/services/erpnext_sales.py`
- [Stock Operations](https://github.com/devaprasad-nesa/erpnext-vms-system/blob/main/vms-system/apps/vms_account/vms_account/services/erpnext_stock.py): `vms-system/apps/vms_account/vms_account/services/erpnext_stock.py`

### Other components

- **Customer**
- **Workshop Staff**
- **ERPNext Records**

## Connections

- Customer → User Services: registers (evidence: `README.md`)
- User Services → Role Login: uses login (evidence: `vms-system/apps/vms_user/vms_user/services/services.py`)
- User Services → Customer Profile: manages profile
- Customer → Vehicle API: manages vehicles (evidence: `README.md`)
- Vehicle API → Vehicle Records: validates relationship (evidence: `vms-system/apps/vms_vehicle/vms_vehicle/api.py`)
- Vehicle API → Service Booking: calls booking logic (evidence: `vms-system/apps/vms_vehicle/vms_vehicle/api.py`)
- Customer → Service Booking: books service (evidence: `README.md`)
- Workshop Staff → Inspection Services: inspects vehicle (evidence: `README.md`)
- Inspection Services → Inspection Record: creates records (evidence: `vms-system/apps/vms_inspection/vms_inspection/vms_inspection/doctype/vms_vehicle_inspection/vms_vehicle_inspection.py`)
- Inspection Record → Inspection Services: uses services (evidence: `vms-system/apps/vms_inspection/vms_inspection/vms_inspection/doctype/vms_vehicle_inspection/vms_vehicle_inspection.py`)
- Inspection Services → ERPNext Services: looks up items (evidence: `vms-system/apps/vms_inspection/vms_inspection/services.py`)
- Workshop Staff → Mechanic Dashboard: views assignments (evidence: `README.md`)
- Mechanic Dashboard → Inspection Record: views inspection
- Accounts API → ERPNext Services: dispatches requests (evidence: `vms-system/apps/vms_account/vms_account/api.py`)
- ERPNext Services → Sales and Invoices: exports services (evidence: `vms-system/apps/vms_account/vms_account/services/__init__.py`)
- ERPNext Services → Stock Operations: exports services (evidence: `vms-system/apps/vms_account/vms_account/services/__init__.py`)
- Sales and Invoices → Stock Operations: uses stock logic (evidence: `vms-system/apps/vms_account/vms_account/services/erpnext_sales.py`)
- Sales and Invoices → ERPNext Records: creates invoices (evidence: `vms-system/apps/vms_account/vms_account/services/erpnext_sales.py`)
- Stock Operations → ERPNext Records: manages inventory
- Accounts API → ERPNext Records: creates payments (evidence: `vms-system/apps/vms_account/vms_account/api.py`)
- Pagination → ERPNext Records: queries records (evidence: `vms-system/apps/vms_user/vms_user/pagination.py`)
