A full-stack inventory management application with a Spring Boot API and a React frontend.
backend/— Spring Boot 3.4.2 API, Java 21, Maven, Spring Security, JWT, MySQL, and Flyway.frontend/— React, TypeScript, and Vite sign-in page and inventory dashboard.docker-compose.yml— runs the API and MySQL from the repository root.
- Docker and Docker Compose
- Node.js 20.19+ (or 22.12+) for the frontend
- Java 21 (for running the backend outside Docker)
- OpenSSL to generate a JWT signing key
-
Copy
.env.exampleto.envand replace the placeholders. Set unique strong values forMYSQL_ROOT_PASSWORDandDB_PASSWORD; do not commit.env.PowerShell:
Copy-Item .env.example .envmacOS/Linux/Git Bash:
cp .env.example .env
-
Generate a signing key with
openssl rand -base64 64and place it inJWT_SECRET. -
Start both services from the repository root:
docker compose up -d --build
The API is available at http://localhost:8081; MySQL is available at localhost:3307. Stop the services with docker compose down.
See backend/README.md for running the API and frontend/README.md for the UI. Start the API on port 8081 for the Vite development proxy, or update frontend/.env.local to use another API URL.
Flyway migrations are in backend/src/main/resources/db/migration. Hibernate validates the schema at startup and does not create or alter tables automatically. The checked-in backend/db.sql is a legacy export for a different schema and is not used for application setup.
- Register:
POST /auth/register - Login:
POST /auth/login(returns a JWT) - Protected API requests require
Authorization: Bearer <token>.
Registration accepts profile fields only, does not accept role assignments or persistence metadata, requires passwords of at least 12 characters, and omits the password from its response.