How dhyaa-km/task-manager-api works
Task Manager provides authenticated project and task management, personal progress dashboards, profile management, and administrator user oversight. Users register or sign in, then use protected screens to manage projects and their tasks or review dashboard/profile data; admins have separate guarded views for global statistics and user administration. The React client calls an Express REST API, whose controllers enforce domain operations and persist through Mongoose models in MongoDB. Routes and several central modules were sampled; unsampled features are represented where documented, with only README-supported client/API relationships.
Main entry points: App.tsx Route application · api.ts HTTP client · server.js Express API · AuthContext.tsx Session state
Components 34
Client experience
- Route application
client/src/App.tsx - HTTP client
client/src/services/api.ts - Personal dashboard
client/src/pages/Dashboard.tsx - Dashboard calls
client/src/services/dashboardService.ts
Identity and access
- Session state
client/src/context/AuthContext.tsx - Route guards
client/src/components/ProtectedRoute.tsx - Admin guard
client/src/components/AdminProtectedRoute.tsx - Sign in/up
client/src/pages/Login.tsx - Authentication calls
client/src/services/authService.ts - Profile management
client/src/pages/Profile.tsx
Project and task work
- Project screens
client/src/pages/Projects.tsx - Project details
client/src/pages/ProjectDetails.tsx - Project forms
client/src/pages/CreateProject.tsx - Project calls
client/src/services/projectService.ts - Task screens
client/src/pages/TaskDetails.tsx - Task forms
client/src/pages/CreateTask.tsx - Task calls
client/src/services/taskService.ts
Admin operations
- Admin user screens
client/src/pages/Users.tsx - User details
client/src/pages/UserDetails.tsx - Admin dashboard
client/src/pages/AdminDashboard.tsx - Admin user calls
client/src/services/adminUserService.ts - Admin stats calls
client/src/services/adminDashboardService.ts
API and persistence
- Express API
server/src/server.js - Auth routes
server/src/routes/api/authRoutes.js - User routes
server/src/routes/api/userRoutes.js - Project routes
server/src/routes/api/projectRoutes.js - Task routes
server/src/routes/api/taskRoutes.js - Admin routes
server/src/routes/api/adminRoutes.js - Auth operations
server/src/controllers/authController.js - User operations
server/src/controllers/userController.js - Dashboard stats
server/src/controllers/dashboardController.js - Project operations
server/src/controllers/projectController.js - Task operations
server/src/controllers/taskController.js
Other components
- User
Connections 45
- User → Route application: uses
- Route application → Route guards: protects routes
client/src/App.tsx - Route application → Admin guard: guards admin
client/src/App.tsx - Route application → Sign in/up: routes to
client/src/App.tsx - Route application → Personal dashboard: routes to
client/src/App.tsx - Route application → Project screens: routes to
client/src/App.tsx - Route application → Project details: routes to
client/src/App.tsx - Route application → Project forms: routes to
client/src/App.tsx - Route application → Task screens: routes to
client/src/App.tsx - Route application → Task forms: routes to
client/src/App.tsx - Route application → Profile management: routes to
client/src/App.tsx - Route application → Admin dashboard: routes to
client/src/App.tsx - Route application → Admin user screens: routes to
client/src/App.tsx - Route application → User details: routes to
client/src/App.tsx - Session state → Authentication calls: calls
client/src/context/AuthContext.tsx - Session state → HTTP client: sets token
client/src/context/AuthContext.tsx - Route guards → Session state: checks session
client/src/components/ProtectedRoute.tsx - Admin guard → Session state: checks role
client/src/components/AdminProtectedRoute.tsx - Sign in/up → Session state: uses session
- Profile management → HTTP client: loads profile
- Personal dashboard → Dashboard calls: loads stats
- Project details → Project calls: loads project
client/src/pages/ProjectDetails.tsx - Project details → Task calls: loads tasks
client/src/pages/ProjectDetails.tsx - Project screens → Project calls: uses
- Project forms → Project calls: uses
- Task screens → Task calls: uses
- Task forms → Task calls: uses
- Admin user screens → Admin user calls: uses
- User details → Admin user calls: uses
- Admin dashboard → Admin stats calls: loads stats
client/src/pages/AdminDashboard.tsx - Authentication calls → HTTP client: sends requests
client/src/services/authService.ts - Project calls → HTTP client: sends requests
client/src/services/projectService.ts - Task calls → HTTP client: sends requests
client/src/services/taskService.ts - Admin user calls → HTTP client: sends requests
client/src/services/adminUserService.ts - Express API → Auth routes: mounts
server/src/server.js - Express API → User routes: mounts
server/src/server.js - Express API → Project routes: mounts
server/src/server.js - Express API → Task routes: mounts
server/src/server.js - Express API → Admin routes: mounts
server/src/server.js - Auth routes → Auth operations: dispatches
server/src/routes/api/authRoutes.js - User routes → User operations: dispatches
server/src/routes/api/userRoutes.js - User routes → Dashboard stats: dispatches
server/src/routes/api/userRoutes.js - Project routes → Project operations: dispatches
server/src/routes/api/projectRoutes.js - Task routes → Task operations: dispatches
server/src/routes/api/taskRoutes.js - Admin routes → Admin stats calls: dispatches