This is a microservices application for managing financial proposals with messaging support.
The Proposal App is a robust microservices-based application for creating and managing financial proposals. It integrates with other services through RabbitMQ messaging and provides real-time updates via WebSockets.
- Create and manage financial proposals
- Credit analysis integration with priority queue system
- Real-time notifications via WebSockets
- RESTful API with detailed documentation
- Robust error handling and validation
- Automatic retry mechanism for failed message delivery
The following technologies are used in this project:
- Java 21
- Spring Boot 3.4
- Spring AMQP (RabbitMQ)
- Spring WebSocket
- Spring Data JPA
- PostgreSQL
- Docker and Docker Compose
- Swagger/OpenAPI for API documentation
The application follows a microservices architecture:
- Proposal App (this service) - Manages proposals and acts as the entry point for users
- Credit Analysis App - Processes proposals and approves/denies based on financial criteria
- Notification App - Sends notifications to users about proposal status changes
Communication between services is managed via RabbitMQ message exchanges and queues, with WebSockets providing real-time updates to clients.
To run the Proposal App locally, follow these steps:
-
Clone the repository:
git clone https://github.com/leonardomeirels55/proposal-app.git
-
Configure the application properties:
Open the
application.properties
file located insrc/main/resources
and update the database connection details and RabbitMQ configuration according to your environment or env indocker-compose
. -
Run the application:
docker compose up
This will start all required services (PostgreSQL, RabbitMQ, and the microservices).
Once the application is running, you can access the API endpoints using a tool like Postman or cURL. Here are some example requests:
-
Create a new proposal:
POST /api/v1/proposals Content-Type: application/json
{ "name": "Leonardo", "lastName": "Meireles", "telephone": "5599999999", "cpf": "111.111.111-11", "financialIncome": 5000.0, "proposalValue": 10000.0, "paymentTerm": 24 }
-
Get all proposals:
GET /api/v1/proposals
-
Get a specific proposal:
GET /api/v1/proposals/{id}
The API documentation is available via Swagger UI at:
http://localhost:8080/api/v1/swagger-ui.html
Contributions are welcome! If you have any ideas, suggestions, or bug reports, please open an issue or submit a pull request.