OMS System is an e-commerce application built using Microservices Architecture and Domain-Driven Design (DDD) principles. The system is designed to simplify business processes, improve efficiency, and enable scalability.
- Resilience: The system remains functional even if a component fails.
- Scalability: Handles high traffic and large volumes of transactions.
- Faster Development: Microservices enable independent team development.
- Monitoring & Debugging: Full observability with Zipkin, MailDev, and Eureka.
- Customer, product, order, and payment management.
- Email notifications for order and payment confirmations.
- Communication between services via REST (OpenFeign, RestTemplate) and Kafka.
- Centralized configuration, service discovery, and OAuth2-based security.
The system is composed of independent microservices, each focused on a specific business domain:
| Domain | Microservice | Database |
|---|---|---|
| Customer | Customer management (info + address) | MongoDB |
| Product | Product and category management | PostgreSQL |
| Order | Order and order line processing | PostgreSQL |
| Payment | Payment recording and handling | PostgreSQL |
| Notification | Email notification service | MongoDB (optional/stateless) |
- Config Server: Centralized configuration management.
- Eureka Discovery Server: Service registration and discovery.
- API Gateway: Route and secure requests.
- Keycloak: OAuth2-based authentication and authorization.
- Kafka: Event-driven communication for order and payment flows.
- Zipkin: Distributed tracing.
- MailDev: Local SMTP server for testing email functionality.
- Spring Boot, Spring Cloud, Spring Security
- MongoDB, PostgreSQL, Flyway
- Apache Kafka, JavaMailSender, Thymeleaf
- Docker Compose, Keycloak, Zipkin, MailDev
- IntelliJ IDEA, Postman, PG Admin, Mongo Express
-
Clone the repository:
git clone https://github.com/your-repo/oms-system.git cd oms-system -
Run with Docker Compose:
docker-compose up -d
-
Access management tools:
- Eureka Dashboard:
http://localhost:8761 - MailDev:
http://localhost:1080 - Zipkin:
http://localhost:9411 - Keycloak:
http://localhost:8080 - Mongo Express:
http://localhost:8081 - PG Admin:
http://localhost:5050
- Eureka Dashboard:
- Uses Keycloak as the OAuth2 Authorization Server.
- Each microservice acts as a resource server.
- Uses Client Credentials Grant for secure service-to-service communication.
- API testing supported via Postman with OAuth2 tokens.
- API Testing: Postman collections available.
- Database Access: Use Mongo Express and PG Admin.
- Email Testing: Verify emails using MailDev.
- Distributed Tracing: Monitor service calls with Zipkin.
oms-system/
│
├── customer-service/
├── product-service/
├── order-service/
├── payment-service/
├── notification-service/
├── config-server/
├── discovery-server/
├── api-gateway/
├── docker-compose.yml
├── README.md
Documentation and source references are labeled with citations ([1], [2], ...) in the source code. See the docs/ directory or comments for detailed explanations.
- Each service can be scaled independently based on workload.
- Event-driven design with Kafka increases fault tolerance and decoupling.
- Easily extendable with additional features like cart, coupons, or product reviews.
Contributions are welcome! Feel free to open an issue or submit a pull request.
Distributed under the MIT License. See the LICENSE file for more information.
Let me know if you want a markdown version of this exported or if you'd like to add diagrams or setup guides!