How maruki00/deligo-saas works
Main Components
• Auth Service (found in cmd/auth and internal/auth)
• Customer Service (cmd not explicitly, but internal/customer indicates its presence)
• Delivery Service (cmd/delivery and related internal implementations)
• Order Service (cmd/order and internal/order)
• Product Service (cmd/product and internal/product)
• Shop/Restaurant Service (cmd/shop and internal/shop; note also modules under internal/menu, roles, permessions, and users which seem related to restaurant/merchant management)
• Courier Service (cmd/courier)
• Proxy Service (cmd/proxy) – likely an API gateway or reverse proxy
• Messaging/Event Bus (RabbitMQ, see pkg/rabbitmq)
• Database Layers (MySQL with tables like orders, users, products, etc.; also PostgreSQL references)
• External Services (Stripe for payment, possibly external notification systems)
• Common Utilities and Libraries (packages under pkg/ such as jwt, redis, s3, security, websocket, etc.)
• Domain and Shared Code: Represent common domain models and shared components (as seen in internal/shared and various domain-specific folders) to emphasize Domain-Driven Design (DDD) usage.
Relationships and Interactions
• That each microservice exposes its own API endpoints, often implemented via GRPC endpoints (notice the proto definitions and GRPC generated code in several directories).
• The Proxy Service routes requests to the appropriate service (Auth, Order, Product, etc.).
• Microservices also communicate with each other via asynchronous messaging through RabbitMQ (using the publisher/consumer packages).
• How each microservice connects to the databases (MySQL/Postgres) and possibly use shared caching (Redis, as indicated in pkg/redis).
Architectural Patterns and Design Principles
• Domain-Driven Design (DDD): Each service has clearly defined domains (with separate “domain”, “app”, and “infrastructure” layers).
• Separation of Concerns: Different folders for command-line entry points (cmd/*) versus business logic (internal/*) highlights clear separation between service bootstrapping and domain logic.
• Microservice Communication: Indicate that services interact using gRPC, REST endpoints, or message brokers (RabbitMQ).
• Configurability: Note configuration management indicated by config directories and config files (e.g., config.yaml.example).
Technologies, Frameworks, and Libraries
• Go Language (all services are built in Go).
• RabbitMQ for messaging (as seen in pkg/rabbitmq).
• MySQL and PostgreSQL for persistence (files such as mysql.sql and postgres.sql along with pkg/mysql and pkg/postgres).
• Stripe integration for payment processing.
• gRPC and Protocol Buffers, as demonstrated by the proto files under proto/.
• Additional utilities such as JWT for authentication (pkg/jwt), Redis, S3 storage, and WebSocket support (pkg/websocket).