This project is a web application designed to practice and improve concepts from software development such as Domain-Driven Design (DDD) and Ports and Adapters. It utilizes technologies including PHP, Slim Framework, Doctrine DBAL, Nginx, and Docker.
This project simulates an online banking application. To keep it simple, each business entity is considered a root aggregate. While we are not implementing value objects, nothing prevents us from adding them in the future. Instead of using CQRS, we focus on use cases, which include:
-
Customer Registration
- Endpoint:
POST /customer
- Request Body:
{ "name": "Enter your name", "phone": "Enter a phone number (no validation)", "address": "Enter an address (no validation)" }
- Endpoint:
-
Account Registration
- Endpoint:
POST /account
- Request Body:
{ "idCustomer": "104830f5-5503-4fb8-ab28-735d03809c30" }
- Endpoint:
-
Withdraw
- Endpoint:
POST /withdraw
- Request Body:
{ "idAccount": "100491a1-f568-476c-9604-ff76334fac4b", "amount": 50 }
- Endpoint:
-
Deposit
- Endpoint:
POST /deposit
- Request Body:
{ "idAccount": "100491a1-f568-476c-9604-ff76334fac4b", "amount": 50 }
- Endpoint:
-
Check Balance
- Endpoint:
GET /balance/{{uuid}}
- Endpoint:
-
View Statement
- Endpoint:
GET /statement/{{uuid}}
- Endpoint:
-
Transaction Between Accounts
- Endpoint:
POST /transaction
- Request Body:
{ "accountSender": "94860c46-2498-4af1-8123-2eb6cf52923e", "accountReceiver": "100491a1-f568-476c-9604-ff76334fac4b", "amount": 15.50 }
- Endpoint:
- Value Objects
- Transaction Database
- Validations