The backend service for Madaloc360 platform, handling reservations and messaging via WebSockets.
- Domain-Driven Design architecture
- TypeScript with strict type checking
- WebSocket messaging system
- Reservation management
- Docker containerization
- Jest testing
- ESLint + Prettier code formatting
- Node.js 18+
- pnpm
- Docker (optional)
- Clone the repository
- Install dependencies:
pnpm installStart the development server:
pnpm run devThis will:
- Start the server with hot reload
- Watch for file changes
- Run tests on changes
Build the production bundle:
pnpm run buildStart the production server:
pnpm startRun tests once:
pnpm testRun tests in watch mode:
pnpm test:devBuild the Docker image:
docker-compose buildStart the services:
docker-compose upchmod +x dev.sh
# Pour lancer en développement (par défaut)
./dev.sh
# Pour lancer en production
./dev.sh productionsrc/
├── application/ # Application layer
│ └── use-cases/ # Business use cases
├── domain/ # Domain layer
│ ├── message/ # Message domain
│ └── reservation/ # Reservation domain
├── interfaces/ # Interface adapters
│ └── websockets/ # WebSocket gateway
└── index.ts # Entry point
dev: Start development serverbuild: Build production bundlestart: Start production servertest: Run teststest:dev: Run tests in watch modelint: Run linterformat: Format code