A versioned RESTful User Management API built with Spring Boot, demonstrating backend fundamentals and progressive real-world enhancements.
This project is intentionally developed in versions to reflect how production backend systems evolve over time.
Each version builds on the previous one while preserving clean architecture and REST best practices.
Version 1 focuses on core backend fundamentals without database persistence, emphasizing clean REST design and application structure.
- In-memory data storage using Java collections
- Full CRUD REST endpoints
- Proper HTTP status codes (
200,201,400,404,204) - Bean Validation with meaningful error messages
- Global exception handling
- Clean separation of Controller → Service → Model
Goal of V1: Demonstrate REST fundamentals and backend architecture without database complexity.
Version 2 upgrades the API from an in-memory list to a real database-backed implementation using Spring Data JPA and an H2 in-memory database.
This version introduces persistence, automatic ID generation, and database verification while preserving the original API behavior.
- Persistent storage using Spring Data JPA
- Auto-generated IDs with
@GeneratedValue - Entity mapping with
@Entityand@Table - Request validation using Bean Validation (
@NotBlank,@Email) - H2 Console enabled for database inspection
- Clean layered architecture:
- Controller → Service → Repository
-
Run the application:
UserapiApplication
-
API Base URL:
http://localhost:8080
- URL:
http://localhost:8080/h2-console
Login Settings
- JDBC URL:
jdbc:h2:mem:userdb - Username:
sa - Password: (leave blank)
| Method | Endpoint | Description | Status Codes |
|---|---|---|---|
| GET | /users |
Get all users | 200 |
| GET | /users/{id} |
Get user by ID | 200, 404 |
| POST | /users |
Create a new user | 201, 400 |
| PUT | /users/{id} |
Update existing user | 200, 404 |
| DELETE | /users/{id} |
Delete user | 204, 404 |
These screenshots demonstrate the original in-memory implementation used in Version 1.
- Full CRUD operations
- Bean Validation with clear error responses
- Proper HTTP status codes
- Global exception handling
- Auto-generated user IDs
- Clean layered architecture
- Database persistence (V2)
- Java
- Spring Boot
- Spring Web
- Spring Data JPA
- H2 Database
- Jakarta Bean Validation
- Maven
- Postman
- DTOs for request/response separation
- Pagination and sorting with Spring Data
- API documentation with Swagger / OpenAPI
- Optional PostgreSQL integration
- Basic authentication & authorization
Ambrogio Bailey
Aspiring Backend Software Developer
Java • Spring Boot • REST APIs
GitHub: https://github.com/AmbrogioBailey
LinkedIn: https://www.linkedin.com/in/ambrogio-bailey-b67529373/






