This is an event-driven architecture designed for working with products.
Unicart is a microservices project that handles product management via an event-driven approach. It features a products service to manage product data, a notifications service to handle event consuming, and incorporates monitoring and queueing mechanisms.
First, download the project files by running the following command:
git clone https://github.com/Lapakin/unicart.gitBefore launching the application, create a .env file in the project root to store your database credentials. Use the following format:
DB_USER=dev
DB_PASSWORD=12345Start the services using Docker via the provided Makefile:
make up| Service | Endpoint |
|---|---|
| Web Application / Products API | http://localhost:8080 |
| Prometheus Dashboard | http://localhost:9090 |
To execute the full suite of unit tests, use the following command:
make go-unit-testsWhen using the Prometheus Dashboard, you can track product-related metrics using the following example query:
{__name__=~"products_.*_total"}