The Order Microservice is a core component of the Podzilla system, responsible for managing everything related to customer orders. It is built with Java Spring Boot and handles order creation, updates, cancellation, tracking, and more.
- Create new orders
- Retrieve orders by ID or user
- Update order information
- Cancel or delete orders
- Track real-time shipment status
- Manage order statuses (e.g., pending, shipped, delivered)
| Element | Convention | Example |
|---|---|---|
| Classes | PascalCase | OrderService |
| Methods/Vars | camelCase | createOrder |
| Constants | UPPER_SNAKE_CASE | MAX_ORDER_ITEMS |
| Packages | lowercase | com.podzilla.order |
- Single Responsibility Principle
- Proper JavaDoc for public classes/methods
- Centralized error handling
- Logging with SLF4J
- No magic values – use constants
- Thorough unit testing with JUnit 5
com.podzilla.orders
│
├── controller/ # REST endpoints
├── service/ # Business logic
├── model/ # Data models (Order, Status, etc.)
├── repository/ # DB access via JDBC
├── dto/ # Clean input/output objects
└── config/ # Configuration classes
Ensure the following are installed:
- Java 17
- Maven 3.8.6+
- Docker 24.0+
- MySQL 8.0+
- Redis 7.2+
- Git
git clone https://github.com/Podzilla/order.git
cd authentication- Create a .env file based on .env.example and update with your postgreSQL
credentials
SPRING_DATASOURCE_URL=jdbc:mysql://localhost:5432/order_db
SPRING_DATASOURCE_USERNAME=root
SPRING_DATASOURCE_PASSWORD=your_passwordmvn clean installmvn spring-boot:runThe service will be available at http://localhost:8080
docker build -t podzilla-order .
docker run -p 8080:8080 -env-file .env podzilla-orderNavigate to http://localhost:8080/swagger-ui.html to explore and test API endpoints.