Skip to content

Podzilla/order

Repository files navigation

Order Microservice – Podzilla System

Overview

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.

Features

  • 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)

Badges

Java Spring Boot PostgreSQL Docker JUnit Checkstyle CI/CD

Code Style

Naming Conventions

Element Convention Example
Classes PascalCase OrderService
Methods/Vars camelCase createOrder
Constants UPPER_SNAKE_CASE MAX_ORDER_ITEMS
Packages lowercase com.podzilla.order

Best Practices

  • 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

Architecture

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

Installation and Running

Prerequisites

Ensure the following are installed:

  • Java 17
  • Maven 3.8.6+
  • Docker 24.0+
  • MySQL 8.0+
  • Redis 7.2+
  • Git

Setup

1. Clone the Repository

git clone https://github.com/Podzilla/order.git
cd authentication

2. Configure Environment

  • 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_password

3. Build Project

mvn clean install

4. Run Application

mvn spring-boot:run

The service will be available at http://localhost:8080

5. Run with Docker

docker build -t podzilla-order .
docker run -p 8080:8080 -env-file .env podzilla-order

6. Access Swagger UI

Navigate to http://localhost:8080/swagger-ui.html to explore and test API endpoints.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 5