SUPERFUNCTION — AI-NATIVE FULL-STACK ARCHITECTURE

Prototype
to production.

Scaffold a working Next.js product with backend, auth, i18n, and MCP in one command. Give your agent a structure it can understand, extend, deploy, and operate.

Follow the guide Read the docs $ pnpm dlx spfn@beta create my-app --mode full
01
Start with the product

Build the business.
Not the plumbing.

01

One scaffold

Next.js, the SPFN backend, database wiring, auth, i18n, and MCP arrive as one working full-stack foundation.

02

Connect the keys

Add the OAuth, storage, and infrastructure credentials your product needs. Spend the first session on the idea, not login plumbing.

03

Agent-legible

Entity, Repository, Route, Router — the same vertical slice for every feature. Your agent knows where to read and where to write.

04

Production guardrails

Runtime validation, generated migrations, explicit boundaries, and end-to-end types keep fast changes reviewable.

02
The build loop

One path from first prompt
to live operations.

idea
scaffold
vertical slices
deploy
MCP operations
01 — scaffold
$ pnpm dlx spfn@beta create my-app --mode full # core · auth · i18n · MCP $ cd my-app && docker compose up -d $ pnpm spfn:dev
02 — give the agent a path
src/server/ ├── entities/idea.ts ├── repositories/idea.ts ├── routes/ideas.ts └── router.ts # same slice, every feature
03 — operate what shipped
agent → Bearer key → /mcp tools/ ├── customers.list ├── orders.refund └── content.publish # your tools · your policy
FIG 01 — ONE APP · ONE REPEATABLE PATTERN · ONE AGENT-ACCESSIBLE OPERATING SURFACE
03
Choose your starting line

Full when speed matters.
Bare when you want the kernel.

Bare modeMINIMAL

The smallest SPFN architecture.

Start with the core full-stack pattern and choose every additional function yourself.

  • @spfn/core
  • Next.js + SPFN server
  • Database + route codegen
  • Add functions as needed
FULL IS THE INTERACTIVE RECOMMENDATION · AUTOMATION SHOULD PASS --MODE EXPLICITLY
04
Operate with MCP

Deploy the product.
Keep the agent on the team.

Expose the application operations you choose as authenticated MCP tools. Connect your agent after deployment and handle routine work through the same domain layer — without building a separate admin dashboard first.

Read the full guide
01 / BUILD

Domain operations stay in the app

Routes and MCP tools call the same repositories and services instead of duplicating business rules.

02 / SECURE

Identity and policy remain explicit

The generated operator key protects MCP today. Tool schemas and application authorization still define what an agent can do.

03 / RUN

Operate through conversation

Inspect customers, publish content, or run workflows with auditable tools tailored to your product.

05
Functions

Add capability.
Keep the architecture.

Take the prototype all the way.