Nexus Logistics Core is a robust, modular API for managing industrial logistics, built with Symfony 6.4, PHP 8.3, and strictly following Hexagonal Architecture (Ports & Adapters) and CQRS (Command Query Responsibility Segregation) principles.
- Strict Hexagonal Architecture: Separation of Domain, Application, and Infrastructure layers.
- CQRS Pattern: Distinct Command, Query, and Event buses using Symfony Messenger.
- Rich Domain Model: Use of Value Objects (
ShippingId,Weight) and Domain Events. - Asynchronous Processing: Ready for async event handling (e.g., Audit Logging).
- OpenAPI / Swagger UI: Fully documented API endpoints.
- Framework: Symfony 6.4
- Language: PHP 8.3
- Database: PostgreSQL 16
- Queue/Cache: Redis
- ORM: Doctrine (with custom Types)
- Containerization: Docker & Docker Compose
src/
├── Shipping/
│ ├── Application/ # Use Cases (Commands, Queries, Handlers)
│ ├── Domain/ # Entities, Value Objects, Repository Interfaces
│ └── Infrastructure/ # Controllers, Persistence (Doctrine)
├── shared/ # Shared Kernel (Bus Interfaces, Base Classes)
└── Audit/ # Audit Subdomain (Event Listeners)
- Docker & Docker Compose
- Clone the repository
- Start the containers:
docker-compose up -d --build
- Run Migrations:
docker-compose exec app php bin/console doctrine:migrations:migrate
Access the Swagger UI at: http://localhost:8000/api/doc
POST /api/v1/shipping/orders: Create a new shipping order.GET /api/v1/shipping/orders/{id}: Retrieve order details.POST /api/v1/shipping/orders/{id}/assign: Assign a carrier to an order.POST /api/v1/shipping/orders/{id}/cancel: Cancel an order.
- Command Bus: handles state changes (Create, Assign, Cancel).
- Query Bus: handles reads (Get Order), returning clean DTOs.
- Event Bus: decouples side effects (e.g., Audit Logging listens to
ShippingOrderCreatedEventandShippingOrderCancelledEvent). - Value Objects: Validations (e.g., Weight limits, UUID formats) are encapsulated in the domain.
📄 License This project is distributed under the MIT license. Its purpose is strictly educational and research-based, developed as an modular API for managing logistics solution.
Note for recruiters: This project demonstrates my ability to design and implement complex systems using professional standards. It highlights my mastery of transactional integrity, clean architecture, and the development of resilient software capable of handling real-world failure scenarios.
Author: JUAN S.
Contact: https://github.com/johnyse99