OrderFlow Commerce is a monorepo with two services:
| Service | Path | Tech | Dev Port |
|---|---|---|---|
| API (backend) | api/ |
Spring Boot 3.2 / Java 21 / Maven | 8080 |
| Web (frontend) | web/ |
React 19 / Vite 8 / TypeScript | 5173 |
Infrastructure (PostgreSQL 15, RabbitMQ 3) runs via Docker Compose.
sudo dockerd &>/tmp/dockerd.log & # if Docker daemon is not already running
sudo docker compose up -d postgres rabbitmqWait for both containers to become healthy before starting the API.
The default application.properties uses Docker Compose hostnames (postgres, rabbitmq). For local dev outside Docker, use the local Spring profile (which reads application-local.properties with localhost hostnames):
cd api && ./mvnw spring-boot:run -Dspring-boot.run.profiles=localcd web && npm run devVite proxies /api requests to http://localhost:8080 (see vite.config.ts).
- API tests:
cd api && ./mvnw test - Web lint:
cd web && npm run lint - Web build:
cd web && npm run build
- API: http://localhost:8080
- Swagger UI: http://localhost:8080/swagger-ui/index.html
- Web: http://localhost:5173
- RabbitMQ Management: http://localhost:15672 (user:
orderflow/ pass:orderflow123)
sudo docker compose up --buildThis starts all services with hot reload enabled:
- API:
dev-entrypoint.shusesinotifywaitto watchsrc/for.java/.properties/.xmlchanges, triggersmvn compile, and DevTools auto-restarts the app (~0.5s). - Web: Runs Vite dev server (not nginx) with full HMR via volume-mounted source files.
- Debug port: JDWP on port 5005 (controlled by
SPRING_BOOT_JVM_ARGSenv var).
The vite.config.ts reads API_PROXY_TARGET env var (defaults to http://localhost:8080). In Docker Compose it's set to http://app:8080.
- Security is currently set to
permitAll()— no auth required for any endpoint. - The
mvnwwrapper must bechmod +xbefore first use (it's committed without execute bit). - Hibernate
ddl-auto=updateauto-creates schema on first run — no migration step needed. - The
application-local.propertiesfile (added for Cloud dev) overrides DB/RabbitMQ hosts tolocalhost. If you need to run the API inside Docker Compose, use-Dspring-boot.run.profiles=dockerinstead. spring-boot-devtoolsis enabled: the API auto-restarts on class changes, but not onpom.xmlchanges.- The original
web/Dockerfileis for production (build + nginx).web/Dockerfile.devis for development with HMR.