Project Introduction
Relevant source files
The following files were used as context for generating this wiki page:
Outmanage is a comprehensive outbound logistics management system designed to streamline warehouse operations, product inventory, customer delivery orders, and fleet management. The backend is built using a modern TypeScript stack, providing a robust REST API for managing the end-to-end lifecycle of logistics shipments, from order creation to AI-powered vehicle plate verification and final weighing.
The system emphasizes operational efficiency through features like bulk weighing distribution, real-time status tracking (PENDING → PROSES → SELESAI), and detailed audit logging for every entity change. It employs a Role-Based Access Control (RBAC) model to ensure secure data access across multiple warehouse facilities.
Sources: CLAUDE.md:12-25, comprehensive-swagger-api.json:7-12
Core Technology Stack
The project utilizes a strictly typed TypeScript environment running on Node.js with the Express.js framework. Data persistence is handled by a MySQL database interfaced through the Prisma ORM.
| Component | Technology | Description |
|---|---|---|
| Runtime | Node.js | Server-side execution environment. |
| Framework | Express.js | Web framework for API routing and middleware. |
| ORM | Prisma | Database toolkit for MySQL. |
| Authentication | JWT | JSON Web Tokens using custom x-outmanage-token headers. |
| AI Integration | Google Gemini | Used for automated vehicle license plate recognition. |
| Documentation | Swagger/OpenAPI | Interactive API documentation at /api-docs. |
| Logging | Winston | Centralized logging for errors and system events. |
Sources: CLAUDE.md:27-36, package.json:15-30, src/index.ts:50-65
Architecture Overview
The system follows a standard service-oriented controller architecture. Request handling is decoupled into logical layers: controllers manage HTTP concerns, services contain business logic, and Prisma handles data access.
High-Level Component Interaction
The application entry point is src/index.ts, which configures global middleware including CORS for specific domains, JSON parsing, and static file serving for generated reports.
Sources: src/index.ts:1-48, CLAUDE.md:61-73
Domain Models and Entities
The system's logic is structured around several core logistics entities that interact to form the shipment pipeline.
Entity Relationship Summary
Inventory*: Managed via Warehouses and Products. Products are assigned specific units of measurement (satuan).
- Orders:
DeliveryOrderslink customers to specific quantities of items. - Logistics:
Shipmentsrepresent physical transport events, which can be of typeANTAR(Delivery) orJEMPUT(Pickup). - Fleet:
Armadasrepresent vehicles identified by plate numbers and models.
Sources: CLAUDE.md:38-46, comprehensive-swagger-api.json:150-450
Key Business Logic Flows
Shipment Lifecycle and Weighing
Shipments progress through distinct statuses. A critical feature is the "Bulk Weighing" system, which allows weighing a product in aggregate and distributing that weight proportionally across multiple delivery order items within a shipment.
RBAC and Security
Authentication uses a non-standard header x-outmanage-token. Roles (e.g., "Pemilik") are associated with granular permissions defined by entityType (e.g., USER, SHIPMENT) and action (CREATE, READ, UPDATE, DELETE, WEIGH).
Sources: CLAUDE.md:48-59, prisma/seed.ts:35-100, comprehensive-swagger-api.json:30-40
Reporting and Analytics
The reportService provides comprehensive data aggregation for three primary report types:
- Operational Report: Tracks status distribution (PENDING/PROSES/SELESAI) for deliveries and pickups.
- Daily Output: Measures inventory throughput grouped by item, customer, or vehicle.
- Shipment Assignment: Monitors fleet utilization and vehicle verification rates.
Sources: src/services/reportService.ts:25-100, comprehensive-swagger-api.json:1000-1100
Summary
Outmanage provides a specialized backend for logistics that combines traditional inventory management with modern features like AI-assisted verification and complex weight distribution logic. Its architecture is designed for scalability across multiple warehouses while maintaining a strict audit trail for all operational changes.
Sources: README.md:1-10, CLAUDE.md:12-20