# Grubby AI: Building an AI writing platform from its first commit to 1.6M users

Source: https://bluenebula.dev/work/grubby-ai
Client: Grubby AI (AI SaaS). Role: Lead developer. Period: 2024-07 to present. Stack: Next.js, TypeScript, Supabase, Stripe, OpenAI, Upstash Redis, Expo, MCP.

> I've built Grubby AI since its first commit in July 2024, including the web app, billing, admin tools, Chrome extension, MCP connector and iOS app.

## The brief

Grubby AI is a writing platform that rewrites text so it reads naturally, with study tools around it for summaries, notes, quizzes and flashcards.

I wrote its first commit in July 2024 and have been its lead developer ever since, more than 1,650 hours of work so far. Of the main repository's 2,676 commits, 2,580 are mine. The job grew with the product: one editor at the start, then paid plans, three languages, tools for a support team, and ways to use Grubby outside the website.

## What I built

- The web app in Next.js and Supabase: the editor, the dashboard, history, accounts and billing.
- Billing on Stripe, with four plans on monthly or yearly terms, word allowances per period, per input, per day and per hour, and price changes rolled out in stages with notice periods set by region.
- An admin area the support team runs the business from. It covers accounts and billing, a queue for approving refunds and cancellations, A/B tests and coupons, and an AI assistant that can look up any account through read-only tools.
- Grubby Desk, a support inbox inside the admin that replaced Gmail and Zendesk. It syncs with Gmail both ways, drafts replies with AI and shows each customer's plan and usage next to their ticket.
- A Chrome extension that works inside Google Docs, Gmail, ChatGPT, Claude and LinkedIn, among other sites.
- An MCP connector, so people can use Grubby from Claude, ChatGPT and Cursor. It signs people in with OAuth through Supabase, and when a rewrite runs long it returns a job ID that the assistant checks back on.
- An iOS app in Expo, live on the App Store, that signs in with the same accounts and runs on the same backend as the web app.
- English, Spanish and Italian versions of the site.

Figure: The editor. The bar along the top counts this input against the plan's per-input limit and the words left this month. (Screenshot: Grubby's editor: an empty input pane with buttons to paste text or upload a file, the output pane on the right, and a bar counting the input and the plan's remaining words)

## How it's built

The app runs on Vercel, with Supabase for sign-in, Postgres, Realtime and file storage. A few decisions have held up as usage grew.

Rewrites run as background jobs. A request records the job and returns straight away, a worker does the rewrite, and the page picks up the result through Supabase Realtime, so a slow model never ties up a request. If a job times out, its words go back to the user's balance automatically.

Word quotas are enforced in the database. Each rewrite reserves words against a locked row before it starts, then commits or refunds them, and the server counts the words itself rather than trusting a number from the browser.

The model layer can fail over. When the main model servers start returning errors, a circuit breaker whose state lives in Upstash Redis takes them out of rotation on every server instance at once, and requests fall back to Azure OpenAI.

Paid plans attract abuse, so the endpoints that cost money sit behind Vercel BotID and rate limits, and the admin flags groups of accounts that share cards, IP addresses or emails.

The extension and the MCP connector each have a thin API of their own, but behind it they run the same rewrite pipeline, quota checks and rate limits as the web app, so a change to how rewriting works reaches every surface at once. Along the way I've taken the app through two major Next.js upgrades, to 15 in November 2024 and to 16 in December 2025.

## Results

Grubby has grown to more than 1.6 million users and 130K monthly active users, with $3M in revenue since launch, $988K of it in the first year (figures reported by the client). I'm still its lead developer.
