Design a task management API: users maintain lists of todos with title, status, due date, and ordering. Support multiple lists per user, reordering, and optional collaboration on shared lists with role-based permissions.
Functional requirements
- Create, update, delete, and complete tasks within a list
- Organize tasks into named lists per user
- Reorder tasks with explicit position or lexorank-style ordering
- Optional share list with read-only or edit collaborators
Non-functional requirements
- Low latency for mobile clients with patchy networks (idempotent updates)
- Consistency for ordering under concurrent edits
- Soft delete or trash for recovery