You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Product management system built as a multi-module Java application. Handles products, categories, stock tracking, price filtering, and role-based administration through a REST API and a server-rendered web interface.
The API serves JSON over HTTP with JWT authentication and OpenAPI documentation. The UI is a separate Spring Boot application that consumes the API and renders Thymeleaf templates with HTMX for dynamic behavior — no JavaScript framework, no build pipeline.
Modules
product-catalogue/
├── pom.xml Maven aggregator (builds both modules)
├── docker-compose.yml All services: db, api, ui
├── start.sh Build, start, stop, test script
├── product-catalogue-api/ REST API — Spring Boot, JPA, PostgreSQL
│ └── Dockerfile Multi-stage build
└── product-catalogue-ui/ Web UI — Thymeleaf, HTMX, RestClient
└── Dockerfile Multi-stage build
Each module has its own pom.xml with spring-boot-starter-parent. The root POM is an aggregator only — no shared dependencies, no inheritance. Modules build independently or together.
Tech Stack
API (product-catalogue-api)
Component
Technology
Version
Language
Java (OpenJDK Temurin)
21
Framework
Spring Boot
3.5.0
Security
Spring Security
6.x
JWT
JJWT
0.12.6
Persistence
Spring Data JPA / Hibernate
6.x
Database
PostgreSQL
17
Migrations
Flyway
managed
DTO Mapping
MapStruct
1.6.3
Validation
Jakarta Bean Validation
3.x
API Docs
SpringDoc OpenAPI (Swagger UI)
2.8.6
Testing
JUnit 5, MockMvc
5.12+
Test DB
H2 (in-memory)
managed
UI (product-catalogue-ui)
Component
Technology
Version
Language
Java (OpenJDK Temurin)
21
Framework
Spring Boot
3.5.0
Templating
Thymeleaf
3.x
Dynamic behavior
HTMX
2.0.4
HTTP Client
Spring RestClient
6.x
Typography
Cormorant Garamond, DM Sans
—
Styling
Custom CSS (no framework)
—
Form validation
Jakarta Bean Validation
3.x
Testing
JUnit 5, MockMvc, Mockito
5.12+
Infrastructure
Component
Technology
Version
Containers
Docker
24.0+
Orchestration
Docker Compose
2.20+
Build
Maven (wrapper included)
3.9+
Startup
start.sh (bash)
—
Services
Service
Port
PostgreSQL
5876
Database
API
8585
REST API, Swagger UI
UI
8586
Web interface
Quick Start
Using start.sh
git clone https://github.com/psandis/product-catalogue.git
cd product-catalogue
./start.sh # build and start locally (Java 21 required)
./start.sh stop # stop services
./start.sh status # check what's running
./start.sh test# run all 53 tests
./start.sh --help # show all commands
./mvnw package # both modules
./mvnw test# all tests
./mvnw package -pl product-catalogue-api # api only
./mvnw test -pl product-catalogue-api -Dtest=ProductServiceTest # single test