Skip to content
0x0501Public

About

Ship Tanstack full-stack dev faster with Mystack.

Topics

Resources

Contributing

Stars

6 stars

Watchers

1 watching

Forks

Latest commit

Β 

History

93 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Mystack Logo

Mystack

Configurable, production-grade TanStack Start application generator & platform template.

npm version License: MIT Node.js version Bun TanStack Start Website

Mystack Open Graph Cover


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 create to start new projects. This repository maintains the CLI and the canonical reference template; application development happens in the generated project.

Quick Start

Install Node.js 22.12+ and Bun. Run the CLI directly from npm to launch the interactive setup wizard:

bunx @0x0501/mystack

To create a project in a specific directory:

bunx @0x0501/mystack@latest create my-app
cd my-app

Follow 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 dev

Open http://localhost:3000. In development, authentication emails are logged directly to the console when provider credentials are omitted.

Common Recipes

1. Zero-Cloud Local Development (Bun + SQLite)

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 dev

2. Cloudflare Edge Stack (PostgreSQL Hyperdrive + Workers)

The 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 dev

3. Serverless Turso + Resend + Polar

Distributed libSQL storage with modern email and billing:

bunx @0x0501/mystack@latest create my-app --yes --database turso-cloud --deployment cloudflare --email resend --payments polar

Compatibility

Mystack configures code, migrations, environment variables, and dependencies tailored to your chosen stack. The interactive wizard automatically disables incompatible combinations.

Supported Integrations

Category Badges & Supported Integrations
Runtimes Cloudflare Workers Nitro / Node.js Bun Native
Databases PostgreSQL / Hyperdrive Cloudflare D1 Turso Bun SQLite
Email Cloudflare Email Resend
Payments Stripe Polar Creem NOWPayments

Database & Deployment Matrix

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.

Features & Platform Capabilities

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).

Repository Structure

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.

Documentation

  • 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

License

MIT

About

Ship Tanstack full-stack dev faster with Mystack.

Topics

Resources

Contributing

Stars

6 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages