SmartOrder is a microservices-based reference platform built with Spring Boot and Spring Cloud, designed to demonstrate a production-ready architecture including service discovery, API Gateway, messaging, observability, monitoring, and local development tooling via Docker Compose.
The project emphasizes clean architecture, event-driven communication, cloud-native patterns, and developer experience.
- Provide a realistic microservices reference architecture
- Enable one-command local startup
- Showcase cloud-native and observability-first design
- Serve as a learning and experimentation platform
The platform is composed of:
- Spring Cloud Gateway as the API Gateway
- Multiple Spring Boot microservices
- RabbitMQ for asynchronous messaging
- Consul for service discovery and configuration
- MongoDB as the primary datastore
- Docker & Docker Compose for local orchestration
- Full observability stack (Prometheus, Grafana, InfluxDB, Dozzle, etc.)
The system follows Domain-Driven Design (DDD) and REST + HATEOAS principles.
- Spring Cloud Gateway
- Dynamic routing via Consul
- Circuit breaker fallback endpoints
- CORS configuration
- Central entry point for all APIs
Each service is:
- A standalone Spring Boot application
- Registered to Consul
- Exposing REST APIs with Spring HATEOAS
- Instrumented with Micrometer
Services include:
- Order Service
- Inventory Service
- Product Service
- (others depending on branch evolution)
- REST over HTTP
- Gateway → Services
- HATEOAS-enabled responses
- RabbitMQ
- Event-based messaging
- Decoupled service interactions
- Prepared for CQRS / eventual consistency patterns
Kafka is intentionally not used in this project. RabbitMQ was chosen for simplicity, local development, and classic messaging semantics.
- Service registration
- Health checks
- Configuration management
- Centralized discovery for Gateway routing
All services auto-register themselves to Consul at startup.
- Used by business services
- Dockerized
- Schema-less persistence
- Indexing configured per service responsibility
The project includes a complete observability stack, fully dockerized.
- Metrics scraping via Micrometer
- JVM metrics
- HTTP metrics
- Custom application metrics
- Pre-provisioned dashboards:
- JVM Micrometer Dashboard
- MongoDB Dashboard
- JMeter Load Testing Dashboard
- Auto-loaded dashboards via provisioning
- Ready-to-use visualization layer
- Time Series Database (TSDB) for storing high-frequency data like metrics, events, and logs.
- Query languages: InfluxQL (SQL-like) and Flux for advanced analytics.
- Use cases & advantages: Fast read/write, time-based aggregations, retention policies, integrates easily with Grafana and monitoring tools.
- Real-time Docker log viewer
- Centralized log streaming
- Useful for local debugging
- Unified developer dashboard
- Entry point to all tools (Grafana, Prometheus, Consul, InfluxDB, etc.)
The docker/ directory is highly structured and represents a key strength of this repository.
- Gateway
- All microservices
- RabbitMQ
- MongoDB
- Consul
- Prometheus
- Grafana
- InfluxDB
- Dozzle
- Dashy
- Multi-compose setup
- Config services separated from business services
- Reproducible local environment
- Zero external dependencies required
The Docker setup is a core part of the project, not an afterthought.
docker
├── config-services
│ ├── dashy
│ ├── grafana
│ ├── influxdb
│ ├── jmeter
│ ├── prometheus
├── docker-compose.all.yml
├── docker-compose.monitoring.yml
├── docker-compose.persistence.yml
docker-compose.all.yml orchestrates the entire ecosystem.
- Docker
- Docker Compose (v2)
The whole SmartOrder platform (infrastructure + services + observability) can be started using:
docker-compose -f docker-compose.all.yml up -dFrancesco Portus Software Architect / Solution Architect