This repository contains a microservice project developed to manage and send notifications efficiently and scalably. Utilizing best software engineering practices, this service is designed with a focus on robustness, testability, and observability.
-
Microservices Architecture: The project follows a microservices architecture, allowing each component to be independent and scalable, facilitating system maintenance and evolution.
-
RabbitMQ for Request Queueing: To ensure scalability and low latency, RabbitMQ is used to queue notification requests, ensuring a smooth processing flow even during peak loads.
-
External API: An external API has been developed to allow easy and flexible integration with other systems, facilitating the sending of notification requests to the microservice.
-
MongoDB as Database: MongoDB is used as the database to store relevant information about notifications, ensuring efficient persistence and retrieval of data.
-
Rich Domain and DDD Practices: The service is implemented using Rich Domain concepts and following Domain-Driven Design (DDD) practices, resulting in a more cohesive and business-oriented design.
-
Comprehensive Testing: The code is covered by a comprehensive suite of automated tests, ensuring the quality and reliability of the system. Unit, integration, and end-to-end tests are employed to validate the microservice's behavior in different scenarios.
-
Observability: The application features observability resources, including appropriate metrics and logging, ensuring that the performance and state of the system can be effectively monitored.
-
Grafana for Monitoring: We use Grafana to visualize and monitor important metrics related to RabbitMQ, the API, and Docker Compose containers, providing valuable insights into the system's performance and health.
-
Nginx for Load Balancing:
- Nginx is utilized for load balancing, distributing incoming traffic across multiple instances of the microservice to improve performance and reliability.
- Clone this repository.
- Make sure you have Docker and Docker Compose installed on your machine.
- Navigate to the project's root directory and run
docker-compose up
to start the application. - Access the external API interface through the URL provided by the documentation.
- Explore metrics and visualizations in Grafana to monitor the system in real-time.
Application | Host |
---|---|
API | http://localhost:5009 |
MongoDB | http://localhost:27017 |
Prometheus | http://localhost:9090 |
Mongo exporter | http://localhost:9216 |
Mongo exporter | http://localhost:9419 |
CadVisor | http://localhost:8080 |
Grafana | http://localhost:3000 |
![web-api](https://private-user-images.githubusercontent.com/87771786/305584121-965872ef-a769-4039-9f51-e59d20787216.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6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1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWNlN2FkOWJjM2FhODA5NDA3M2YwZmUxZWFiOTRmYzMyYzQzYTlmZTFmMjU1YThkOTA0Zjg5NmQxZGQzNmUzZTkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.crk9kDUW7U20RegHedCF2CjUhEEoOhHvbsQckdy4NpM)
![docker](https://private-user-images.githubusercontent.com/87771786/305584181-57967814-9364-432f-ba6e-a06f9e823a30.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5NjA3MzMsIm5iZiI6MTczODk2MDQzMywicGF0aCI6Ii84Nzc3MTc4Ni8zMDU1ODQxODEtNTc5Njc4MTQtOTM2NC00MzJmLWJhNmUtYTA2ZjllODIzYTMwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA3VDIwMzM1M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWQxY2Q4NGNlYmY1OTdkNTQ2ZjIzOWFlYzlmNzQ4MjNkMWI5MmEzMmRjYTRhYTU3YTAxNzY1MDczMTIxNzk1ZjcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.HvARE9SIdWjbQe-LIo5nSM2pt0KQPRrDggg0encZvHk)
![mongodb](https://private-user-images.githubusercontent.com/87771786/305584224-8915aa02-ea6e-4735-b3f4-3c498447990e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5NjA3MzMsIm5iZiI6MTczODk2MDQzMywicGF0aCI6Ii84Nzc3MTc4Ni8zMDU1ODQyMjQtODkxNWFhMDItZWE2ZS00NzM1LWIzZjQtM2M0OTg0NDc5OTBlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA3VDIwMzM1M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTcxOTVkMDgwZTcxNDJkMzVlNzhhMzExMGM1MzFiZGMxYzk2OTU1NWZiNzAwMGQ2NWQ5NmJkMjMwNDQ3NzM1NmImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.XgkZDsSYYNXkIIF3CIJUrN96QXshoILqPg6qXV2bWAs)
Contributions are welcome! Feel free to propose improvements, fix bugs, or add new features. Just open an issue or submit a pull request, and we'll be happy to review.
This project is licensed under the MIT License.
For more information or support, contact Fernando Areias.