A modern, cloud-native e-commerce platform built with microservices architecture using Spring Boot and Spring Cloud.
NimbusCommerce follows a microservices architecture pattern with the following components:
- API Gateway: Central entry point for all client requests
- Auth Service: Authentication and authorization management
- Customer Service: Customer profile and management
- Order Service: Order processing and management
- Logistics Service: Delivery and logistics coordination
- Notification Service: Multi-channel notification handling
- Java: 21
- Spring Boot: 3.5.7
- Spring Cloud: 2024.0.0
- Build Tool: Maven
- Spring Cloud Gateway: API Gateway routing and filtering
- Spring Security: Authentication and authorization
- JWT (JSON Web Tokens): Token-based authentication
- Spring Data JPA: Database persistence layer
- PostgreSQL: Primary database
- Apache Kafka: Event-driven messaging
- gRPC & Protocol Buffers: Inter-service communication
- Lombok: Boilerplate code reduction
- Docker: Containerization
nimbuscommerce/
βββ api-gateway/ # API Gateway service
βββ auth-service/ # Authentication & Authorization service
βββ customer-service/ # Customer management service
βββ order-service/ # Order management service
βββ logistics-service/ # Logistics & delivery service
βββ notification-service/ # Notification handling service
βββ architecture/ # Architecture diagrams
βββ http-requests/ # API testing requests
β βββ api-requests/ # REST API requests
β βββ grpc-requests/ # gRPC requests
βββ docker-compose.yml # Docker orchestration
Before you begin, ensure you have the following installed:
- Java Development Kit (JDK): 21 or higher
- Maven: 3.8 or higher
- Docker: Latest version
- Docker Compose: Latest version
- PostgreSQL: 15 or higher (if running locally)
- Apache Kafka: Latest version (if running locally)
git clone https://github.com/yourusername/nimbuscommerce.git
cd nimbuscommerceBuild all microservices using Maven:
# Build all services
mvn clean install
# Or build individual services
cd auth-service && mvn clean install
cd customer-service && mvn clean install
cd order-service && mvn clean install
cd logistics-service && mvn clean install
cd notification-service && mvn clean install
cd api-gateway && mvn clean installThe easiest way to run the entire platform:
docker-compose up -dEach service can be run independently:
# Auth Service
cd auth-service
mvn spring-boot:run
# Customer Service
cd customer-service
mvn spring-boot:run
# Order Service
cd order-service
mvn spring-boot:run
# Logistics Service
cd logistics-service
mvn spring-boot:run
# Notification Service
cd notification-service
mvn spring-boot:run
# API Gateway (run this last)
cd api-gateway
mvn spring-boot:runEach service requires PostgreSQL database configuration. Update application.properties in each service:
spring.datasource.url=jdbc:postgresql://localhost:5432/your_database
spring.datasource.username=your_username
spring.datasource.password=your_password
spring.jpa.hibernate.ddl-auto=updateConfigure Kafka connection in services that use event streaming:
spring.kafka.bootstrap-servers=localhost:9092
spring.kafka.consumer.group-id=your-service-groupConfigure JWT secret and expiration in auth-service/application.properties:
jwt.secret=your-secret-key
jwt.expiration=86400000The project includes HTTP request files for testing APIs:
-
Auth Service:
http-requests/api-requests/auth-service/- Login:
login-request.http - Validate Token:
validate-request.http
- Login:
-
Customer Service:
http-requests/api-requests/customer-service/- Create Customer:
create-customer.http - Get Customer:
get-customer.http - Update Customer:
update-patient.http - Delete Customer:
delete-customer.http
- Create Customer:
-
Order Service:
http-requests/api-requests/order-service/- Create Order:
create-order.http - Get Order:
get-order.http - Update Order:
update-order.http - Delete Order:
delete-order.http
- Create Order:
- Customer Service:
http-requests/grpc-requests/CustomerService/ - Logistics Service:
http-requests/grpc-requests/OrderLogisticsService/
Run tests for all services:
# Run all tests
mvn test
# Run tests for specific service
cd auth-service && mvn testEach service includes a Dockerfile for containerization. Build and run individual services:
# Build Docker image
docker build -t nimbuscommerce/auth-service:latest ./auth-service
# Run container
docker run -p 8080:8080 nimbuscommerce/auth-service:latest- JWT-based authentication and authorization
- Spring Security integration
- Token validation at API Gateway level
- Role-based access control (RBAC)
The platform uses two communication patterns:
-
Synchronous Communication:
- REST APIs for external clients
- gRPC for inter-service communication
-
Asynchronous Communication:
- Apache Kafka for event-driven messaging
- Event streaming for order updates, notifications, etc.
All client requests go through the API Gateway, which routes to appropriate services:
/auth/**β Auth Service/api/customers/**β Customer Service/api/orders/**β Order Service/api/logistics/**β Logistics Service/api/notifications/**β Notification Service
(To be implemented)
- Spring Boot Actuator endpoints
- Distributed tracing
- Centralized logging
- Health checks
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Your Name
- GitHub: @Rajdev Singh
- Spring Boot and Spring Cloud communities
- Apache Kafka
- gRPC and Protocol Buffers
- PostgreSQL
Note: This is an active development project. Features and documentation are continuously being updated.
