Configurable, production-grade TanStack Start application generator & platform template.
Create a configured, production-ready TanStack Start application with Mystack. Instead of a rigid monolith or an empty starter, Mystack provides an interactive generator that lets you choose your database, deployment runtime, email, and payment providers.
Every generated project comes complete with hardened authentication (Better Auth with self-hosted OAuth2/OIDC provider, 2FA and passkeys), role-based administration, full-app internationalization (Paraglide JS), and headless Base UI presentation styled with Tailwind CSS v4.
Note: Use
mystack createto start new projects. This repository maintains the CLI and the canonical reference template; application development happens in the generated project.
Install Node.js 22.12+ and Bun. Run the CLI directly from npm to launch the interactive setup wizard:
bunx @0x0501/mystackTo create a project in a specific directory:
bunx @0x0501/mystack@latest create my-app
cd my-appFollow the generated README.md to configure .env, apply database migrations, and start your dev server:
cp .env.example .env
bun run db:migrate
bun run devOpen http://localhost:3000. In development, authentication emails are logged directly to the console when provider credentials are omitted.
No cloud accounts or Docker required β start building immediately:
bunx @0x0501/mystack@latest create my-app --yes --database bun-sqlite --deployment bun --email resend --payments none
cd my-app
cp .env.example .env
bun run db:migrate
bun run devThe reference template configuration with edge deployment:
bunx @0x0501/mystack@latest create my-app --yes --database pg-hyperdrive --deployment cloudflare --email cloudflare --payments stripe
cd my-app
cp .env.example .env
bun run db:up # Starts local Postgres in Docker Compose
bun run db:migrate
bun run devDistributed libSQL storage with modern email and billing:
bunx @0x0501/mystack@latest create my-app --yes --database turso-cloud --deployment cloudflare --email resend --payments polarMystack configures code, migrations, environment variables, and dependencies tailored to your chosen stack. The interactive wizard automatically disables incompatible combinations.
| Category | Badges & Supported Integrations |
|---|---|
| Runtimes | |
| Databases | |
| Payments |
| Database Option | Flag | Supported Deployments | Connection & Characteristics |
|---|---|---|---|
| PostgreSQL (Hyperdrive) | pg-hyperdrive |
Cloudflare Workers | Cloudflare HYPERDRIVE connection pooling |
| PostgreSQL (Direct) | pg |
Nitro / Node.js, Bun | Direct DATABASE_URL app-role connection |
| Cloudflare D1 | d1 |
Cloudflare Workers | Cloudflare DB native binding |
| Turso Cloud | turso-cloud |
Cloudflare, Nitro, Bun | Local .local/turso-local.db in dev; remote libsql:// in prod |
| Turso Local (libSQL) | turso-local |
Nitro / Node.js, Bun | Local file:.local/turso-local.db (no cloud tokens required) |
| Bun SQLite | bun-sqlite |
Bun | Native bun:sqlite engine (local.db) |
Your choices are recorded in mystack.json for reference.
Mystack ships platform infrastructure so you can focus on building your product:
- π‘οΈ Hardened Better Auth: Email/password authentication, GitHub OAuth, passkeys (WebAuthn), and two-factor authentication (2FA).
- π OAuth 2.0 / OIDC Provider: Built-in identity provider issuing tokens and exposing RFC discovery metadata (
/.well-known/openid-configuration,/.well-known/oauth-authorization-server/api/auth). - β‘ TanStack Start & React 19: Full-stack type-safety, streaming SSR, TanStack Router file-based routing, server functions (
createServerFn), and TanStack Query state caching. - π Full-App i18n: First-class internationalization powered by Paraglide JS with SEO-friendly localized URL paths (
/,/de) and automatic user locale persistence. - π¨ Headless UI & Tailwind CSS v4: Modular Base UI (
@base-ui/react) primitives with customizable Tailwind CSS v4 design tokens and dark mode support. - π Row-Level Security (RLS): Isolated database transaction scopes with tenant/service context helpers.
- ποΈ Admin Console & Audit Log: Role-based access control, peer admin protection, OAuth client management, and audit log tracking.
- π³ Pluggable Payments: Modular checkout and webhook handling for Stripe, Polar, Creem, and NOWPayments (or
none).
| Path | Purpose |
|---|---|
Root (src/, scripts/, drizzle/) |
Canonical runnable reference template (PostgreSQL + Cloudflare Workers) |
packages/mystack/ |
CLI generator, option catalog, and template adapters (@0x0501/mystack) |
packages/website/ |
Marketing site and catalog-backed stack configurator (mystack.sumku.cc) |
docs/ |
Architectural decision records (ADRs), specs, and maintainer guides |
The root application is the canonical template source. See ADR 0012 for details on composition and template bundling.
- Getting started β CLI installation, flags, and deployment walkthrough
- Project guide β Working inside a generated application (bundled with the CLI)
- Reference template β Maintainers' setup for the PostgreSQL / Workers reference app
- Design β Headless Base UI integration, design tokens, and motion
- Contributing β Developing adapters and maintaining the CLI
- Publishing β Packaging and automated release workflows
- Context & Glossary β Ubiquitous language and architecture invariants
- Documentation index β Complete documentation and ADR catalog
