How tuan2210/n10_kltn_taskobey works
Project Type and Purpose
• This is a full-stack mobile application targeted for Android devices.
• The application helps users manage tasks and time with functionalities such as CRUD operations on tasks, schedule views, and statistics.
• The backend server (built with Node.js/Express) interacts with a Cloud MongoDB database and uses JWT and Firebase for security and OTP verification.
• The mobile client is built using React Native, likely managed via Expo for Android deployment.
Analyzing the File Structure
• There are two major parts:
• “server”: Contains Node.js code, with directories for controllers, models, and routes. This indicates an MVC pattern for the backend API.
▪ Controllers (authController.js, taskController.js, etc.) handle the business logic.
▪ Models (Schedule.js, Task.js, etc.) represent the MongoDB data schemas.
▪ Routes (auth.js, task.js, user.js) define API endpoints that the frontend interacts with.
• “task_obey”: Contains the client-side code built with React Native (Expo).
▪ The “src” folder includes various components (screens like CalendarScreen, CreateTaskScreen, etc.), Redux state management files, and navigation routes.
▪ Assets directory holds sound effects and other media used in the app.
• Config files like package.json at different levels, babel.config.js, and others help manage dependencies and build processes.
README Insights
• The README highlights key functions: CRUD operations, task scheduling and statistics, phone verification with OTP, etc.
• It documents the use of MongoDB (hosted on Cloud MongoDB), Express in Node.js, and Firebase for phone number verification.
• The client, developed with React Native, runs on Android and is deployed through Expo.
• There is an indication that the server is deployed (e.g., on Render) and the mobile app through the Expo app.
a. Main Components:
• Mobile Client (React Native Application): Contains UI components, navigation (screens), Redux state management, and API request modules.
• Backend API Server (Node.js/Express): Contains controllers, models, and routes. Responsible for authentication (JWT), task operations, and user management.
• Database (Cloud MongoDB): Stores user data, tasks, schedules, etc.
• External Services:
• Firebase for phone verification (OTP).
• Possibly third-party services for notifications (inferred from sound assets) or analytics.
b. Relationships and Interactions:
• The Mobile Client makes API calls (using Redux and apiRequest modules) to the Backend API Server.
• The API Server validates requests (via controllers) and interacts with the MongoDB database to store/retrieve data.
• Authentication flows use JWT tokens to secure endpoints, and integration with Firebase ensures users verify their phone numbers.
c. Architectural Patterns and Design Principles:
• MVC Pattern in the server-side: Models, Views (data/response formatting), and Controllers managing business logic.
• Separation of concerns: Frontend (presentation logic and state management via Redux in React Native) is clearly separated from the Backend (API logic, routing, and database interaction).
• RESTful API design for clear, stateless communication.
• Use of JWT for secure authentication, and integration with Firebase as an external identity verification service.
d. Technologies, Frameworks, and Libraries:
• Backend: Node.js, Express, MongoDB, JWT, and likely Mongoose (for MongoDB interaction).
• Frontend: JavaScript, React Native, Expo, Redux for state management.
• External: Firebase for OTP phone number verification services.