How abhay-gits/taskmates works
Project Type and Purpose
• TaskMates is a full-stack task management application with three clients:
• Web frontend (React + TypeScript + Vite + Tailwind)
• Mobile client (React Native / Expo‐style folder layout)
• Backend API (Node.js + Express + MongoDB + JWT)
• Purpose: allow users to sign up/log in, manage tasks, add friends, and view friends’ tasks in real time.
File Structure
• Top-level directories
• backend/ → Express app (controllers, routes, models, middleware)
• frontend/ → React web app (components, pages, context)
• mobile/ → React Native mobile app (app/, assets/, store/)
• Config files
• backend/*.env (MONGODB_URI, JWT_SECRET)
• frontend/vite.config.ts, tsconfig.json, tailwind via CSS imports
• mobile/tsconfig.json, app.json
• Architectural patterns
• Backend: MVC-style (routes → controllers → models → db)
• Frontend: Component + context (AuthContext) with React Router
• Mobile: Screen-based routing in app/(auth) & app/(tabs)
README for Additional Insights
• Tech stack summary
• Web: React, TypeScript, Tailwind, Vite, React Router DOM, Axios
• API: Node.js, Express, Mongoose, JWT, CORS
• DB: MongoDB
• Features hint at real-time updates (may be implemented via polling or WebSockets)
Main Components & Relationships
a. Clients
– Web Browser (React app)
– Mobile App (React Native)
b. API Layer
– Express Server
– authRoutes, taskRoutes, friendRoutes, userRoutes
– authMiddleware (JWT verification)
c. Business Logic
– Controllers (authController, taskController, friendController)
– Models (User, Task) via Mongoose
d. Data Layer
– MongoDB database (collections: users, tasks)
e. External Services
– JWT service (sign/verify tokens)
– Potential real-time service (e.g., Socket.io or Firebase, if used)
Architectural Patterns & Design Principles
• Layered architecture (Presentation → API → Business Logic → Data)
• Stateless REST API with token-based auth
• Separation of concerns:
• Frontend UI vs. Backend API vs. Data storage
• Auth handled by middleware before business logic
• Scalability: each layer can be containerized and scaled independently