api-gateway
Every request enters here. A Traefik v3 edge instance terminates TLS and routes to the right service, and a custom auth plugin checks tokens before a call reaches one.
- engineTraefik v3.7
- guardplugin-egommerce-auth
- tlsstack root CA
Egommerce is a microservices e-commerce platform written in Go and PHP, deployed on Kubernetes. These six components are its runtime core: an edge gateway, a cache, a message bus, a log pipeline, a datastore, and the one service that knows who its customers are.
Traffic enters through the gateway, gets authenticated against identity-svc, and lands in PostgreSQL. Along the way it is cached and evented, and every service streams its logs out.
Every one ships as its own Docker image with Kubernetes manifests in
stack/deploy/k8s/, and every one registers in Consul where applicable.
Every request enters here. A Traefik v3 edge instance terminates TLS and routes to the right service, and a custom auth plugin checks tokens before a call reaches one.
Redis in front of repeated reads: hot lookups hit memory instead of the database, and services reach it through a Redis client in the shared go-api-pkg.
RabbitMQ message queue. Services publish domain events and pick each other up asynchronously, so a change in one service reaches the rest without a synchronous call.
FluentD collection point. The service carries Dockerfile variants wired for Grafana, Loki, Promtail and Prometheus, so each build picks the pipeline the stack needs.
PostgreSQL 16, the single source of truth. Schema changes roll out through migrations kept in stack/deploy/db_migrations/, versioned with the rest of the stack.
Authentication and customer identity, written in PHP as a DDD-driven Symfony application. It owns the customer domain and issues the tokens the gateway plugin verifies.
The source tree splits into three layers, and the direction of imports only ever flows inward: the infrastructure depends on the domain, never the other way around.
Entities, rules and events. Pure business logic, free of any framework import.
Use cases. Commands, controllers, DTOs and event listeners that translate HTTP into domain work.
Symfony glue. Doctrine ORM, Redis access, HTTP endpoints and persistence wiring the domain to the real world.
Run these from the stack/ directory. Kubernetes manifests for all six services
live in stack/deploy/k8s/ and database migrations in
stack/deploy/db_migrations/.