How thykp/esm_team8 works
Main Components
• Frontend: A React application (with Vite, Tailwind, etc.) handling the user interface and interacting with the backend via REST or gRPC APIs.
• API Gateway: Kong is used as an aggregation layer to handle incoming client requests, enforce policies (e.g., CORS, rate-limiting), and route to appropriate services.
• Backend Microservices: Organized under the “backend/services” directory, you have both “complex” and “simple” microservices (e.g., chatgpt, credit, order, payment, menu, recommendation, etc.). Note that each microservice may use its own language and framework.
• Infrastructure & Messaging:
• RabbitMQ components for message brokering (see the “backend/rabbitmq-setup”).
• Deployment and orchestration via Docker (docker-compose for local development) and Kubernetes (manifests in “backend/kubernetes”).
• Monitoring and Logging: Grafana dashboards, Prometheus configurations, and related monitoring setups.
• CI/CD Pipelines: GitHub Actions workflows are set up to automate testing, container/image building and deployment.
• Cloud & Infrastructure Provisioning: Terraform scripts under the “terraform” directory that provision resources (GKE clusters, load balancers, etc.).
Relationships and Interactions
• The Frontend communicates with the API Gateway (Kong), which then routes requests to specific backend microservices.
• Microservices operate independently using REST APIs or gRPC to communicate with each other as needed.
• RabbitMQ acts as the message broker to facilitate real-time communications or asynchronous processing between services.
• Monitoring systems (Grafana/Prometheus) collect metrics from different services and infrastructure components.
• Deployment dependencies such as Kubernetes deployments, configmaps, services, jobs, and persistent volumes form another layer of the architecture where infrastructure components communicate.
Highlighting Architectural Patterns and Design Principles
• Microservices Architecture: Emphasize the decoupled, independently deployable services (with both “complex” and “simple” categorizations).
• Atomic Microservice design: Each service is built using language-agnostic technologies to showcase concurrency (in Go) and flexibility.
• Containerization and Orchestration: Docker for container builds and Kubernetes for orchestration, including CI/CD automation.
• API Gateway: Use of Kong to aggregate and secure the APIs.
• Asynchronous Communication: Integration of RabbitMQ for messaging between services.
• Observability: Monitoring through Prometheus and Grafana, which forms an integral part of the operational aspect of the system.
Final Recommendations
• Every component is clearly labeled.
• Annotations for the technology stacks (e.g., React + Tailwind for frontend; Go, Node.js, Python for microservices; Kong, RabbitMQ, Grafana, Prometheus, Kubernetes, Terraform; and CI/CD pipelines managed via GitHub Actions).