A production-ready, extensible backend boilerplate built with Java and Spring Boot — designed to save developers hours of setup time when building full-stack applications.
This template provides a secure, scalable, and modular starting point with built-in authentication, role management, database migrations, and common backend utilities. It’s ideal for solo developers, rapid prototyping, or small teams looking to kickstart backend development without reinventing the wheel.
- JWT-based authentication with access/refresh token flows
- OTP token support (e.g., for email verification, password resets)
- Multi-device session management
- Role-Based Access Control (RBAC) with a flexible roles system
- Rate limiting using Bucket4j (per-IP request throttling)
- Modular RESTful API design using Spring Boot
- Repository abstraction with Spring Data JPA
- DTOs for request/response encapsulation
- Entity relationships and querying via JPA
- Flyway SQL scripts for database versioning and pre-initialized schema
- Tables for:
UsersTokensTokenTypeUserRolesDocumentsCollections
- Default seed data (optional, can be modified)
- Signup with email verification
- Login
- Forgot password / password reset
- Email verification
- Cron jobs for cleanup and token/database maintenance (e.g., delete expired tokens)
- Centralized and configurable logging using Log4j2
This template provides developers with a solid starting point for building backend services in full-stack applications. You can customize and extend it to fit your project needs. Whether you're building a mobile app, a web dashboard, or an internal tool, this backend gives you:
- A working JWT auth system out of the box
- Basic role-based access to endpoints
- Predefined base models and clean architecture to build on
- A time-saving alternative to building everything from scratch
This project is still a work-in-progress. While it’s fully functional for many use cases, several important improvements and additions are planned to be made in the future:
- Add CI/CD pipeline setup (e.g., GitHub Actions for build/test/lint)
- Dockerfile and
docker-compose.ymlfor containerized local development - Environment variable management (e.g., Spring profiles +
.envsupport)
- Setup guide and installation steps
- API documentation (via Swagger or Postman collection)
- Example curl/Postman requests for:
- Login / Signup
- Refresh token flow
- OTP verification
- Developer notes (how to extend models, write migrations, etc.)
- Add unit and integration tests (e.g., for auth, token flows, rate limiting)
- Mocking examples for repository/service layers
- Pagination, filtering, and sorting for REST endpoints
- Soft delete support for key models (e.g., users, documents)
- Auditing fields (created_at, updated_at, created_by, etc.)
- Optional multi-tenancy support (for org-based apps)
- Make rate limiting easily configurable or optional
- Modularize core features for easier enabling/disabling
Documentation and setup steps will be added here once the project is closer to version 1.0.