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:Installation Steps
Clone the repository
Clone the FoodTech Kitchen Service repository to your local machine:The project structure follows hexagonal architecture:
Build the project
Use the Gradle wrapper to build the project and download all dependencies: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.
Run the tests (optional)
Verify everything is working correctly by running the test suite:Expected output:To generate a test coverage report:View the HTML report:
Project Dependencies
The FoodTech Kitchen Service uses the following key dependencies defined inbuild.gradle:
Core Framework
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
Testing
Configuration
The service is configured throughsrc/main/resources/application.yaml. Here are the key settings:
Default Configuration
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:Docker Installation (Alternative)
If you prefer to run the service in a Docker container:Build the Docker image
The project includes a multi-stage Dockerfile:The Dockerfile uses:
- Stage 1:
gradle:8.5-jdk17for building the application - Stage 2:
eclipse-temurin:17-jre-alpinefor lightweight runtime
IDE Setup
Recommended IDE configurations for development:- IntelliJ IDEA
- VS Code
- Eclipse
-
Import Project:
- File → Open → Select
build.gradle - IntelliJ will auto-import Gradle project
- File → Open → Select
-
Enable Lombok:
- Install Lombok plugin
- Settings → Build → Compiler → Annotation Processors → Enable annotation processing
-
Set Java SDK:
- File → Project Structure → Project SDK → Java 17
-
Run Configuration:
- Add new Spring Boot configuration
- Main class:
com.foodtech.kitchen.KitchenServiceApplication
Troubleshooting
Port 8080 already in use
Port 8080 already in use
If port 8080 is already occupied:
Gradle dependencies not downloading
Gradle dependencies not downloading
If dependencies fail to download:
Java version mismatch
Java version mismatch
If you encounter Java version errors:
Tests failing on build
Tests failing on build
If tests fail during build:
IDE not recognizing Lombok annotations
IDE not recognizing Lombok annotations
For Lombok issues:IntelliJ IDEA:
- File → Settings → Plugins → Install “Lombok”
- File → Settings → Build, Execution, Deployment → Compiler → Annotation Processors → Enable
- Install “Lombok Annotations Support for VS Code” extension
- Java: Clean Language Server Workspace
- Download and run lombok.jar installer
- Restart Eclipse
Development Workflow
Once installed, use these commands for daily development: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