How nguyenminhquan004/quanlythuexe works
Project Type and Purpose
• The project is a full-stack mobile application for renting motorbikes – “Cho-Thu-Xe”. The application supports functionalities such as vehicle management, reservation, return & payment, notifications, and value-added services.
File Structure
• There are two main parts:
• The mobile frontend in the “loginapp” directory built with React Native (with JS/TS files, Screens, assets, and components).
• The backend (Node.js) inside the “backend” folder, including service scripts (e.g., package.json, script.sql) that support RESTful APIs, payment integration, and database operations.
• Additional support files (e.g., Expo configuration in the .expo directory, Visual Studio Code settings) indicate modern mobile development practices.
Main Components
a. Frontend Mobile Application:
• Represented by the “loginapp” folder.
• Functional screens—such as Login (DangNhap), Registration (DangKy), Home, Company Details, and user-specific screens.
• Integration of QR code scanning for vehicle check-in/check-out.
• Mention the role of third-party services (maps, payment integrations, momo SDK).
b. Backend Server:
• The Node.js server (in “backend”) handling the business logic.
• Handles RESTful APIs processing vehicle management, reservations, notifications, and payments.
• Dependency on the SQL database (configured via “script.sql”).
c. Data Store:
• A SQL database (MySQL) maintaining vehicle data, user accounts, booking logs, invoices, and additional metadata for insurance, equipment, and services.
d. External Services:
• Payment gateway integrations (momo sdk, electronic wallet systems).
• Services for determining vehicle locations.
• Possibly a third-party notification service (for push notifications, email, or SMS).
Relationships and Interactions
• Data flows for user actions, such as vehicle search, reservations, verification (via QR scan), and payment processing.
• A two-way communication where backend sends notifications and updates to the application (e.g., rental status updates, booking confirmations).
• That the backend interacts directly with the SQL database and external service APIs.
Architectural Patterns and Design Principles
• Separation of concerns:
• UI (React Native screens) vs. business logic (Node.js backend).
• Clear layering: presentation, API/middleware, and data persistence.
• Use of RESTful APIs.
• That the mobile app leverages Expo for rapid development and deployment.
• The use of micro- or modular services can be stressed if additional services (i.e., Notification, Payment, Vehicle management) are treated as separate modules within the backend.