How neerajbhat/taskmanagerapp works
This is an Express task-manager API. Users sign up or log in to receive JWT credentials, then use authenticated routes to manage their profile and owned tasks; profile routes also support avatar uploads and account emails. Task list requests support filtering, sorting and pagination, and deleting a user cascades to their tasks. The source shows route-to-model calls and the database connection setup; detailed wiring for unsampled infrastructure is not inferred.
Main entry points: routers/user.js User routes · index.js Express server · models/user.js User model · task.js Task routes
Components 12
API runtime
- Express server
src/index.js
Accounts and auth
- User routes
src/routers/user.js - JWT authentication
src/middleware/auth.js - User model
src/models/user.js - Account email
src/emails/account.js - Avatar processing
src/routers/user.js
Task management
- Task routes
src/routers/task.js - Task model
src/models/task.js
Persistence and email
- Mongo connection
src/db/mongoose.js - MongoDB
- SendGrid
Other components
- API client
Connections 16
- API client → Express server: sends requests
- Express server → User routes: mounts routes
- Express server → Task routes: mounts routes
- Express server → Mongo connection: loads connection
- Mongo connection → MongoDB: connects
- User routes → JWT authentication: authenticates
- Task routes → JWT authentication: authenticates
- JWT authentication → User model: looks up token
- User routes → User model: manages users
- User routes → Account email: sends account mail
- Account email → SendGrid: sends email
- User routes → Avatar processing: resizes avatars
- Task routes → Task model: manages tasks
- User model → Task model: deletes owned tasks
- User model → MongoDB: reads and writes
- Task model → MongoDB: reads and writes