How qsnh/meedu works
First, clearly identify the main components
• API Backend (xyz.meedu.api) – A Laravel-based service handling business logic, API endpoints, authentication, course management, orders, and so on.
• Admin Panel (xyz.meedu.admin) – A separate frontend application for backend management, likely communicating with the API.
• Frontend Clients:
– PC client (xyz.meedu.pc)
– Mobile/H5 client (xyz.meedu.h5)
• Infrastructure Components:
– Docker containers: one for PHP-FPM (PHP runtime) and one for Nginx (reverse proxy/web server), with configuration files in the docker/ directory.
– Database(s): MySQL as the primary RDBMS (evident in the migrations and configuration files).
– Caching and session management via Redis.
– Other supporting services such as file storage for uploads and logs.
Overall separation of concerns
• Frontends (PC, H5, and Admin) on one side as “client applications” that consume the API.
• Infrastructure components (Nginx reverse proxy, PHP-FPM container, database & Redis, etc.) and illustrate the communication between these layers.
• A “Docker orchestration” environment that ties the containers together (as indicated by Dockerfile, compose.yml, and docker configuration directories).
Out interactions and dependencies
• Within the API backend, indicate the following interactions:
• The Laravel application’s controllers (various versioned routes like Api/V2 and Api/V3) processing requests.
• Access to MySQL for persistent data (courses, users, orders, etc.) and Redis for caching/session management.
• Integration with external services such as payment gateways (Alipay, WeChat) or third-party APIs (Tencent, Aliyun) for video services, as seen in the codebase.
• That the web server (Nginx) sits at the front end of the Dockerized environment, routing requests to the PHP-FPM backend.
• Security boundaries (firewalls, encrypted communication for sensitive endpoints) and note that the project has security guidelines for reporting vulnerabilities.
Architectural patterns/design principles
• The system is built on a modular monolith architecture where the API provides a clear separation from the client applications (a kind of front/back separation).
• The frontends are built as single‐page applications with React (or similar, indicated by .tsx and scss files), which implies emphasis on client-side interactivity and state management.
• The use of Docker ensures containerization for development and production, so container orchestration is an important element.
• The system leverages event-driven processes (see extensive use of events & listeners in the API code) for asynchronous processing like payment success handling, media updates, etc.
• HTTP/HTTPS data flow from the frontend clients to the backend API.
• Internal API calls from the Laravel backend to MySQL and Redis.
• Docker orchestration flows (e.g., from docker-compose to containers).
• Backend/API elements (e.g., rectangles),
• Annotations for specific technologies like “PHP7.4 + Laravel8”, “MySQL”, “Redis”, “Docker”, “Nginx”, and integrations with “Aliyun/Tencent”.