Podzilla is an open-source e-commerce platform built on a microservices architecture, designed to deliver a scalable, modular, and efficient solution for online retail. The platform is composed of multiple specialized repositories, each handling a distinct aspect of the e-commerce ecosystem, such as authentication, cart management, order processing, warehouse operations, courier logistics, ERP integration, frontend user experience, API gateway, infrastructure, and shared utilities. By leveraging modern technologies and best practices, Podzilla ensures robust performance, security, and extensibility for businesses of all sizes.
The Podzilla organization consists of the following repositories, each serving a specific function within the platform:
- Authentication: Manages user authentication and authorization using Spring Boot, Spring Security, and JWT.
- Cart: Handles shopping cart functionality, including adding, updating, and removing items.
- Order: Manages order creation, processing, and tracking.
- Warehouse: Oversees inventory management and stock tracking.
- Courier: Coordinates delivery logistics and courier services.
- ERP: Integrates enterprise resource planning for business operations like accounting and supply chain.
- Frontend: Provides the user interface for the Podzilla platform, built with modern web technologies.
- API-Gateway: Acts as the entry point for all client requests, routing them to appropriate microservices.
- Infrastructure: Manages deployment and orchestration using Kubernetes.
- Podzilla-Utils-Library: A shared utility library hosted on JitPack, providing RabbitMQ configurations for asynchronous communication between microservices via events and queues.
- Modular Architecture: Each microservice focuses on a single responsibility, enabling independent development, deployment, and scaling.
- Asynchronous Communication: Utilizes RabbitMQ (via
podzilla-utils-library
) for event-driven communication between services. - Scalable Infrastructure: Kubernetes-based deployment ensures high availability and fault tolerance.
- Secure Authentication: Robust user authentication and authorization using JWT and Spring Security.
- Rich User Experience: A responsive frontend built with modern web technologies (e.g., React).
- API Gateway: Centralized request routing and load balancing for seamless client-service interactions.
- Comprehensive Testing: Unit and integration tests across all repositories using JUnit and other testing frameworks.
- Code Quality: Enforced through Checkstyle and consistent Java conventions across all services.
Podzilla repositories adhere to Java conventions and best practices for consistency and maintainability:
- Naming Conventions:
- Classes: PascalCase (e.g.,
OrderService
,CartController
) - Methods and Variables: camelCase (e.g.,
addItemToCart
,orderId
) - Constants: UPPER_SNAKE_CASE (e.g.,
MAX_CART_ITEMS
) - Packages: Lowercase with meaningful hierarchy (e.g.,
com.podzilla.cart.service
)
- Classes: PascalCase (e.g.,
- Best Practices:
- Use descriptive names that reflect functionality (e.g.,
processOrder
instead ofprocOrd
). - Follow the single-responsibility principle for classes and methods.
- Include JavaDoc for public APIs.
- Enforce code quality with Checkstyle to maintain formatting and style consistency.
- Use constants for magic numbers/strings.
- Implement proper exception handling with logging.
- Use descriptive names that reflect functionality (e.g.,
- Frontend: For the Frontend repository, follow JavaScript/TypeScript conventions with ESLint for linting and Prettier for formatting.
Podzilla adopts a microservices architecture with Domain-Driven Design (DDD) and Clean Architecture principles. Each repository is structured into layers:
- Models: Represent domain entities (e.g.,
Order
,Product
). - Repositories: Handle data persistence (e.g., JDBC for MySQL, MongoDB, or Redis).
- Services: Encapsulate business logic (e.g.,
CartService
,OrderService
). - Controllers: Expose RESTful APIs (e.g.,
/api/cart
,/api/order
). - DTOs: Decouple API contracts from domain models for flexible data exchange.
The API-Gateway routes requests to appropriate microservices, while podzilla-utils-library enables asynchronous communication via RabbitMQ events and queues. The Infrastructure repository uses Kubernetes for orchestration, ensuring scalability and resilience.
Each repository has its own setup instructions detailed in its README. Below is a general guide to set up the entire Podzilla ecosystem:
- Java 17
- Maven 3.8.6+
- Docker 24.0+
- Kubernetes (e.g., Minikube or a cloud provider like GKE, EKS)
- Node.js 18+ (for Frontend)
- MySQL 8.0+ or other databases as specified
- RabbitMQ 3.12+
- Git
-
Clone All Repositories:
git clone https://github.com/Podzilla/<repository>.git
Replace
<repository>
with each repo name (e.g.,authentication
,cart
, etc.). -
Install Podzilla-Utils-Library:
- Add the JitPack dependency to your
pom.xml
for microservices:<repositories> <repository> <id>jitpack.io</id> <url>https://jitpack.io</url> </repository> </repositories> <dependencies> <dependency> <groupId>com.github.Podzilla</groupId> <artifactId>podzilla-utils-library</artifactId> <version>main</version> </dependency> </dependencies>
- Add the JitPack dependency to your
-
Configure Environment:
- Each repository includes a
.env.example
file. Copy it to.env
and configure database, RabbitMQ, and other settings.
- Each repository includes a
-
Build and Run Microservices:
- For each microservice (e.g., Authentication, Cart):
cd <repository> mvn clean install mvn spring-boot:run
- Or use Docker:
docker build -t podzilla-<repository> . docker run -p <port>:<port> --env-file .env podzilla-<repository>
- For each microservice (e.g., Authentication, Cart):
-
Deploy with Kubernetes:
- Navigate to the Infrastructure repository:
cd infrastructure kubectl apply -f k8s/
- Ensure Kubernetes is configured with appropriate secrets and environment variables.
- Navigate to the Infrastructure repository:
-
Run Frontend:
cd frontend npm install npm start
The frontend will be available at
http://localhost:3000
. -
Access API Gateway:
- The API Gateway routes requests to microservices, typically at
http://localhost:8080
.
- The API Gateway routes requests to microservices, typically at
-
Run Tests:
- For each microservice:
cd <repository> mvn test
- For Frontend:
cd frontend npm test
- For each microservice:
We welcome contributions to any Podzilla repository! To contribute:
- Fork the target repository.
- Create a feature branch (
git checkout -b feature/your-feature
). - Make changes and ensure tests pass:
- For microservices:
mvn test
- For Frontend:
npm test
- For microservices:
- Run linting and code quality checks:
- Microservices:
mvn checkstyle:check
- Frontend:
npm run lint
- Microservices:
- Commit changes with a clear message (
git commit -m "Add your feature"
). - Push to your branch (
git push origin feature/your-feature
). - Open a pull request with a detailed description.
- Ensure CI/CD pipelines pass.
Please adhere to the code style guidelines and include tests for new features or bug fixes.