← Back to portfolio
Completed2024 – 2025

ConstructionXS – Microservices-Based Construction Project Management System

A distributed construction project management platform built with Spring Boot microservices, featuring JWT authentication, service discovery, API gateway routing, and inter-service communication.

Role: Full-Stack Developer / Microservices Architect

Client: Personal / Academic Project

ConstructionXS – Microservices-Based Construction Project Management System

Problem

Managing construction projects involves coordinating multiple entities — projects, tasks, and resources — across distributed teams. A monolithic approach becomes difficult to scale, maintain, and deploy independently. Without proper service boundaries, changes to one module can break others, and without centralized authentication, securing distributed endpoints becomes complex.

Solution

ConstructionXS decomposes the construction management domain into independent microservices — each owning its own database and business logic — communicating through well-defined REST APIs. A Spring Cloud Gateway provides a unified entry point with JWT authentication, while Netflix Eureka enables dynamic service discovery. Projects, tasks, and resources are managed independently, with inter-service validation ensuring data integrity across service boundaries.

Tech Stack

Java 17Spring Boot 3.3.3Spring Cloud 2023.0.3Spring Cloud GatewayNetflix Eureka Server & ClientSpring Cloud OpenFeignSpring SecuritySpring Data JPAHibernatePostgreSQLFlyway 9.22JWT (jjwt 0.11.5)RestTemplateOpenFeignLombokMavenMaven WrapperDockerSpring Boot Actuator

Architecture

  • Microservices Architecture with 6 Services
  • Netflix Eureka Service Discovery (Port 8761)
  • Spring Cloud Gateway Entry Point (Port 8020)
  • JWT Authentication at Gateway Level
  • Database-per-Service Pattern (4 PostgreSQL databases)
  • Inter-Service Communication via RestTemplate
  • Declarative HTTP Client via OpenFeign
  • Flyway Database Migration per Service
  • Role-Based Access Control (Admin, User)
  • Custom Gateway Filter Factory for Auth
  • Service-to-Service Validation (Project → Task → Resource)
  • Stateless Session Management
  • BCrypt Password Hashing
  • Docker Containerization for Discovery

Features

Microservices architecture with 6 independent services

Netflix Eureka service discovery

Spring Cloud Gateway as unified entry point

JWT-based stateless authentication

Custom gateway authentication filter

Role-based access control (Admin, User)

Construction project CRUD management

Task management with status tracking (To Do, In Progress, Completed)

Resource management with type classification (Material, Software, Human, Financial)

Inter-service validation (tasks validate project existence, resources validate task existence)

RestTemplate for synchronous inter-service calls

OpenFeign declarative HTTP client for service communication

PostgreSQL databases per microservice (database-per-service pattern)

Flyway database migration management

Hibernate auto-DDL schema generation

User registration and admin registration

JWT token generation and validation

Spring Security with BCrypt password encoding

User authentication with email/password

Global exception handling with custom exceptions

Project budget and date tracking

Task assignment to projects

Resource allocation to tasks with supplier information

Supplier contact details (name, phone, address)

Custom enum types for task status and resource type

Docker support for discovery service

Maven wrapper for build management

Actuator health check endpoints

Lombok for boilerplate code reduction

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.

Challenges

  • Designing microservice boundaries for projects, tasks, and resources
  • Implementing centralized JWT authentication at the gateway level
  • Configuring Netflix Eureka for service discovery across 6 services
  • Building custom gateway filter factories for token validation
  • Implementing inter-service communication with RestTemplate and OpenFeign
  • Managing separate PostgreSQL databases per microservice
  • Coordinating Flyway migrations across distributed services
  • Ensuring data integrity through cross-service entity validation
  • Handling service port allocation and avoiding conflicts
  • Designing RESTful APIs with consistent patterns across services
  • Implementing role-based access control in a distributed environment
  • Configuring Spring Security with stateless sessions for microservices

Results

  • Fully functional microservices architecture with 6 independent services
  • Centralized JWT authentication enforced at the API gateway
  • Dynamic service discovery with Netflix Eureka
  • Independent database-per-service pattern with PostgreSQL
  • Cross-service data integrity through validation calls
  • Flyway-managed database migrations for reproducible schemas
  • Docker support for containerized deployment
  • Role-based user and admin registration system
  • RESTful API design with consistent patterns across all services
  • Separate deployment and scaling capability per service
  • Custom gateway authentication filter with token forwarding
  • Comprehensive exception handling across distributed services

Community

GitHub

Social Media

Linkedin
© Taoufik Boucetta 2026 Inc. All rights reserved.