How jack20410/restaurant-order-system works
Main Components
• API Gateway: Acts as the central entry point for all incoming requests.
• Frontend: The user interface built with modern JavaScript frameworks (React-like structure from the frontend code). It connects to the API gateway via web API calls.
• Microservices: Three distinct services, each handling a unique domain:
• User Service (port 8001): Handles user management, registration, login, and JWT authentication, interfacing with a MySQL database (named user_db on port 3306).
• Order Service (port 8002): Manages order processing, status tracking, and integration with the User Service. Uses its own MySQL database (order_db on port 3307).
• Kitchen Service (port 8003): Manages kitchen order queues and real-time order preparations with a MongoDB backend (kitchen_db on port 27017).
• User Service (MySQL)
• Order Service (MySQL)
• Kitchen Service (MongoDB)
Relationships and Data Flow
• Frontend → API Gateway (gateway handles and routes requests to the appropriate service).
• API Gateway → Each Microservice (User, Order, Kitchen) to forward requests.
• Service-to-service communication, e.g., Order Service calling User Service for user-related operations.
Architectural Patterns and Technology Stack
• Use of Docker & Docker Compose for container orchestration.
• FastAPI as the framework for services.
• RESTful HTTP communication for inter-service calls.
• Varying backend databases configured with environment variables.
Final Touches
This approach covers the microservices architecture, highlighting individual responsibilities, the separation of concerns, and service interdependencies specific to this project. The goal is to have an accurate, modular, and visually engaging system design that stakeholders and team members can easily follow and appreciate.