This is an order management system for e-commerce developed in NestJS using DDD Architecture . The project implements a robust domain for order processing, with clear separation between business logic and external technologies.
It´s based on repository: Order Service Hexagonal Architecture
- Order Processing: Creation, validation, and management of order lifecycle
- Payment Management: Integration with payment gateways (Stripe, PayPal)
- Inventory Control: Stock validation and updates
- Notification System: Customer communication about order status
- Shipping Calculation: Integration with shipping APIs for freight calculation
TBD
TBD
- Node.js (version 18 or higher)
- Yarn or npm
# Install dependencies
yarn install# Development mode
yarn run start:dev
# Production mode
yarn run start:prod
# Debug mode
yarn run start:debug# Unit tests
yarn run test
# Unit tests in watch mode
yarn run test:watch
# Tests with coverage
yarn run test:cov
# End-to-end tests
yarn run test:e2e
# Tests in debug mode
yarn run test:debugThe project maintains high test coverage, including:
- Unit Tests: For entities, use cases, and adapters
- Integration Tests: For controllers and repositories
- End-to-End Tests: For complete order creation flows
- Framework: NestJS
- Language: TypeScript
- Architecture: Hexagonal (Ports and Adapters)
- Testing: Jest
- Linting: ESLint + Prettier
- Endpoint:
POST /orders - Description: Creates a new order with domain validations
- Input: Customer data and shipping address
- Output: Created order with unique ID and initial status
- HTTP Request → Controller (Input Adapter)
- Controller → UseCase (Core)
- UseCase → Entity (Core) - Business validations
- UseCase → Repository (Output Adapter) - Persistence
- Response → Controller → HTTP Response
- Implement real database persistence
- Add inventory validations
- Integrate with payment gateways
- Implement notification system
- Add shipping calculation via shipping APIs
- Implement authentication and authorization
- Add logging and monitoring
This project is under MIT license. See the LICENSE file for more details.
- Fork the project
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
For questions or support, contact through official NestJS channels: