Prerequisites
Before you begin, make sure you have the following installed:- Docker (version 20.10 or higher)
- Docker Compose (version 2.0 or higher)
- Git (for cloning the repository)
- Java 21 or higher
- Maven 3.8+
- PostgreSQL 14+
The easiest way to get started is using Docker Compose, which handles all dependencies automatically.
Quick Start with Docker
Start the Application
Launch the API and all dependencies using Docker Compose:This command will:
- Build the Furniture API Docker image
- Start the PostgreSQL database
- Initialize the database schema
- Launch the API service on port 8082
The first run may take a few minutes as Docker downloads images and builds the application.
Verify the API is Running
Once the containers are up, verify the API is running:You should see a response like:
Alternative: Running with Maven
If you prefer to run the application without Docker:Configure Database
Ensure PostgreSQL is running and create a database. Update the
src/main/resources/application.properties file with your database credentials:Making Your First API Request
Let’s create a product category and then add a product:Understanding the Response
When you create a product, the API returns aProductResponse object:
All property names use snake_case formatting in JSON responses, as configured in the application properties.
Common Operations
Search Products
Manage Inventory
Configuration
The API is configured viaapplication.properties. Key settings:
Stopping the Application
To stop the Docker containers:Health Checks
The API includes Spring Boot Actuator endpoints for monitoring:Next Steps
API Reference
Explore all available endpoints in detail
Product Management
Learn about product CRUD operations
Inventory Management
Manage stock levels and inventory
Data Model
Understand the database schema and relationships
Having trouble? Check out the Swagger UI at http://localhost:8082/doc/swagger-ui.html for interactive API testing.