Task-Flow - AI Task Management
Task-Flow is a MERN-stack task management application with role-based access control and AI-assisted prioritisation. It covers team task tracking, assignment and collaboration, with the AI layer suggesting priority order and surfacing productivity patterns rather than replacing human judgement.
- Role
- Sole developer — data model, API, permission layer, AI integration and UI.
- Year
- 2025
- Stack
- MERN, AI, Task Management, RBAC
The problem
Small teams outgrow a shared spreadsheet quickly: there is no permission model, no audit of who changed what, and no way to tell which of forty open tasks actually matters this week. The requirement was a proper multi-role task system where the prioritisation help is advisory and explainable.
How it was built
01Role-based access control
Permissions are enforced server-side per role, with the API as the authority rather than the UI. Hiding a button is presentation; the endpoint still has to reject the request. Roles separate who can create, assign, edit and close work, and every mutation records its actor.
02Data model for teams, not individuals
Tasks belong to projects, projects to teams, and membership carries the role. Modelling the hierarchy up front is what makes later queries — team workload, per-project throughput — straightforward instead of requiring a rewrite.
03AI prioritisation as a suggestion layer
The model ranks open tasks using deadlines, dependencies and historical completion patterns, and returns an ordering with its reasoning attached. It never silently reorders a board. An unexplained AI decision on someone's workload gets distrusted and switched off, so the reasoning is part of the output.
04Collaboration primitives
Comments, assignment changes and status transitions are all events against a task, which gives an activity history for free and makes notification logic a matter of subscribing to event types.
Stack decisions
Why each piece was chosen, rather than just what was used.
MongoDB
Task documents vary in shape across projects — custom fields, differing metadata — which a document store absorbs without a migration per variation.
Express + Node.js
Keeps authorisation in one middleware layer that every route passes through, so a new endpoint cannot accidentally skip the permission check.
React
A task board is dense, highly interactive state. Component-local state with a clear server boundary keeps optimistic updates manageable.
AI prioritisation
Ranking is a judgement task with no single correct answer, which is exactly where a language model beats a hand-written scoring formula — provided its output stays advisory.
What it does
- Role-based permissions enforced at the API layer
- Team, project and task hierarchy with membership roles
- AI-suggested prioritisation with visible reasoning
- Task assignment, comments and status workflow
- Activity history derived from task events
- Productivity insights across a team's completed work
Questions this raises
Where should role-based permissions live in a MERN app?
In server middleware that every route passes through, not in the React layer. UI-level checks are for presentation only — a hidden button is still a reachable endpoint. Put the role check in one place the router cannot bypass, so adding a new endpoint inherits it by default rather than by remembering.
Should AI reorder a team's task board automatically?
No. Make it a suggestion with its reasoning shown, and let a human accept it. Automated reordering of someone's workload without explanation gets distrusted after the first bad call and switched off, which loses the feature entirely. Advisory output with reasoning stays in use.
Building something similar?
Naman Gundaniya takes on full stack and AI projects like this one. Available for hire, replies within 24 hours.