How hophihung/educationcentermanagement works
Project Overview
• This is a full-stack application designed to manage different aspects of an education center (e.g., courses, classes, payments, attendance, teachers, and students).
• The project is organized into three major directories:
• The backend (built with NodeJS using NestJS and organized by domain modules).
• The frontend (built with ReactJS, with dedicated pages and components for admins, teachers, and students).
• The database (using JSON files for data dumping, intended to interface with a MongoDB-like storage).
Identifying Main Components
• Frontend Service:
• Built with ReactJS.
• Contains separate modules for admin, teacher, and student views.
• Key directories: src/components, src/pages, src/assets, src/services, etc.
• Backend Service:
• A NodeJS (NestJS) application with a modular structure.
• Organized by domains (for example, Auth, Courses, Classes, Payments, Attendances, Centers, etc.) following an MVC-like pattern.
• Contains dedicated controllers, services, DTOs, and configuration files to handle domain-specific logic.
• Database:
• Simulated via JSON files used for dumping data (files in the ‘database’ directory).
• Mentioned technology is MongoDB, meaning the backend likely interacts with a MongoDB instance.
• CI/CD and Deployment:
• GitHub workflows specified (for build, commit message validation, branch validation) that automate frontend and backend builds and publish Docker images.
• Docker containerization indicated via Dockerfiles, docker-compose.yml, and proxy configuration (nginx in the proxy directory).
Relationships and Interactions
• The Frontend communicates with the Backend via RESTful APIs.
• The Backend’s domain modules work independently but may share services/components (authentication, configuration, middlewares, and utility components).
• The Database acts as persistent storage, interfaced by the backend’s data access layers (possibly using ODM or similar pattern).
• External integrations (payment gateways like Momo and Zalopay) are encapsulated in their specific domains creating third-party interactions.
• CI/CD components (workflows, Docker, proxy server, etc.) automate the build, test, and deployment pipeline.
Architectural Patterns and Design Principles
• Modular Architecture: The backend is clearly segmented into domains (admin, auth, payments, attendances, etc.) using a decoupled module system.
• MVC Pattern: In many domains, controllers serve HTTP requests, delegate processing to services, and use DTOs for data transfer.
• Separation of Concerns: Frontend, backend, and database are isolated by responsibilities.
• Containerization and CI/CD: Use of Docker, docker-compose, and GitHub workflows illustrate continuous integration and deployment.
Relevant Technologies and Frameworks
• Backend: NodeJS, NestJS, TypeScript, Docker.
• Frontend: ReactJS, TypeScript, Vite (for building the frontend bundle), and a range of styling and utility libraries.
• Database: JSON-based files (with an intended MongoDB integration).
• Infrastructure: GitHub Actions for CI/CD, Nginx for reverse proxy (as seen in the proxy directory), and Docker for containerization.