How upadhyayaditi/taskme works
Project type and purpose
• This is a full-stack web application: a Cloud-Based Task Manager built on the MERN stack.
• Purpose: allow administrators and users to create, assign, update, and track tasks, with role-based access, notifications, and asset uploads.
File structure
A. Top-level separation
• client/ → React (Vite) frontend
• server/ → Node.js + Express backend
• README.md → high-level overview & setup instructions
B. Frontend (client/)
• src/pages → route views (Dashboard, Login, Tasks, etc.)
• src/components → UI primitives and task/user components
• src/redux → Redux Toolkit store, slices & RTK Query API slices
• src/utils/firebase.js → Firebase integration (e.g., notifications)
• postcss.config.js, tailwind.config.js → styling setup
• Vite config → build toolchain
C. Backend (server/)
• models/ → Mongoose schemas (User, Task, Notification)
• controllers/ → request handlers (userController, taskController)
• routes/ → Express routers (userRoutes, taskRoutes)
• middlewares/ → auth, error handling
• utils/ → helper functions (e.g., token generation, password hashing)
• index.js → app bootstrap, DB connection, route mounting
Core architectural patterns & interactions
• Frontend ⇄ Backend: RESTful HTTP calls managed by RTK Query slices
• Backend: MVC-style layering (routes → controllers → models)
• State management: Redux store holds auth state, tasks, users, notifications
• External services:
• MongoDB Atlas (persistent storage)
• Firebase (push notifications, if configured)
a. Components to represent:
• React SPA (client)
• Redux store & RTK Query layer
• Express API server
• MongoDB database
• Firebase service
• External assets (uploaded images stored maybe in cloud storage via server)
b. Interactions/flows:
• User browser → HTTP(S) → Express endpoints (auth, tasks, users)
• Express → Mongoose → MongoDB
• Express → Firebase SDK (for notifications)
• React components dispatch Redux actions → RTK Query triggers fetch/mutation calls
c. Architectural patterns:
• Layered MVC on server
• Client-side unidirectional data flow (Redux)
• Role-based access control enforced via authMiddleware
d. Key technologies to annotate: React, Redux Toolkit, Tailwind CSS, Express, Mongoose, MongoDB, Firebase SDK
Detail and granularity
• Middleware for authentication/error handling in the server layer.
• User roles and where RBAC is enforced.
• State transitions (e.g., “pending → fulfilled” via RTK Query).