cc00c6c6ae
Sets up toolchain pinning, format/lint (Biome + Spotless), lefthook pre-commit hooks, Docker Compose for Postgres, and trivial passing tests for both stacks. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1.6 KiB
1.6 KiB
App
A full-stack web app: React 19 frontend talking to a Spring Boot 3.4 REST API backed by PostgreSQL 17.
The frontend is a single-page app; it is not server-side rendered. This is not a monorepo — it is
one project with two build roots (frontend/ and backend/) under a single git repo.
Stack: Vite 6 + React 19 (TypeScript, strict) — Biome 1.9 for format + lint — Vitest + Testing Library for frontend tests. Spring Boot 3.4 (Java 21) — Maven — Google Java Format via Spotless — JUnit 5 + AssertJ for backend tests. PostgreSQL 17 via Docker Compose; Flyway owns all schema changes.
Rules
- Never suppress warnings with
@SuppressWarnings,biome-ignore, or// noinspection; fix the root cause. - All HTTP responses are validated with Zod on the frontend before touching any field; never access raw
response.datadirectly. - Flyway owns the schema — never
ALTER TABLEmanually or let Hibernate generate DDL. Write a migration instead. - Logs via SLF4J only on the backend (
LOG_LEVELenv var controls root level); do not useSystem.out.println. - Transaction boundaries live in the service layer, not controllers or repositories. No
@Transactionalon@RestController.
Running locally
docker compose up -d # PostgreSQL on :5432
mvn -f backend/pom.xml spring-boot:run # backend on :8080
cd frontend && npm run dev # frontend on :5173 (proxies /api → :8080)
Verify everything at once: mise run check (requires mise; otherwise run the four commands in .mise.toml manually).