How minhhoanq/ecommerce works
Project type and purpose
• This is a microservices-based e-commerce backend platform. It consists of five domain services (Catalog, Order, Payment, User, Notification) plus an API Gateway and shared common libraries.
• Each domain service exposes gRPC endpoints (with Swagger/OpenAPI specs), persists to its own Postgres database, publishes and/or consumes Kafka events, and in some cases uses Redis or S3. The Payment service is implemented in TypeScript, the others in Go.
File structure
• Top-level folders:
• catalog_service, order_service, user_service, notification_service: Go microservices
• payment_service: Node/TypeScript microservice
• gateway: Go API gateway (HTTP→gRPC with grpc-gateway)
• common: shared constants, logger, utilities
• docker-compose.dev.yaml: brings up local Kafka, Postgres, Redis, S3-minio, and all services.
• Inside each Go service:
• api/: proto and swagger definitions
• cmd/: main.go to start gRPC (and HTTP gateway if applicable)
• configs/: DB, Kafka, gRPC, Redis, Mail, JWT setup
• internal/app: server bootstrap
• internal/dataaccess: DB migrations and clients, Kafka producers/consumers, Redis, S3
• internal/handler: gRPC handlers and inter-service gRPC clients
• internal/service: core business logic
• internal/initial: wiring and dependency injection
• Payment service mirrors similar layering in TS: src/config, src/dataaccess, src/modules, src/consumer, src/service, and proto under src/proto.
README for additional insights
• The README simply names the project “ecommerce,” confirming this is an end-to-end microservices system for an online store.