distrocommerce

module
v0.0.0-...-f78dc83 Latest Latest
Warning

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

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

README ΒΆ

DistroCommerce

Production-ready distributed e-commerce platform - Go microservices, Clean Architecture, Kafka Transactional Outbox, Saga orchestration, OAuth2 AS, gRPC+Protobuf, K8s and full observability stack

CI Go Report Coverage


🎯 Goal

Build a production-grade distributed system to practice every skill required for Staff Software Engineer level: Clean Architecture, distributed systems patterns, cloud infrastructure, observability, and operational excellence.

Target SLAs:

  • πŸš€ 1,000 RPS steady / 5,000 RPS burst
  • βœ… 99.9% availability (< 43 min downtime/month)
  • ⚑ p95 < 200ms, p99 < 500ms

πŸ—οΈ Architecture

Browser -> API Gateway (:8080) -> BFF Web (:8090) -> gRPC Services

API Gateway: HTTP proxy, JWT validation (JWKS), rate limiting, circuit breakers
BFF Web:     gRPC-gateway, OAuth2 client, HttpOnly sessions (Redis), transparent token refresh
Key Patterns
  • Clean Architecture β€” domain, usecase, infrastructure, delivery layers. depguard enforces no cross-layer imports.
  • Saga Orchestration β€” order creation coordinates inventory + payment with compensation.
  • Transactional Outbox + DLQ β€” at-least-once delivery for domain events.
  • BFF Pattern β€” JWT tokens never exposed to browser (XSS protection).
  • Polyglot Persistence β€” Postgres for ACID, MongoDB for flexible schemas, Redis for caching/sessions.
  • Compile-time interface checks β€” var _ port.X = (*Impl)(nil) in every adapter and use case.

Directories ΒΆ

Path Synopsis
cmd
identity-sv command
internal
pkg
graceful
Package graceful provides phase-based concurrent shutdown with OS signal handling.
Package graceful provides phase-based concurrent shutdown with OS signal handling.
health
Package health provides liveness and readiness HTTP handlers for k8s probes.
Package health provides liveness and readiness HTTP handlers for k8s probes.

Jump to

Keyboard shortcuts

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