Real-time task board with an AI agent
Stackboard
A real-time collaborative task board with an AI agent that plans changes and asks before it applies anything.
- Agents
- Next.js 16
- FastAPI
- Redis
- WebSockets

Overview
Stackboard is a Trello-style board built to show production-grade patterns: live updates over WebSockets with presence, role-based access, a full audit log — and a board-scoped tool-calling agent that creates, moves, edits and deletes cards from plain language.
How it works
- 1Plain-language request
- 2Board context
- 3OpenAI tool calls
- 4Reviewable plan
- 5User confirms
- 6WebSocket broadcast
What I built
Tool-calling agent
Six OpenAI function tools with the whole board as context, so it can act and answer “what's overdue?” or “summarise for standup”. Replies stream over SSE with 12 turns of memory.
Confirm before apply
Any plan with more than three changes, a deletion, a possible duplicate or a guessed date comes back as a reviewable plan with per-action checkboxes. Plans expire and are re-validated before applying.
Realtime at scale
Per-board WebSocket manager; with Redis, broadcasts use pub/sub and presence lives in a shared hash so several backend instances stay in sync.
Duplicate detection
Fuzzy title match plus embedding similarity, with thresholds calibrated on real scores so “fix signup bug” vs “fix login bug” doesn't false-positive.
Audit everything
Every mutation — human or AI — writes an activity row, with keyset pagination so the feed stays fast. AI actions are logged as “AI · user” with the prompt.
Semantic search
Cards are embedded in a background task on create/update and scored with a vectorised cosine pass, portable across SQLite and Postgres.
Engineering decisions
- Resolve relative dates (“by Friday”) in code, after measuring that the model got weekday arithmetic wrong about half the time.
- Send the JWT as the first socket message instead of in the URL, keeping tokens out of logs.
- Compute embeddings in a background task so creating a card never waits on OpenAI.
Stack
- Frontend
- Next.js 16 (App Router), React 19
- Backend
- FastAPI, SQLAlchemy 2, Pydantic v2
- Realtime
- Native WebSockets, Redis pub/sub, SSE
- AI
- OpenAI function calling, OpenAI embeddings
- Auth
- JWT sessions, email/password, Google OAuth
- DevOps
- Docker Compose, Postgres (SQLite for local dev)
Need something like this?
I can build a version of this for your product, your data and your stack.
Start a project