How trinhkhanh29/language-center-management-nodejs works
Project type and purpose
• This is a full-stack web application for managing a language center: course registrations, instructors (“giangvien”), students (“hocvien”), staff (“nhanvien”), notifications, settings, etc.
• The backend is Node.js/Express serving a REST API; data is stored in a MySQL database. The frontend is a React single-page application consuming those APIs.
File structure
• Top level separates backend/ and frontend/.
• backend/ follows an MVC-style layout:
• config (DB connection)
• controllers (business logic for auth, courses, users, notifications…)
• middlewares (auth, validation)
• models (Sequelize or similar schemas for MySQL)
• routes (HTTP endpoints)
• scripts (data seeding, admin creation)
• server entrypoints (server.js, app.js)
• frontend/ is a Create-React-App structure:
• public (static HTML/CSS/manifest)
• src/components, src/pages, src/layouts (UI modules)
• src/api (Axios instances + per-resource API calls)
• src/services (stateful services, JWT token storage)
• src/context/hooks (React Context + custom hooks)
• src/utils/assets/tests etc.
README for additional insights
• Confirms use of MySQL (host, port, creds)
Essential architectural elements
• Don’t just group everything as “frontend” and “backend.” Break down into sub-components: API modules, middleware, seed scripts, React context vs. pure UI.
• JWT auth flow separately: login → token issuance → protected endpoints.
• DB connection config layer and environment variable store.
• Third-party integrations (e.g., mailers or analytics) if present or planned.