How uitxmic/-nt208.p23.antt-group-3 works
Main Components Identification
• Frontend: The FrontEnd folder highlights a React.js application (note files such as index.html, main.jsx, and App.jsx), utilizing Tailwind CSS for UI/UX.
• Backend: The BackEnd folder comprises files for a Node.js (Express.js) API server. It includes controllers (NotificationController, PostingController, TradeController, UsersController, VoucherController), routes, middleware (authMiddleware), configuration (viewEngine), and an environment file (.env).
• Database: The README indicates MySQL is used for data storage. The existence of various SQL procedure files (found in BackEnd/PROD.SQL.PROCEDURES) illustrates the use of stored procedures for key functionalities like voucher creation, user creation, and transaction handling.
• External/Supporting Components: Consider including external services (such as potential blockchain-based security features mentioned under “Tính năng mở rộng”) as future expansion elements.
Relationships and Interactions
• Backend Workflows: Within the Backend, illustrate how the route layer directs API requests to the appropriate controller, which in turn invokes business logic. Middleware (e.g., authMiddleware) should be shown as intercepting requests to secure endpoints.
• Database Integration: Show that the backend communicates with the MySQL database to execute SQL procedures for creating and updating voucher/user records. This should also include error-handling and transaction commit/rollback flows.
• Optional Future Components: Add a note or component that hints at future enhancements like blockchain integration for securing transactions or AI modules for voucher recommendations.
Architectural Patterns and Design Principles
• MVC Pattern: Highlight that the backend is designed along an MVC-like pattern. Controllers manage HTTP request processing, routes define endpoints, and SQL procedures encapsulate the core database logic.
• Separation of Concerns: Emphasize the clear split between the frontend (presentation layer), backend (API and business logic layer), and data layer (MySQL database).
• Modular Layout: The directory structure reflects a modular design (distinct directories for controllers, routes, middlewares, and views), making it easier to map out the system.
Relevant Technologies and Frameworks
• Backend: Node.js, Express.js, and MySQL, along with stored procedures for efficient database operations.
• Frontend: React.js with Tailwind CSS for a modern and responsive UI, leveraging Vite as the build tool.
• Others: Environment configuration (.env), ESLint for code quality, and package management via npm.