The Challenge
Distributed Development Complexity
Developing distinct Frontend and Backend repositories often leads to integration hell. The team needed a way to develop independently while maintaining a unified, reproducible production environment.
Complex Asset Workflows
Industrial work orders require strict state management (Draft -> Submitted -> Assigned -> In Progress -> Completed) with role-specific permissions at every stage.
Deployment Consistency
Inconsistent environments between local dev, staging, and production were causing “it works on my machine” issues, delaying release cycles.
The Solution
Unified Docker Orchestration
Implemented a master Docker Compose strategy using Git Submodules. This allows a single command to spin up the entire stack (FE, BE, DB) with consistent configurations across all environments.
Robust State Machine
Designed a state-driven workflow in NestJS that enforces strict business logic for work order transitions, ensuring that only authorized roles (Mechanics, Supervisors) can trigger specific status changes.
Cookie-Based Security
Adopted a hybrid security model using JWTs stored in HttpOnly cookies, managed by a dedicated Next.js Proxy Middleware. This eliminates XSS risks while maintaining a seamless user experience.
Spare Part Request System
Integrated an inventory module where mechanics can request parts directly attached to work orders, with an approval workflow for supervisors.
Technical Impact
Zero-Config Onboarding
New developers can clone the repo and run docker compose up to get a fully seeded, production-like environment in minutes.
Separation of Concerns
Frontend and Backend teams work in separate repositories with their own CI/CD pipelines, integrated only at the orchestration level.
Enhanced Observability
Global HTTP logging and standardized error filtering in the backend provide clear insights into system health and debugging.