Brazil Bank is a banking application built with Java 8 and Spring Boot, following the Hexagonal Architecture (Ports and Adapters) approach.
The goal of this project is to provide a clean, maintainable, and scalable design where business rules are completely decoupled from frameworks and external dependencies.
- Account domain with business rules separated in services
- REST API built with Spring Boot
- PostgreSQL integration using Spring Data JPA
- Domain-driven approach with
entities,value objects, andenums - Decoupled infrastructure layer for persistence and external adapters
- Lombok to reduce boilerplate code
- Java 8
- Spring Boot 2.7.x
- Spring Data JPA
- PostgreSQL
- Lombok
- Gradle
git clone https://github.com/your-username/brazilbank.git
cd brazilbankThe database is managed via Docker Compose.
All configuration values are stored in the .env file at the project root.
Start the container:
docker-compose up -d./gradlew bootRunOr using IntelliJ, just run the BrazilbankApplication class.
POST /customers
Content-Type: application/json
{
"name": "Anderson de Souza",
"email": "anderson17ads@hotmail.com",
"document": "123456",
"phone": "11994048640",
"birth_date": "1988-11-22"
}GET /customers
Content-Type: application/jsonResponse Example
[
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Anderson de Souza",
"email": "anderson17ads@hotmail.com",
"document": "123456",
"phone": "11994048640",
"birth_date": "1988-11-22",
"created_at": "2025-30-09 01:07:05",
"updated_at": null,
"deleted_at": null
},
{
"id": "660e8400-e29b-41d4-a716-446655440111",
"name": "Maria Silva",
"email": "maria.silva@example.com",
"document": "654321",
"phone": "11987654321",
"birth_date": "1990-05-15",
"created_at": "2025-30-09 01:07:05",
"updated_at": null,
"deleted_at": null
}
]GET /customers/5bfcd89e-d567-409c-a5b1-48bc912d42aa
Content-Type: application/jsonResponse Example
{
"id": "5bfcd89e-d567-409c-a5b1-48bc912d42aa",
"name": "Anderson de Souza",
"email": "anderson17ads@hotmail.com",
"document": "123456",
"phone": "11994048640",
"birth_date": "1988-11-22",
"created_at": "2025-30-09 01:07:05",
"updated_at": null,
"deleted_at": null
}POST /accounts
Content-Type: application/json
{
"balance": 500.00,
"customer_id": "550e8400-e29b-41d4-a716-446655440000",
"type": "CHECKING"
}GET /accounts
Content-Type: application/jsonResponse Example
[
{
"id": "1475eb2d-2565-41a5-a289-2f03d2f6e256",
"number": "3332ba32-a",
"balance": 20.00,
"customerId": "c28ecd31-189f-4b51-ab55-eadf7c85e1d8",
"type": "CHECKING"
},
{
"id": "ac59e405-b53d-418e-ae0b-fb7a6102055f",
"number": "d3942fd2-1",
"balance": 20.00,
"customerId": "c28ecd31-189f-4b51-ab55-eadf7c85e1d8",
"type": "CHECKING"
}
]Desenvolvido por Anderson Souza – Desenvolvedor Sênior em PHP & Java
LinkedIn: Anderson de Souza