Ian Greenough

Founding Product Engineer
← Back to projects

Realtime AI Collaboration

I built this to explore human-in-the-loop AI patterns in a real-time multiplayer context. The editor uses Tiptap backed by Socket.IO for live presence and cursor sync. When a user requests an AI action, Claude streams tokens to every connected collaborator simultaneously, so the whole room watches the suggestion appear.

The requesting user gets Accept, Edit, and Reject controls. Accept appends the suggestion to the document. Edit opens an inline revision field before committing. Reject aborts the stream and discards the suggestion. A Redis lock enforces one AI suggestion per document at a time, preventing conflicting concurrent generations.

Document versions are snapshotted on every accepted or edited suggestion, giving teams a full revision history. Session auth, bcrypt, and rate limiting follow the same patterns used across the rest of the portfolio.

Technologies Used

TypeScriptNext.jsExpressSocket.IOTiptapPostgreSQLRedisClaude APITanStack Query