← Back to Projects
TaskFlow

TaskFlow

A task manager with calendar, board and repeating tasks, plus an assistant interface that lets AI tools like Claude manage your tasks with scoped, revocable access.

ReactTypeScriptTanStack QueryTailwind CSSRechartsPythonFlaskSQLAlchemy 2.0PostgreSQLRedisAlembicJWTMCP
600+
automated backend tests, some property-based
36
tools exposed to AI assistants over MCP
3
CI jobs, including browser tests on a real backend
Hashed
refresh and MCP tokens, with Redis rate limits and security headers

The problem

A plain to-do list turns into an overwhelming backlog. It will not help you decide what to do first, break a large project into steps, or show where your time went. TaskFlow adds calendar and board views, repeating tasks, AI that suggests changes you can accept or ignore, and statistics on your workload, and exposes the same actions to AI assistants through a secure API.

What it does

Calendar View

See the week at a glance and drag tasks onto new days, so the schedule always matches the plan.

Kanban Board

Move work across columns for each project, where each column can complete, reopen or trash a card dropped into it.

Smart Prioritise

Sorts tasks into four quadrants with the Eisenhower Matrix, then lets AI suggest changes with a reason for each that you accept or ignore.

Repeating Tasks

Daily, weekly, monthly or yearly repeats, with chosen days, that show up ahead of time on the calendar.

Reminders

Several push reminders per task, from half an hour ahead or at a time you choose.

Stats and Planning

Shows progress over time, backlog health, upcoming deadlines and where your time goes, across about fourteen charts.

See it working

The task list grouped into overdue, today and upcoming, with a project sidebar.
List view: overdue, today and upcoming, grouped by project.
A kanban board with To Do, In Progress and Done columns, each card tagged with its project.
Board view: each project gets its own columns.
Tasks sorted into the four Eisenhower matrix quadrants.
Eisenhower matrix: drag a task between quadrants to change its priority.
A week calendar with tasks coloured by project across seven days.
Week view on a busy week, with tasks coloured by project.
A day calendar with six tasks in different project colours.
Day view on a busy day.
A daily brief summarising today's priorities and overdue work.
The AI daily brief, written from your own tasks.
A statistics dashboard with completion rate, streak, an activity heatmap and deadline charts.
Statistics: completion rate, streak, a year of activity and upcoming deadlines.
Statistics charts for project breakdown, weekly flow, turnaround time and estimation accuracy.
Statistics: where time goes and how accurate estimates are.
The add task form with title, project, priority, schedule, reminders and repeat settings.
Adding a task, with schedule, reminders and repeats.

How it's built

How TaskFlow fits together: a React front end, a Flask API with services and a 36-tool MCP endpoint, PostgreSQL, Redis for rate limits, AI providers and an external reminder job.

Frontend

  • React and TypeScript single page app with Tailwind CSS.
  • TanStack Query handles fetching and caching. Moving tasks and cards update the screen instantly, and other changes refetch.
  • Axios refreshes the sign-in token in the background, and concurrent requests share one refresh.
  • Recharts draws the statistics.

Backend

  • Python and Flask with the application factory pattern: about 59 routes, with routes calling services that call models.
  • SQLAlchemy 2.0 over 13 tables and 14 Alembic migrations on PostgreSQL, Marshmallow for validation.
  • JWT sessions in HTTP-only cookies with rotating, hashed refresh tokens.

AI and integrations

  • Gemini with Groq as a fallback, behind timeouts and a daily per-user quota.
  • A hand-written MCP server (a stateless JSON-RPC endpoint) exposes 36 tools to AI assistants, with read or write token scopes.
  • Web push for reminders, sent by a scheduled job, and PostHog analytics behind cookie consent.

Delivery

  • Docker Compose for local use, GitHub Actions, and Google Cloud Run in production.

