unicart

module
v0.0.0-...-dd0d759 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 16, 2026 License: MIT

README

unicart

This is an event-driven architecture designed for working with products.

Description

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.


Setup

1. Clone the Repository

First, download the project files by running the following command:

git clone https://github.com/Lapakin/unicart.git
2. Configure Environment Variables

Before 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=12345
3. Launch the Application

Start the services using Docker via the provided Makefile:

make up

Services and Endpoints

Service Endpoint
Web Application / Products API http://localhost:8080
Prometheus Dashboard http://localhost:9090

Unit Testing

To execute the full suite of unit tests, use the following command:

make go-unit-tests

Notes

Prometheus Monitoring

When using the Prometheus Dashboard, you can track product-related metrics using the following example query:

{__name__=~"products_.*_total"}

Directories

Path Synopsis
cmd
notifications command
products command
internal
products/handler/mock
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
products/repository/mock
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
products/service/mock
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL