An enterprise-grade, highly scalable supply chain and distribution management web application tailored for the Electric Vehicle (EV) industry. Built to facilitate complex multi-tier transactions, vehicle/parts tracking, and service request lifecycles.
- Frontend: Vue 3 (Composition API), Vite, TypeScript, Bootstrap 5, Bootstrap Icons (No custom CSS)
- Backend: Node.js, Express.js, TypeScript
- Database: PostgreSQL (v16+)
- ORM: Prisma (v7+)
- Authentication: JWT (JSON Web Tokens)
- Architecture: Monolithic API with strict Double-Entry Ledger mathematics.
The system is strictly designed around maintaining ACID-compliant ledgers rather than mutable integer variables. All stock and finances are tracked by immutable double-entry traces.
- Hierarchical RBAC: System Admin (HQ) -> Super Stockist -> Dealership.
- Operations automatically validate relationships verifying up-line and downline transactions.
- Stock levels natively derive from
SUM(IN) - SUM(OUT). - Prevents direct integer modification of inventory values, guaranteeing an unbreakable audit trail of exact items inbound and outbound.
- Traces refer to distinct transaction references (e.g.
INVOICE,ADJUSTMENT,RETURN_IN).
- Generates Quotes and Proforma Invoices without impacting physical inventory.
- Finalizing as CONFIRMED automatically orchestrates
SALE_OUTinventory deductions and issues Financial Credit/Debit traces simultaneously usingprisma.$transaction. - Native support for logging VIN (Vehicle Identification Numbers).
- Service Requests: Dealerships can manage customer EV repair tickets and workflows.
- Returns (Reverse Logistics): Native support for issuing
RETURN_INallocations and tracking Credit Notes. - Payment Collection Engine: Track global and localized pending debts and log exact monetary offsets.
This project includes an automated startup script designed for Windows.
Prerequisites:
- Ensure PostgreSQL is actively running locally on port
5432. - Database URL mapping:
postgresql://postgres:123456@localhost:5432/dms(Matches seed logic).
Execution:
- Double-click
start_dms.batfrom the project root. - The script will automatically:
- Boot up the
dms-apibackend server on port:3000. - Launch the
dms-webFrontend Vite development server natively. - Open your default browser to
localhost:5173.
- Boot up the
- To safely shut down, follow the terminal prompt and hit
ENTERto sever active ports seamlessly.
To access the system, utilize the production-grade secure login screen. Authentication relies entirely on stateless JWTs passed via HTTP headers.
The database is pre-seeded with the following hierarchical users. The universal password for all demo accounts is admin123:
- System Admin (HQ) | Phone:
9999999999 - Super Stockist | Phone:
8888888888 - Dealership | Phone:
7777777777
Note: The Sidebar navigation is strictly bound by RBAC constraints; logging in as lower-tier actors will correctly suppress restricted Admin-exclusive views (like Global Network & Products) directly from the DOM.
The ecosystem is heavily normalized relying on Prisma to enforce standard relational checks:
User: Global Actor authentication and hierarchical mapping limits.Product: Segmented catalog (VEHICLE,PART,ACCESSORY) driving valuations.InventoryLedger: The mathematical source-of-truth for physical objects.AccountLedger: The mathematical source-of-truth for financial debts.Invoice&InvoiceItem: Tracks pre-sale Quotes, Proformas, and finalized sales.ServiceRequest&ServicePart: EV Repair ticketing and part consumption tracking.Payment,CreditNote,Return,Damage: Administrative resolution trackers.
Architected and developed as a complete technical assessment demonstration of full-stack scalability protocols.