Key decisions and tradeoffs

  • Repeating tasks are calculated, not stored

    A repeating task has one master record. Its future occurrences are worked out when the calendar needs them, so the database stays small and changing the schedule is a single edit.

    The cost: The calendar logic is harder to get right than generating rows in advance would have been, because every view has to project the repeats itself.

    Technical detail

    The recurrence module handles periods, slots and time-zone-aware next and previous occurrences, and the listing service projects them into the visible window. The recurrence rules are covered by property-based tests.

  • Store order as numbers with gaps

    Dragging a task to a new spot updates one row instead of renumbering the whole list.

    The cost: When two neighbours run out of room, the list is renumbered once. That is rare, and it is done under a lock.

    Technical detail

    Positions are integers spaced 1,024 apart. A move puts the item between its two neighbours, looking up the real neighbour when the list is only partly loaded, and renumbers only when no whole number fits. Rows are locked during a move.

  • The board reuses the list's rules

    Dropping a card in a Done column completes it exactly as if it had been ticked off, because the board calls the same code. There is no second path to keep in step.

    The cost: The board can only do what the task services allow. A column's drop action is limited to nothing, complete, reopen or trash.

    Technical detail
  • Each reminder stores the time it should fire

    The background job only has to ask which reminders are due, instead of working out the schedule for every task each time it runs.

    The cost: The fire time is recalculated whenever a task's date changes, anything more than an hour late is skipped instead of sent late, and the job needs an external scheduler because nothing inside the app starts it.

    Technical detail

    A precomputed, indexed fire_at column drives the query, and a fired-for marker prevents sending the same reminder twice.

  • Let AI assistants use the app through MCP

    People can ask an assistant such as Claude to add, move or review tasks, using the same actions as the app, instead of the app copying its features into a chat window.

    The cost: It adds a second public surface to secure, so tokens are scoped to read or write, stored hashed, rate limited per token at 120 requests a minute, and covered by cross-user isolation tests.

    Technical detail

    The protocol layer is a hand-written, stateless JSON-RPC dispatcher with a tool registry that marks each tool read-only or destructive.

Hard problems I solved

  • Letting a calendar drag edit the repeat pattern

    The problem
    A repeating task can run on several days at once, for example every Tuesday and Friday. Dragging one occurrence to a new day has to change only that day in the pattern, not restart the whole thing.
    What I did
    One function removes the day being dragged from and adds the new one, avoiding duplicates. Dragging Tuesday onto Monday turns 'Tuesday and Friday' into 'Monday and Friday', and dragging Tuesday onto Friday leaves just 'Friday'. A simple 'every few days' repeat shifts as a whole. The change runs under a database row lock so two simultaneous edits cannot overlap.
    The result
    Moving a single occurrence on the calendar edits the real schedule, with the rules covered by property-based tests.
  • Not trusting AI priority suggestions

    The problem
    The AI looks at up to 50 open tasks and suggests a better priority for each, but its reply is just text that could be malformed or invent tasks.
    What I did
    Every suggestion is checked against the real task list before it is shown. Badly formed suggestions, suggestions for tasks that do not exist, and suggestions that match the current priority are all thrown away.
    The result
    What remains is a short list the user can accept or ignore one at a time. Nothing changes by itself.
  • Keeping users signed in when requests race

    The problem
    When a login expires, several requests can fail at once and each try to refresh it. With rotating refresh tokens, the second refresh would use a token the first had already replaced and could sign the user out.
    What I did
    The frontend shares a single in-flight refresh between concurrent requests. On the server, refresh tokens are stored as SHA-256 hashes, each rotation records when it replaced the old token, and the old token is still accepted for a 10-second grace window.
    The result
    Simultaneous requests and tabs no longer invalidate each other, and a leaked database would not expose usable tokens.

Testing and quality

About 630 backend tests across 73 files (five use property-based testing with Hypothesis), about 390 frontend tests and 35 Playwright browser tests.

GitHub Actions runs three jobs: frontend lint, type check, Vitest and build; backend tests against PostgreSQL 18; and Playwright against a real backend.

  • 14 Alembic migrations with round-trip tests.
  • Cross-user isolation tests for the API and the MCP server.
  • Refresh tokens are stored hashed and rotate with a short grace window, so two tabs refreshing at once do not sign the user out.
  • About 15 rate limits on Redis plus a daily AI quota per user, and security headers including a report-only content security policy.
  • MCP tokens are scoped to read or write, stored hashed and rate limited per token.

Known limitations

  • Cross-site request protection relies on SameSite cookies instead of CSRF tokens.
  • The Pomodoro timer keeps its state in the browser only and does not record focus time.
  • Reminders need an external scheduler such as cron or Cloud Scheduler.
  • Only moves, reorders and board actions update the screen optimistically. Other changes refetch.

Database model

Schema for TaskFlow

Use and further reading

I use TaskFlow to see where my time goes each week, and the Break It Down feature helped me start the tasks I kept putting off.

Read more in the repo: Public demo mode designCI workflow