Skip to content

Sk01java/hackathon-java-assignment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Java Hackathon Assignment - 6 Hour Edition

This is a hackathon-style code assignment designed to be completed in approximately 6 hours. It covers API design, persistence, testing patterns, and transaction management in a real-world Quarkus application.

Quick Start

# 1. Start the application in dev mode
./mvnw quarkus:dev

# 2. Access Swagger UI
open http://localhost:8080/q/swagger-ui

# 3. Run tests
./mvnw test

# 4. Compile and package
./mvnw package

Before You Begin

Read BRIEFING.md for domain context, then CODE_ASSIGNMENT.md for your tasks.

Client-Facing Architecture Docs

For stakeholder and client presentations, use these fresh architecture documents:


Architecture

This codebase follows Hexagonal Architecture (Ports & Adapters) with:

  • Domain use cases isolated from REST and database concerns
  • CDI events for post-commit integration calls
  • OpenAPI-generated REST layer for the Warehouse API
  • Hand-coded REST endpoints for Stores and Products

Technologies

  • Java 17+
  • Quarkus 3.13.3
  • PostgreSQL (via Docker or Quarkus Dev Services)
  • JUnit 5 + Testcontainers + Mockito
  • OpenAPI (code generation for Warehouse API)

Health Checks

The application now exposes standard Quarkus health endpoints:

  • GET /q/health
  • GET /q/health/live
  • GET /q/health/ready

Custom checks are implemented in:

  • src/main/java/com/fulfilment/application/monolith/health/WarehouseServiceLivenessCheck.java
  • src/main/java/com/fulfilment/application/monolith/health/WarehouseServiceReadinessCheck.java

CI/CD Pipelines

GitHub Actions workflows are available in:

  • /.github/workflows/ci.yml - runs clean verify on pushes and pull requests, uploads JaCoCo report
  • /.github/workflows/cd.yml - runs after CI success on main, packages app and builds container image

Running the Code

# Compile and run tests
./mvnw clean test

# Run specific test class
./mvnw test -Dtest=ArchiveWarehouseUseCaseTest

# Start development mode
./mvnw quarkus:dev

# Access Swagger UI
open http://localhost:8080/q/swagger-ui

(Optional) Run in JVM mode

First compile:

./mvnw package

Start a PostgreSQL instance:

docker run -it --rm=true --name quarkus_test \
  -e POSTGRES_USER=quarkus_test \
  -e POSTGRES_PASSWORD=quarkus_test \
  -e POSTGRES_DB=quarkus_test \
  -p 15432:5432 postgres:13.3

Then run:

java -jar ./target/quarkus-app/quarkus-run.jar

Navigate to http://localhost:8080/index.html


Good luck and have fun! This is about demonstrating your understanding of production-grade patterns, not just writing code under pressure.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors