Spring Boot REST microservices for food and drinks ordering using displaying variety of technologies. Each service uses its own instance of database choosing from NoSql and SQL. Data access is being achived with JPA and JDBC using DAO & Reposiotry pattern with help of Flyway & hibernate to migrate schemas. Internal architecture of each service follows standard layered architecture.
At the top level I use microservice architecture. Each service is layyered API with its own database, required packages for connection to DB, HTTP endpoints.
For more information check the sections bellow.
Overall project structure and used technologies
-
Products service:
- Redis as priamry DB with Redis commander
- Apache kafka for publishing events
- Swagger UI with OpenAPI
-
Orders service:
- PostgreSQL with PgAdmin
- Apache kafka for consuming events
- Swagger UI with OpenAPI
- JDBC with Flyway migration
- Aspects for logging and tracing
- Dockerization of dependencies
-
Restaurants service:
- MongoDB with MongoCompas
- Apache kafka for consuming events
- Swagger UI with OpenAPI
- Aspects for logging and tracing
- Dockerization of dependencies
-
Customers service:
- PostgreSQL with PgAdmin
- Swagger UI with OpenAPI
- JDBC with Flyway migration
- Aspects for logging and tracing
- Dockerization of dependencies
-
Delivery:
- MongoDB with MongoCompas
- Apache kafka for consuming events
- Swagger UI with OpenAPI
- Aspects for logging and tracing
- Dockerization of dependencies
-
Technologies shared among all services:
- Spring Boot
- Layered architecture
- Spring Cloud Gateway
- Configuration Server with GitHub
- Eureka Service Discovery
- Grafana & Prometheus dashboard
- Distributed tracing using Micrometer & Zipkin
- System monitoring via Actuators
- Dockerization of databases, services, servers, dashboards and more
-
Coming soon
- JWT Authentication & Authorization
- ELK Stack
- Jenkins CI/CD
To run all required containers with Docker compose orchestration :
docker-compose up
Author: Armin Smajlagic