How otienobryan/zamu_server works
This is a NestJS backend for operational and business-management workflows, rather than the generic starter described by its README. Users reach feature controllers over HTTP; controllers delegate requests to domain services, while authentication validates staff credentials and issues JWTs. The source tree exposes aviation bookings, fuel-station sales, purchasing and inventory, manufacturing, vehicle conversions, chat, and finance capabilities. Sampled controllers confirm service delegation, but most service implementations and module wiring were not sampled, so cross-domain calls and persistence links are intentionally not inferred.
Main entry points: auth.service.ts Staff authentication · database.config.ts Relational database · app.module.ts Nest application · sales.controller.ts Fuel sales and reports
Components 23
API and identity
- Nest application
src/app.module.ts - Staff authentication
src/auth/auth.service.ts - Staff records
src/entities/staff.entity.ts - Relational database
src/config/database.config.ts
Travel operations
- Bookings and passengers
src/bookings/bookings.controller.ts - Appointments
src/appointments/appointments.controller.ts
Sales and supply
- Fuel sales and reports
src/sales/sales.controller.ts - Fuel pricing
src/fuel-prices/fuel-prices.controller.ts - Purchasing and stores
src/purchase-orders/purchase-orders.controller.ts - Raw materials
src/raw-materials/raw-materials.controller.ts
Production and service
- Finished products
src/finished-products/finished-products.controller.ts - Work orders
src/work-orders/work-orders.controller.ts - Vehicle analysis
src/conversion-vehicles/conversion-vehicles.controller.ts - Image analysis
src/conversion-vehicles/services/vehicle-analysis.service.ts - Cloudinary media
src/cloudinary/cloudinary.service.ts
Finance and workforce
- Key accounts
src/key-accounts/key-accounts.controller.ts - Account ledger
src/key-account-ledger/key-account-ledger.controller.ts - Financial reports
src/financial-reports/financial-reports.controller.ts - Expenses and payments
src/expenses/expenses.controller.ts - Staff operations
src/staff-members/staff-members.controller.ts
Communication
- Chat API
src/chat/chat.controller.ts - Realtime chat
src/chat/chat.gateway.ts
Other components
- API user
Connections 24
- API user → Nest application: sends requests
- Nest application → Staff authentication: routes identity
- Staff authentication → Staff records: looks up staff
- Staff authentication → Relational database: queries records
- API user → Bookings and passengers: manages bookings
- API user → Appointments: manages appointments
- API user → Fuel sales and reports: records and reports
- Fuel sales and reports → Relational database: delegates sales
- API user → Fuel pricing: manages fuel prices
- API user → Purchasing and stores: receives orders
- Purchasing and stores → Relational database: delegates orders
- API user → Raw materials: manages materials
- API user → Finished products: manages products
- Finished products → Cloudinary media: uploads images
- API user → Work orders: manages work
- API user → Vehicle analysis: manages conversions
- Vehicle analysis → Image analysis: requests analysis
- API user → Key accounts: manages accounts
- API user → Account ledger: records ledger entries
- API user → Financial reports: requests reports
- API user → Expenses and payments: manages expenses
- API user → Staff operations: manages staff
- API user → Chat API: uses chat
- API user → Realtime chat: opens realtime chat