About this project
ConstructionXS is a microservices-based construction project management system built with Spring Boot 3.3.3 and Spring Cloud. The architecture decomposes the domain into six independent services — Discovery, API Gateway, User Service, Projet Service, Tache Service, and Ressource Service — each running on its own port with its own PostgreSQL database.
The Discovery Service runs Netflix Eureka on port 8761, enabling all other services to register themselves and be discovered dynamically. The API Gateway on port 8020 serves as the single entry point for all client requests, routing traffic to the appropriate downstream service based on URL path patterns while enforcing JWT authentication through a custom gateway filter.
The User Service handles authentication and authorization using Spring Security with JWT tokens. Users can register, log in, and receive JWT tokens that are validated at the gateway level. Two roles — Admin and User — are supported, with role information embedded in the JWT claims.
The Projet Service manages construction projects with fields for name, description, start date, end date, and budget. It serves as the root aggregate in the domain hierarchy — projects contain tasks, and tasks contain resources.
The Tache Service manages tasks linked to projects. When creating a task, it validates that the referenced project exists by making a synchronous RestTemplate call to the Projet Service. Each task tracks a status through an enum: A_FAIRE (To Do), EN_COURS (In Progress), or TERMINE (Completed).
The Ressource Service manages resources allocated to tasks — including materials, software, human resources, and financial resources. It validates task existence using an OpenFeign declarative client before creating resources. Each resource includes supplier information with name, phone number, and address.
All services use Flyway for database migration management (except User Service which relies on Hibernate auto-DDL), PostgreSQL for data persistence, and Lombok for reducing boilerplate code. The system demonstrates key microservice patterns including database-per-service, API gateway routing, service discovery, and inter-service communication.
