Skip to content
Reference

Templates

5 opinionated starter stacks. Pick one and `stack init --template <name>` writes the `.stack.toml`; `stack templates apply <name>` runs `stack add` for every service.

How templates work

A template is just a .stack.toml checked in under templates/<name>/stack.toml in the monorepo. It declares the services you want wired and the secrets each should expect. Applying a template runs stack add for each service in order; skipped services (provider not registered, already in stack) are reported cleanly at the end.

Two commands, two workflows:

  • stack init --template <name> — writes the .stack.toml but doesn't provision anything yet. Useful when you want to inspect what you're about to create.
  • stack templates apply <name> — actually runs through every stack add. Needs Phantom and live creds for each provider.
Continue on error: By default stack templates apply keeps going when a single service fails (e.g. you skipped Sentry OAuth). Pass --continueOnError=false to bail on the first failure.

The five starters

Next.js · Supabase · PostHog

Postgres + auth + product analytics.

The classic Next.js SaaS starting point. Supabase for data + auth, PostHog for analytics and feature flags. Two MCP servers wired (Supabase scoped to your project, PostHog SSE).

2 services 5 secrets 2 MCP servers envs: dev, prod

What you get

Service Provider Secrets MCP
supabase supabase
SUPABASE_URL SUPABASE_ANON_KEY SUPABASE_SERVICE_ROLE_KEY
supabase
posthog posthog
POSTHOG_PROJECT_API_KEY POSTHOG_PERSONAL_API_KEY
posthog

Good for: Teams that want a full SaaS stack (DB + auth + analytics) in one command.

Apply it

# inside a fresh project directory
stack templates apply nextjs-supabase-posthog

# or: write .stack.toml first, then add services one at a time
stack init --template nextjs-supabase-posthog

Next.js · Neon · Vercel · Sentry

Serverless Postgres, deploy, error tracking.

A deploy-focused starter. Neon serverless Postgres, Vercel as the deploy target, Sentry for error monitoring (with its MCP wired so Claude can triage issues).

3 services 7 secrets 1 MCP server envs: dev, prod

What you get

Service Provider Secrets MCP
neon neon
NEON_API_KEY DATABASE_URL
vercel vercel
VERCEL_TOKEN
sentry sentry
SENTRY_AUTH_TOKEN SENTRY_DSN SENTRY_ORG SENTRY_PROJECT
sentry

Good for: Next.js apps on Vercel that need a real Postgres + production error tracking.

Apply it

# inside a fresh project directory
stack templates apply nextjs-neon-vercel-sentry

# or: write .stack.toml first, then add services one at a time
stack init --template nextjs-neon-vercel-sentry

Supabase · PostHog · Sentry · Resend · Stripe

The "SaaS in a box" template.

The maximal SaaS starter — DB/auth, analytics, errors, transactional email, and billing all wired in one command. Three MCP servers (Supabase, PostHog, Sentry) come online alongside.

5 services 10 secrets 3 MCP servers envs: dev, prod

What you get

Service Provider Secrets MCP
supabase supabase
SUPABASE_URL SUPABASE_ANON_KEY SUPABASE_SERVICE_ROLE_KEY
supabase
posthog posthog
POSTHOG_PERSONAL_API_KEY
posthog
sentry sentry
SENTRY_AUTH_TOKEN SENTRY_DSN SENTRY_ORG SENTRY_PROJECT
sentry
resend resend
RESEND_API_KEY
stripe stripe
STRIPE_SECRET_KEY

Good for: Greenfield SaaS projects where day-one billing + error monitoring is non-negotiable.

Apply it

# inside a fresh project directory
stack templates apply supabase-posthog-sentry-resend

# or: write .stack.toml first, then add services one at a time
stack init --template supabase-posthog-sentry-resend

Cloudflare · Turso · Clerk · Sentry

Edge-first stack with drop-in auth.

Edge SQLite (Turso libSQL) + Cloudflare Workers + Clerk for auth. Pairs well with Next.js-on-Cloudflare or Hono. Sentry wires its MCP so Claude can query issues.

4 services 10 secrets 1 MCP server envs: dev, prod

What you get

Service Provider Secrets MCP
cloudflare cloudflare
CLOUDFLARE_API_TOKEN CLOUDFLARE_ACCOUNT_ID
turso turso
TURSO_DATABASE_URL TURSO_AUTH_TOKEN TURSO_PLATFORM_TOKEN
clerk clerk
CLERK_SECRET_KEY
sentry sentry
SENTRY_AUTH_TOKEN SENTRY_DSN SENTRY_ORG SENTRY_PROJECT
sentry

Good for: Edge apps on Cloudflare Workers that want proper auth without writing it.

Apply it

# inside a fresh project directory
stack templates apply cloudflare-turso-clerk

# or: write .stack.toml first, then add services one at a time
stack init --template cloudflare-turso-clerk

Claude agent (OpenAI · Anthropic · xAI · DeepSeek · GitHub)

Multi-model agent project.

All four flagship LLM APIs plus GitHub for repo access. Useful for any project that needs to switch between models or test cross-model behaviour. Ships a GitHub MCP for Claude Code.

5 services 5 secrets 1 MCP server envs: dev

What you get

Service Provider Secrets MCP
openai openai
OPENAI_API_KEY
anthropic anthropic
ANTHROPIC_API_KEY
xai xai
XAI_API_KEY
deepseek deepseek
DEEPSEEK_API_KEY
github github
GITHUB_TOKEN
github

Good for: Agent projects and multi-model evals. One command, four API keys, one GitHub token.

Apply it

# inside a fresh project directory
stack templates apply claude-agent-openai-anthropic

# or: write .stack.toml first, then add services one at a time
stack init --template claude-agent-openai-anthropic

Build your own

A template is just a TOML file with a [stack] block, one [services.<name>] per service, and optional [[environments]]. See config reference for the full schema. Drop it into templates/<your-name>/stack.toml, open a PR, and we'll add it to the curated list.

# templates/my-edge-starter/stack.toml

[stack]
version = "1"
template = "my-edge-starter"

[services.cloudflare]
provider = "cloudflare"
secrets = ["CLOUDFLARE_API_TOKEN", "CLOUDFLARE_ACCOUNT_ID"]

[services.turso]
provider = "turso"
secrets = ["TURSO_DATABASE_URL", "TURSO_AUTH_TOKEN", "TURSO_PLATFORM_TOKEN"]

[[environments]]
name = "dev"
default = true

[[environments]]
name = "prod"