How arunkumar262004/erp works
This is a garment-manufacturing ERP: staff sign in to a React SPA, work across CRM, accounts, purchasing, inventory, production, and delivery, and review operational dashboards and reports. The SPA calls a Laravel API backed by MySQL. Production stages are tracked individually; the API can create delivery records when quality-check work is marked delivered. The README documents the main capabilities, while sampled source verifies dashboard aggregation, frontend routing, API configuration, and this production-to-delivery behavior; unsampled module internals are represented at directory level.
Main entry points: api.php Laravel API · App.tsx ERP workspace · client.ts API client · QuotationApproved.php Approval event
Components 26
ERP frontend
- ERP workspace
frontend/src/App.tsx - Session and access
frontend/src/auth/AuthContext.tsx - API client
frontend/src/api/client.ts - Dashboard view
frontend/src/pages/DashboardPage.tsx - CRM workspace
frontend/src/pages/crm - Accounts workspace
frontend/src/pages/accounts - Production workspace
frontend/src/pages/production - Purchase workspace
frontend/src/pages/purchase - Delivery tracking
frontend/src/pages/delivery - Reports view
frontend/src/pages/ReportsPage.tsx
Customer and accounts
- Contacts
backend/app/Models/Contact.php - Leads and tasks
backend/app/Models/Lead.php - Quotations and billing
backend/app/Models/Quotation.php
Manufacturing operations
- Products and materials
backend/app/Models/RawMaterial.php - Suppliers and orders
backend/app/Models/PurchaseOrder.php - Production stages
backend/app/Models/ProductionOrder.php - Dispatch records
backend/app/Models/Delivery.php
API and reporting
- Laravel API
backend/routes/api.php - Dashboard aggregation
backend/app/Http/Controllers/Api/DashboardController.php - Module reports
backend/app/Http/Controllers/Api/ReportController.php - MySQL data
backend/config/database.php
Notifications
- Approval event
backend/app/Events/QuotationApproved.php - Webhook dispatch
backend/app/Jobs/SendN8nWebhook.php - Approval email
backend/app/Mail/QuotationApprovedMail.php
Other components
- ERP staff
- n8n service
Connections 34
- ERP staff → ERP workspace: uses
- ERP workspace → Session and access: protects routes
frontend/src/App.tsx - ERP workspace → Dashboard view: routes to
frontend/src/App.tsx - ERP workspace → CRM workspace: routes to
frontend/src/App.tsx - ERP workspace → Accounts workspace: routes to
frontend/src/App.tsx - ERP workspace → Production workspace: routes to
frontend/src/App.tsx - ERP workspace → Purchase workspace: routes to
frontend/src/App.tsx - ERP workspace → Delivery tracking: routes to
frontend/src/App.tsx - ERP workspace → Reports view: routes to
frontend/src/App.tsx - Session and access → API client: uses
frontend/src/auth/AuthContext.tsx - Dashboard view → API client: loads dashboard
- API client → Laravel API: requests API
frontend/src/api/client.ts - Laravel API → Dashboard aggregation: routes dashboard
backend/routes/api.php - Laravel API → Module reports: routes reports
backend/routes/api.php - Dashboard aggregation → MySQL data: aggregates data
backend/app/Http/Controllers/Api/DashboardController.php - Module reports → MySQL data: queries reports
- CRM workspace → API client: uses API
frontend/src/pages/crm/CrmTasksPage.tsx - Accounts workspace → API client: uses API
- Production workspace → API client: uses API
- Purchase workspace → API client: uses API
- Delivery tracking → API client: uses API
- Reports view → API client: uses API
- Laravel API → Contacts: manages records
- Laravel API → Leads and tasks: manages pipeline
- Laravel API → Quotations and billing: manages billing
- Laravel API → Products and materials: manages stock
- Laravel API → Suppliers and orders: manages purchasing
- Laravel API → Production stages: manages orders
- Laravel API → Dispatch records: manages dispatch
- Production stages → Dispatch records: has deliveries
backend/app/Models/ProductionOrder.php - Laravel API → Approval event: raises approval
- Approval event → Webhook dispatch: dispatches webhook
backend/app/Listeners/SendQuotationApprovedWebhook.php - Webhook dispatch → n8n service: sends webhook
backend/app/Jobs/SendN8nWebhook.php - Approval event → Approval email: notifies approval