This is an ecomm microservice that consists of ecomm-api, ecomm-grpc, and an ecomm-notification microservices.
This repo is a WIP and consists of a series of tutorials available on Youtube:

docker pull mysql:8.4
docker run --name ecomm-mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=password -d mysql:8.4
Pull and run the mysql image in a detached mode (-d) with port-forwarding and an environment variable.
docker exec -i ecomm-mysql mysql -uroot -ppassword <<< "CREATE DATABASE ecomm;"
Make the CREATE DATABASE query in the mysql container with docker exec.
docker run -it --rm --network host --volume ./db:/db migrate/migrate:v4.17.0 -path=/db/migrations -database "mysql://root:password@tcp(localhost:3306)/ecomm" up
Apply the migration files in db/migrations by running the golang-migrate image with the up command.
go run cmd/ecomm-grpc/main.go
go run cmd/ecomm-api/main.go

When an admin creates an order, a new notification event for the "pending" status of an order is enqueued into the notification_events_queue table. A notification event is also enqueued for every update of the order status, since we want to send an email notification for every update.the

We have a separate notification_states table to maintain the state of the notification events even after the event has been deleted/dequeued from the notification_events_queue. The state of an event represents whether the notification email is "not sent", "sent", or "failed". Please note that the state of the notification event is what makes this ecomm notification database queue stateful and the "status" of an order has nothing to do with the statefulness.

The ecomm-notification microservice will list these notification events from the database queue (ordered in the created_at timestamp of the events) and attempt to send an email notification for each of them. An attempt to send a notification email may succeed or fail. We have three possible scenarios for this as a failure case can split up into two different cases.
sent.failed.—
$ claude mcp add ecomm \
-- python -m otcore.mcp_server <graph>