Skip to content
supastack
Browse documentation
WebNext.js

For AI agents: fetch the complete documentation index at /llms.txt, the full documentation corpus at /llms-full.txt, the agent skill at /skill.md, or this page as Markdown at /docs/web.md (or send Accept: text/markdown).

Introduction

What supastack is, what you get, and the path to a running app.

Start here: what you have received

The kit is a starting app you can customize. Web is the browser interface plus the server API; Mobile is the phone interface; Desktop is a native window displaying the Web app. An API is the server address a client calls to sign in or read data. Shared packages are reusable pieces used by these apps.

Start with the Web local tutorial below. It tells you exactly how to download libraries, start the server and run one fake AI task. Then add the database for saved accounts, choose only the providers your product needs, customize your brand and prepare hosting. You can read the technical explanations later; they are not prerequisites for opening the first demo.

Build from a shared foundation

supastack is a modular foundation for AI SaaS on web, mobile and desktop. Next.js carries the web UI and API, Expo provides native reference flows, and the Tauri desktop shell loads the same web app. Shared packages handle identity, workspaces, billing, AI, jobs, email, storage and observability.

Start with the local reference flow to understand how the modules fit together. Configure production providers only after that flow works in your environment.

Find your way around

Applications compose the shared packages. Product-specific features belong in the consuming product codebase rather than in the reusable core.

apps/
  web/       Next.js interface and API routes
  mobile/    Expo application
packages/
  auth/      Identity and sessions
  db/        Schema and workspace persistence
  billing/   Billing and entitlements
  ai/        Providers, routing, and usage
  jobs/      Background job contract
  email/     Transactional delivery

Choose your starting point

Start with the five-minute local setup. Then follow the Continue setup link at the bottom of each guide: configure the database, authentication, plans and providers before preparing deployment. Use the complete documentation index to find every feature, provider, component and reference.

The local golden path has passed in the project’s development environment. Timed clean-clone setup, real-provider smoke, deployment, and physical-device acceptance remain separate verification steps.

Welcome to supastack

supastack is a modular kit for AI SaaS products: a Next.js web app, an Expo mobile app, and a Tauri desktop shell, all built on shared TypeScript packages for auth, billing, AI, jobs, email, storage, and observability.

After purchase you receive a GitHub invitation to the kit repositories — web, mobile, and desktop (the All Platforms bundle delivers the full monorepo). Clone the surface you're shipping and make it yours.

These docs are a step-by-step path, not a reference dump: get the app running locally first, then walk the provider setup pages in order. Each page ends by pointing at the next one.

Start a local server

You need Node.js 22 or newer. The repo pins its package manager (packageManager: [email protected]), so run pnpm through Corepack — no global install required.

1. Copy the environment file to create your local configuration.

2. Install the workspace dependencies.

3. Optionally start the local Postgres container for real persistence — the defaults run without it.

4. Start the dev server and open http://localhost:3000.

cp .env.example .env
corepack pnpm install
docker compose up -d postgres   # optional local database
corepack pnpm dev

# → http://localhost:3000

The .env file

Environment settings choose the local or hosted service used by the kit. Copy .env.example to root .env for migrations and to apps/web/.env.local for the Web server. Expo uses apps/mobile/.env.local. Copying only root .env does not configure every app.

The default fake/local providers need no paid API credentials. They let you complete the in-memory /dashboard demonstration; real sign-in at /auth still needs PostgreSQL and migrations. For a real provider, change only its named settings in the Web configuration file, save, then stop and restart the server. Never expose secrets through NEXT_PUBLIC_ or EXPO_PUBLIC_ values.

Choose your path

New here? Ship in 5 minutes takes you from clone to a running app on defaults alone.

Building for a phone or desktop? The Mobile and Desktop tabs cover the Expo and Tauri surfaces. Once the app is up, the Set up providers group walks each integration doc by doc.

If you want to continue setup, read Ship in 5 minutes.

Frequently asked questions

14 questions

What is supastack?

supastack is a modular foundation for building AI-powered SaaS products. It brings together common infrastructure so you can focus on product-specific features.

Does it support web and mobile?

Yes. supastack includes Next.js and Expo apps as starting points for web and mobile experiences.

What authentication is included?

Better Auth covers email OTP, magic-link, and social sign-in; email/password stays available at the API layer and through the Auth.js credentials engine for products that need it. Personal workspaces are provisioned with the account so product records stay scoped from day one.

How does it support AI?

supastack includes configurable multi-provider AI, usage tracking, budgets, and encrypted bring-your-own-key support.

How are subscriptions handled?

For products built on the kit, Stripe billing, subscriptions, and entitlements form the paid-access foundation. Provider secrets stay server-only.

Where does my product-specific code live?

Product-specific features remain in a separate codebase while the product configures and integrates supastack’s foundation modules.

How does supastack pricing work?

The kit is a one-time purchase with lifetime updates: One Platform at $249 (temporary launch price, $100 off the regular $349) — your pick of Next.js (Web), Expo (iOS & Android), or Tauri (macOS & Windows Desktop) — or the All Platforms Bundle at $499 (temporary launch price, $100 off the regular $599) with every platform and the full monorepo, plus $75 per extra developer seat. No kit subscription. Checkout on this site delivers your license key by email, with repository access via GitHub invite.

How do workspaces scope my data?

User-owned records are scoped by workspaceId. Identity, entitlements, AI usage, billing events, and audit entries stay inside the personal workspace boundary.

How do background jobs work?

Trigger.dev is the explicit job runtime. The JobRunner contract only promises enqueue, status, and cancel—workflow semantics stay Trigger.dev-specific and explicit.

How is email different from outreach?

Transactional email covers product workflows such as completion notices. Cold outreach and campaigns are product concerns outside this kit’s email module.

How do mobile purchases work?

Mobile includes native purchases and restore through RevenueCat, with access verified by your server. Configure the store accounts and complete device testing before release. Web billing remains separate.

Where do AI provider keys live?

Bring-your-own-key credentials are encrypted and stay server-only. Keys are redacted from logs; usage and budgets remain visible at the workspace level.

Which payment methods does checkout accept?

The Stripe-hosted checkout accepts cards and can also offer Alipay and WeChat Pay once those wallets are enabled on the Stripe account — handy for buyers in China. Wallet authorizations confirm asynchronously, so the license page updates as soon as the payment clears.

Can I get a refund?

After you've got access to the repository, supastack is yours forever, so it cannot be refunded. But rest assured, you get the complete source code with lifetime updates to build and ship unlimited products for yourself or clients. You just cannot resell the code or redistribute the repository as a starter kit or template.

EN
Theme