How recursive.eco is built

recursive.eco docs · Markdown source

recursive.eco is a Next.js and Supabase app where all content is one open JSON format: a grammar, an ordered list of items, some of them links to other grammars. Interchangeable viewers draw it. People, an in-app assistant and outside agents (over MCP) edit it, and every save is backed up to GitHub.


#One building block

The format is public, under Apache-2.0: Grammar Format.

#Three places

#Many views, one assistant

The same grammar opens as Cards, Playlist, Tree or Print, and every view reads the same data. One assistant works across the app. Outside agents get the same tools through an MCP server, so Claude or ChatGPT can build a grammar for its owner, and the owner keeps the decision to publish.

#The stack

LayerWhat
AppNext.js (App Router) and TypeScript, on Vercel
Landing and viewersStatic HTML and JavaScript, Tailwind built ahead of time
DataSupabase: Postgres, sign-in, row-level security
FilesCloudflare R2, through the S3 API
VersionsEach save of a grammar is committed to a GitHub repo
AIAnthropic, Google and OpenAI models behind one assistant, paid with prepaid credits (Stripe)
AgentsAn MCP server with the tools the assistant uses

#The data model

Postgres holds two shapes of data.

This is a known pattern, often called a hybrid relational and document model. When a JSON field starts being filtered on, it can become an indexed generated column without rewriting the data.

#Open source we stand on

Open source is the nutritious part, the part we want to overflow. recursive.eco is built on:

What we give back so far: the grammar format, under Apache-2.0. The viewers are planned for Apache-2.0 once they are separated from the app.