How gwentechsolutions-dev/ajay-enterprises works
INVENTRA is a business operations platform spanning inventory, rentals, billing/accounting, fleet, labour, and reporting. A representative workflow starts with an authenticated user creating an operational or financial record through an API route; the route checks access, validates input, and invokes domain logic that persists changes and may post ledger or inventory movements. The tree and excerpts establish these backend relationships, but do not show the UI-to-API wiring. Many feature areas are present in the tree but their internal connections are not sampled.
Main entry points: return-notes/route.ts Material returns API · invoices/route.ts Invoice API · db.ts Application database · customers/route.ts Customer records API
Components 18
Access and platform
- Session authentication
src/lib/auth.ts - Role permissions
src/lib/permissions.ts - Application database
src/lib/db.ts
Operational workflows
- Customer records API
src/app/api/v1/customers/route.ts - Material returns API
src/app/api/v1/return-notes/route.ts - Inventory ledger
src/lib/inventory/ledger.ts - Fleet services
src/lib/fleet/service.ts - Bulk materials import
src/lib/materials/bulk-import-service.ts
Finance and accounting
- Invoice API
src/app/api/v1/invoices/route.ts - GST calculations
src/lib/accounting/gst-engine.ts - Accounting ledger
src/lib/accounting/ledger.ts - Chart of accounts
src/lib/accounting/chart-of-accounts.ts
Rental lifecycle
- Rental agreements
src/lib/rentals/agreement-service.ts - Private file storage
src/lib/storage.ts - WhatsApp notifications
src/lib/notifications/whatsapp.ts
Reporting and integrations
- Dashboard reporting
src/lib/reports/dashboard-service.ts
Other components
- Business user
- Supabase Storage
Connections 26
- Business user → Customer records API: submits records
- Business user → Material returns API: submits returns
- Business user → Invoice API: creates invoices
- Customer records API → Session authentication: checks session
src/app/api/v1/customers/route.ts - Customer records API → Role permissions: checks access
src/app/api/v1/customers/route.ts - Customer records API → Application database: reads and writes
src/app/api/v1/customers/route.ts - Material returns API → Session authentication: checks session
src/app/api/v1/return-notes/route.ts - Material returns API → Role permissions: checks access
src/app/api/v1/return-notes/route.ts - Material returns API → Inventory ledger: posts movements
src/app/api/v1/return-notes/route.ts - Material returns API → Fleet services: validates vehicle
src/app/api/v1/return-notes/route.ts - Material returns API → Rental agreements: allocates batches
src/app/api/v1/return-notes/route.ts - Material returns API → Application database: reads and writes
src/app/api/v1/return-notes/route.ts - Invoice API → Session authentication: checks session
src/app/api/v1/invoices/route.ts - Invoice API → Role permissions: checks access
src/app/api/v1/invoices/route.ts - Invoice API → GST calculations: calculates tax
src/app/api/v1/invoices/route.ts - Invoice API → Chart of accounts: resolves accounts
src/app/api/v1/invoices/route.ts - Invoice API → Accounting ledger: posts journal
src/app/api/v1/invoices/route.ts - Invoice API → Application database: reads and writes
src/app/api/v1/invoices/route.ts - Inventory ledger → Application database: persists movements
src/lib/inventory/ledger.ts - Fleet services → Application database: reads and writes
src/lib/fleet/service.ts - Bulk materials import → Application database: imports materials
src/lib/materials/bulk-import-service.ts - Rental agreements → Private file storage: saves agreements
src/lib/rentals/agreement-service.ts - Rental agreements → WhatsApp notifications: sends notifications
src/lib/rentals/agreement-service.ts - Private file storage → Supabase Storage: uploads files
src/lib/storage.ts - Dashboard reporting → Application database: queries reporting data
src/lib/reports/dashboard-service.ts - Dashboard reporting → Accounting ledger: uses accounting reports
src/lib/reports/dashboard-service.ts