This repository contains a modern full stack application built with Spring Boot 3 and Java 21 on the backend and Next.js 15 with React 18 on the frontend.
The project simulates a secure product management platform, focusing on JWT-based authentication, RESTful API design, and modern frontend architecture using the Next.js App Router.
backend/src/main/java/dev/formacao/backend/
├── config/ # Security & CORS configuration
├── exceptions/ # Global exception handlers
├── jwt/ # Security filters & Token logic
├── produtos/ # Product domain (Controller, Service, Entity)
│ └── dto/ # Data Transfer Objects for Products
└── usuarios/ # User domain (Auth, Registration)
└── dto/ # Data Transfer Objects for Users
backend/src/main/resources/
└── db/migration/ # Flyway migration scripts
| Method | Endpoint | Description | Access |
|---|---|---|---|
POST |
/auth/login |
Authenticate user and return JWT | Public |
POST |
/auth/register |
Create a new user account | Public |
| Method | Endpoint | Description | Access |
|---|---|---|---|
GET |
/api/produtos |
List all products | Private (JWT) |
GET |
/api/produtos/{id} |
Get product details | Private (JWT) |
POST |
/api/produtos |
Create a new product | Private (JWT) |
PUT |
/api/produtos/{id} |
Update an existing product | Private (JWT) |
DELETE |
/api/produtos/{id} |
Remove a product | Private (JWT) |
| Category | Tools and Concepts |
|---|---|
| Backend Framework | Spring Boot 3 |
| Language | Java 21 |
| Security | Spring Security, JWT |
| Persistence | Spring Data JPA |
| Migrations | Flyway |
| Database | H2 (Development) |
| Frontend | Next.js 15 (App Router) |
| UI Library | React 18 |
| Styling | Tailwind CSS |
| Language | TypeScript |
- Stateless authentication using JWT
- Secure endpoints with Spring Security
- DTO-based architecture for data encapsulation
- Centralized exception handling (
@ControllerAdvice) - Database versioning with Flyway
- Next.js App Router for optimized routing
- Server and Client Components mix
- Strong typing with TypeScript
- Responsive UI with Tailwind CSS
cd backend
./mvnw spring-boot:runAPI available at:
http://localhost:8080(orhttp://localhost:4000as per your config)
cd frontend
npm install
npm run devApp available at:
http://localhost:3000
Developed by Welton Matos Dev Java Backend Developer with Full Stack experience.
Educational and portfolio use only. Feel free to study and adapt the code.
Soli Deo Gloria