Skip to content

feat: add spring boot and react starter - #1

Merged
anish-sahoo merged 11 commits into
mainfrom
feat/starter
Oct 20, 2026
Merged

anish-sahoo merged 11 commits into
mainfrom
feat/starter

Conversation

@anish-sahoo

Copy link
Copy Markdown
Contributor
  • Spring Boot 4.1 backend (Java 25, Gradle) under com.example.app, with controller -> service -> dao -> repository -> entity layers and one route, GET /api/messages
  • Postgres with Flyway. V1__create_messages.sql creates the messages table and inserts a row. Hibernate only validates the schema
  • mise run db:dev:migration <name> diffs the entities against the dev db and writes the next migration with Hibernate's update script
  • Code-first contract: springdoc exports contract/openapi.json (committed), and hey-api generates the frontend client from it
  • React + Vite frontend. nginx serves the build in deploy and keeps only the /api reverse proxy and SPA fallback from the Khoury boilerplate, no caching or auth
  • compose.yaml runs the deploy images, compose.override.yaml runs dev targets with bind mounts. .env reaches the app only through compose, so running bootRun or vite on the host fails on purpose
  • Spotless (google-java-format) and Error Prone for the backend, oxlint/oxfmt/tsc for the frontend. CI runs the four lint/format jobs through mise
  • AGENTS.md and .agents/rules/ hold a few basic code rules for students to build on

- /api/v1 health and messages endpoints with matching schemas
- native SQL queries on JpaRepository, actuator removed
- Flyway migrate and status tasks running in containers
- spec exported to backend/openapi.json with a no-database profile
- frontend matches the typescript starter, dev uses dev:up and dev:down
- same mise tasks and CI jobs as the other starters
- add a short docs/ARCHITECTURE.md with the request flow
- health no longer queries the database
- rename stack:dev:* to docker:dev:*
- fold db:dev:down into db:dev:stop, which keeps the data
- make func-style a lint warning
- force colors for tasks and the dev web container
- rename db:dev:start and db:dev:stop to db:dev:up and db:dev:down
- use @requiredargsconstructor instead of hand-written constructors
- document the pattern in the backend rules
- add RequestLogger, a servlet filter matching the other starters' format
- skip successful health checks, warn on 4xx, error on 5xx
- apply and check migrations with the Flyway CLI from mise, using DATABASE_URL from .env
- stop the dev backend from migrating on start; deploys still do
- setup installs deps, migrates and generates the contract, like the other starters
- drop the Flyway Gradle plugin
- shorten console logs to date, level, logger and message
- stop serving the OpenAPI spec at runtime
- remove PORT and LOG_LEVEL defaults from application.yaml
- pass DATABASE_URL to Flyway in the migrate tasks instead of templating it in [env]
@anish-sahoo
anish-sahoo merged commit a71e039 into main Oct 20, 2026
5 checks passed
@anish-sahoo
anish-sahoo deleted the feat/starter branch October 20, 2026 01:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant