Skip to main content
This guide will walk you through installing and running the FoodTech Kitchen Service. The service is built with Spring Boot 3.2.1, Java 17, and uses Gradle 8.5 for build management.

Prerequisites

Before you begin, ensure you have the following installed on your system:

Java 17+

Java Development Kit 17 or higher required

Gradle 8.5

Build tool (wrapper included in repo)

Git

Version control for cloning the repository
The project includes a Gradle wrapper (./gradlew), so you don’t need to install Gradle separately. The wrapper will automatically download the correct version.

Verify Java Installation

Check that Java 17 or higher is installed:
java -version
Expected output:
openjdk version "17.0.9" 2023-10-17
OpenJDK Runtime Environment (build 17.0.9+9)
OpenJDK 64-Bit Server VM (build 17.0.9+9, mixed mode, sharing)
If you have multiple Java versions installed, make sure Java 17+ is set as your JAVA_HOME:
export JAVA_HOME=/path/to/java17
export PATH=$JAVA_HOME/bin:$PATH

Installation Steps

1

Clone the repository

Clone the FoodTech Kitchen Service repository to your local machine:
git clone <repository-url>
cd FoodTech
The project structure follows hexagonal architecture:
FoodTech/
├── src/
│   ├── main/java/com/foodtech/kitchen/
│   │   ├── domain/          # Core business logic
│   │   ├── application/     # Use cases and ports
│   │   └── infrastructure/  # Adapters (REST, JPA, Config)
│   └── test/                # Unit and integration tests
├── build.gradle             # Build configuration
└── gradle/                  # Gradle wrapper files
2

Build the project

Use the Gradle wrapper to build the project and download all dependencies:
# Make gradlew executable (first time only)
chmod +x ./gradlew

# Build the project
./gradlew clean build
This will:
  • Download all Maven dependencies defined in build.gradle:28-56
  • Compile the Java source code
  • Run all unit and integration tests
  • Generate a JAR file in build/libs/
The first build may take a few minutes as Gradle downloads dependencies. Subsequent builds will be faster due to caching.
3

Run the tests (optional)

Verify everything is working correctly by running the test suite:
./gradlew test
Expected output:
BUILD SUCCESSFUL in 15s
66 tests completed
0 failed

Test Summary:
✅ Domain Tests: 15 passing
✅ Application Tests: 8 passing  
✅ Infrastructure Tests: 21 passing
✅ Integration Tests: 22 passing
To generate a test coverage report:
./gradlew test jacocoTestReport
View the HTML report:
open build/reports/tests/test/index.html        # Mac
xdg-open build/reports/tests/test/index.html    # Linux
start build/reports/tests/test/index.html       # Windows
4

Run the application

Start the FoodTech Kitchen Service:
# Start with Gradle (recommended for development)
./gradlew bootRun
You should see Spring Boot startup logs:
  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::                (v3.2.1)

2026-01-15 10:30:00 INFO  KitchenServiceApplication - Starting KitchenServiceApplication
2026-01-15 10:30:02 INFO  KitchenServiceApplication - Started KitchenServiceApplication in 2.3 seconds
5

Verify the installation

Test that the service is running by creating a simple order:
curl -X POST http://localhost:8080/api/orders \
  -H "Content-Type: application/json" \
  -d '{
    "tableNumber": "TEST-1",
    "products": [
      {"name": "Water", "type": "DRINK"}
    ]
  }'
Expected response:
{
  "tableNumber": "TEST-1",
  "tasksCreated": 1,
  "message": "Order processed successfully"
}
✅ If you see this response, the installation is complete and the service is working correctly!

Project Dependencies

The FoodTech Kitchen Service uses the following key dependencies defined in build.gradle:

Core Framework

// Spring Boot Starters
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-security'

spring-boot-starter-web

REST API endpoints with embedded Tomcat server

spring-boot-starter-data-jpa

JPA repositories and H2 in-memory database

spring-boot-starter-security

Security configuration and CORS headers

Additional Libraries

// JSON serialization
implementation 'com.fasterxml.jackson.core:jackson-databind'
implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310'

// Reactive programming (optional)
implementation 'io.projectreactor:reactor-core:3.6.0'

// Database
runtimeOnly 'com.h2database:h2'

