Relay: AI Support Inbox SaaS MVP (Next.js + Claude) by Ali SabirRelay: AI Support Inbox SaaS MVP (Next.js + Claude) by Ali Sabir

Relay: AI Support Inbox SaaS MVP (Next.js + Claude)

Ali Sabir

Ali Sabir

The problem

Small support teams spend most of the day reading, sorting and writing the same replies. The urgent ticket sits under twenty routine ones, and the first answer goes out hours late. Most AI tools fix this by sending replies automatically, which no team trusts with real customers.

What I built

Relay, a working support inbox. Every inbound email gets a priority, a category, a sentiment, a one-line summary and a drafted reply in the team's voice. The inbox sorts urgent work to the top. An agent opens a ticket, edits the draft if needed and approves it with one click, and nothing leaves without that click. I designed and built the whole product, the data model, auth, the triage engine and the interface.

How it is built

Next.js App Router with server actions, so there is no separate API layer and no client state library to maintain. Prisma with three models, Workspace, Ticket and Reply, indexed on workspace and status so the inbox query stays fast as tickets pile up. Sessions are HMAC-signed cookies compared in constant time, one workspace per sign-in, and every action checks the ticket belongs to the signed-in workspace before touching it. Bulk triage runs four tickets at a time, so a full inbox finishes in seconds without hammering the model.

The decision that matters

An AI feature that breaks the moment an API key expires is a liability, not a feature. So triage runs on Claude when a key is set, and if the key is missing, the call fails or the model returns malformed JSON, the same function falls back to a deterministic rules engine with keyword scoring and templated replies. The model's output is never trusted as is. Every field is checked against an allow-list and unknown values default to safe ones, and each ticket records which engine triaged it, so the agent always knows what they are looking at.

See it running

Recorded from the production build, signed in to the shared demo workspace that is seeded with twenty realistic tickets. Any email address also gets a private sandbox with its own copy, so a visitor can break things without affecting anyone else.
Walkthrough of the running app. Sign in to the demo workspace, re-run triage, open an urgent ticket and review the drafted reply.
Phone layout. The same inbox and ticket view in one column, with nothing hidden behind a menu.
Phone layout. The same inbox and ticket view in one column, with nothing hidden behind a menu.

Result

A working product, not a mockup. Sign in, triage twenty tickets in a few seconds, open one, edit the draft and send it, and the ticket moves to resolved with the reply stored. Login, inbox, sending and re-running triage are all tested end to end. It runs locally today on SQLite, and moving it to production is a provider switch to Postgres and three environment variables, documented in the README.
What this proves for your product. I can take a SaaS idea from an empty repo to a usable MVP with real auth, a real database and an AI feature that degrades gracefully, then hand it over with docs. If you need that for your own product, the SaaS MVP service on my profile is the same process.
Like this project

Posted Oct 16, 2026

Working AI support inbox built end to end. Claude triage with a rules fallback, one-click approve, signed sessions, Next.js server actions and Prisma.