Case study / 04

TaskFlow - Real-Time Collaborative Task Manager

A collaborative task management application with teams, real-time sync, live notifications, and role-based access - built with Next.js 15 and Convex to explore reactive database subscriptions and event-driven communication patterns.

Status
Selected work
System context
TypeScript, Next.js, React, Convex
Source
Public repository

01 / System behavior

Interactive proof

A project-specific technical mechanism based on the recorded architecture and implementation context.

Interactive proofTaskFlow - Real-Time Collaborative Task Manager
User mutation
Convex service
Data update
Reactive query
Client A
Client B
Client C

Context and intent

TaskFlow is a collaborative task management app designed as a deep exploration of Convex's real-time capabilities. Every useQuery call is a live subscription that automatically re-renders when data changes - no WebSocket code, no pub/sub, no cache invalidation.

The Convex backend is organized as logically isolated service modules with clear boundaries: taskService (CRUD, status transitions, filtering), userService (profiles, email uniqueness validation), teamService (team management, member roles, cascading deletes), commentService (threaded comments per task), notificationService (alerts for assignments and completions), and a typed eventBus for cross-service communication.

03 / Architecture record

Architecture

A structured reading of the architecture recorded with this project.

Architecture recordTaskFlow - Real-Time Collaborative Task Manager
The frontend uses Next
Cross-service communication happens inline within mutations
The Convex backend follows a service-oriented structure
Read the full architecture record

The frontend uses Next.js 15 with the App Router. Every data-fetching component uses Convex's useQuery hook, which subscribes to the underlying data - when any mutation touches the relevant tables, the query re-evaluates server-side and pushes the new result to every connected client.

The Convex backend follows a service-oriented structure: each service module (task, user, team, comment, notification) exports its own types and private helpers, while public-facing files re-export as a facade for the frontend.

Cross-service communication happens inline within mutations - when a task is assigned, the mutation checks if the assignee differs from the creator and inserts a notification directly. The notification service's useQuery picks it up instantly.

How the system is shaped

The schema defines five tables with carefully chosen composite indexes - the teamMembers(teamId, userId) composite index is critical for the membership check that would otherwise scan the entire table.

Business rules include cascading deletes with cross-service cleanup (deleting a team removes all members, then tasks, then the team itself), email uniqueness validation across mutations, and dependency checks before destructive operations.

05 / Selected highlights

Selected implementation notes

The decisions and workflows that carry the most explanatory weight.

  1. Real-time sync via Convex reactive queries - task updates appear across all connected clients within milliseconds, with zero WebSocket or cache invalidation code
  2. Service-oriented Convex backend with logically isolated modules (task, user, team, comment, notification) and typed event definitions
  3. 5 database tables with 10+ carefully chosen indexes including composite indexes for efficient membership queries
  4. Cascading delete logic with cross-service cleanup - explicit application-level rules that are visible and testable
  5. Live notification system for task assignments, completions, and comments using inline event-driven communication within mutations
  6. Authentication via Convex Auth with email/password and GitHub as a provider

06 / Supported metrics

Verified project record

Real-Time Services
5
Database Indexes
10+
WebSocket Code Written
0 lines
Auth Providers
2

Technology in context

TypeScript, Next.js, React, Convex, Convex Auth, Tailwind CSS, Radix UI

View source repository