// Code generation
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'

Testing

testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.security:spring-security-test'
testImplementation 'io.projectreactor:reactor-test'

Configuration

The service is configured through src/main/resources/application.yaml. Here are the key settings:

Default Configuration

server:
  port: 8080

spring:
  application:
    name: foodtech-kitchen-service
  
  datasource:
    url: jdbc:h2:mem:kitchendb
    driver-class-name: org.h2.Driver
    username: sa
    password:
  
  h2:
    console:
      enabled: true
      path: /h2-console
  
  jpa:
    hibernate:
      ddl-auto: create-drop
    show-sql: true
    properties:
      hibernate:
        format_sql: true
The H2 console is available at http://localhost:8080/h2-console for database inspection during development.

Custom Configuration

You can override default settings using environment variables or command-line arguments:
export SERVER_PORT=9090
export SPRING_DATASOURCE_URL=jdbc:h2:file:./data/kitchen
./gradlew bootRun

Docker Installation (Alternative)

If you prefer to run the service in a Docker container:
1

Build the Docker image

The project includes a multi-stage Dockerfile:
docker build -t foodtech-kitchen:latest .
The Dockerfile uses:
  • Stage 1: gradle:8.5-jdk17 for building the application
  • Stage 2: eclipse-temurin:17-jre-alpine for lightweight runtime
2

Run the container

Start the service in a Docker container:
docker run -p 8080:8080 foodtech-kitchen:latest
3

Manage the container

Common Docker commands:
# View logs
docker logs -f foodtech-api

# Stop the container
docker stop foodtech-api

# Start again
docker start foodtech-api

# Remove container
docker rm -f foodtech-api

IDE Setup

Recommended IDE configurations for development:
  1. Import Project:
    • File → Open → Select build.gradle
    • IntelliJ will auto-import Gradle project
  2. Enable Lombok:
    • Install Lombok plugin
    • Settings → Build → Compiler → Annotation Processors → Enable annotation processing
  3. Set Java SDK:
    • File → Project Structure → Project SDK → Java 17
  4. Run Configuration:
    • Add new Spring Boot configuration
    • Main class: com.foodtech.kitchen.KitchenServiceApplication

Troubleshooting

If port 8080 is already occupied:
# Find process using port 8080
lsof -i :8080

# Kill the process (Mac/Linux)
kill -9 <PID>

# Or run on different port
./gradlew bootRun --args='--server.port=9090'
If dependencies fail to download:
# Stop all Gradle daemons
./gradlew --stop

# Clean and refresh dependencies
./gradlew clean build --refresh-dependencies

# Check dependency tree
./gradlew dependencies --configuration runtimeClasspath
If you encounter Java version errors:
# Check current Java version
java -version
echo $JAVA_HOME

# Set Java 17 (Mac with brew)
export JAVA_HOME=$(/usr/libexec/java_home -v 17)

# Set Java 17 (Linux)
export JAVA_HOME=/usr/lib/jvm/java-17-openjdk
export PATH=$JAVA_HOME/bin:$PATH
If tests fail during build:
# Skip tests temporarily
./gradlew build -x test

# Run specific test
./gradlew test --tests "OrderControllerIntegrationTest"

# Run with verbose output
./gradlew test --info
For Lombok issues:IntelliJ IDEA:
  • File → Settings → Plugins → Install “Lombok”
  • File → Settings → Build, Execution, Deployment → Compiler → Annotation Processors → Enable
VS Code:
  • Install “Lombok Annotations Support for VS Code” extension
  • Java: Clean Language Server Workspace
Eclipse:
  • Download and run lombok.jar installer
  • Restart Eclipse

Development Workflow

Once installed, use these commands for daily development:
# Start service in development mode
./gradlew bootRun

Next Steps

Quickstart Guide

Create your first kitchen order in 5 minutes

API Reference

Explore all available REST endpoints

Architecture

Learn about hexagonal architecture and design patterns

Testing Guide

Learn how to run tests and verify your installation

Additional Resources

Spring Boot Docs

Official Spring Boot documentation

Gradle Docs

Gradle build tool documentation

Java 17 Features

What’s new in Java 17

Docker Guide

Docker containerization guide

Build docs developers (and LLMs) love