# TurboStarter documentation

> Official documentation index for TurboStarter products. Use the section indexes below to discover pages, then fetch `.md` URLs for markdown content.

## Documentation

- Core: Web, mobile, and browser extension starter kit.
  - Web: Frontend & API with Next.js
    - [Introduction](/docs/web): Start building with the TurboStarter web kit. Monorepo layout, auth, billing, database, and deployment patterns for production SaaS apps.
    - [Tech Stack](/docs/web/stack): Explore the web stack behind TurboStarter: Next.js, Hono, React Query, Better Auth, Drizzle, Tailwind, and shared monorepo packages.
    - [CLI](/docs/web/cli): Bootstrap a TurboStarter monorepo with the @turbostarter/cli package. Pick apps, providers, and naming in minutes instead of manual setup.
    - [Extras](/docs/web/extras): Tips, community links, and launch resources beyond the codebase. Practical extras that help you ship and grow your SaaS product.
    - [FAQ](/docs/web/faq): Answers to common TurboStarter web questions about setup, auth, billing, deployment, and day-to-day development.
    - Installation
      - [Cloning repository](/docs/web/installation/clone): Clone the TurboStarter repository and prepare your local workspace. From git checkout to a running dev environment on your machine.
      - [Editor setup](/docs/web/installation/editor-setup): Set up your editor for fast TurboStarter development. Recommended extensions, formatters, and settings for a smooth DX.
      - [AI-assisted development](/docs/web/installation/ai-development): Use Cursor, Claude Code, Codex, or Antigravity effectively with TurboStarter. Skills, rules, and workflows that speed up feature work.
      - [Development](/docs/web/installation/development): Run the web app locally with hot reload and shared monorepo packages. The everyday workflow after your environment is ready.
      - [Conventions](/docs/web/installation/conventions): Naming, folder layout, and coding conventions used across the TurboStarter monorepo. Keep new code consistent with the starter.
      - [Common commands](/docs/web/installation/commands): Common pnpm and Turborepo commands for daily TurboStarter work. Dev servers, builds, linting, database tasks, and useful scripts.
      - [Project structure](/docs/web/installation/structure): Understand the TurboStarter monorepo layout for your web app. Where apps, packages, configs, and shared code live.
      - [Updating codebase](/docs/web/installation/update): Pull upstream TurboStarter changes into your fork or project. Merge strategies, conflict hotspots, and safe upgrade checks.
      - [Managing dependencies](/docs/web/installation/dependencies): Add, update, and sync packages across the TurboStarter monorepo. Workspace rules, version alignment, and safe upgrade habits.
      - [MCP server](/docs/web/installation/mcp): Connect TurboStarter to AI assistants through the built-in MCP server. Give Cursor, Claude, and other tools structured access to your codebase.
    - Configuration
      - [Environment variables](/docs/web/configuration/environment-variables): Shared variables live in the root .env file, while app-specific ones go in apps/web; local secrets use .env.local, which is excluded from version control.
      - [App configuration](/docs/web/configuration/app): Global web settings in apps/web/src/config/app.ts. Site name, URLs, feature flags, and other application-wide configuration.
      - [Paths configuration](/docs/web/configuration/paths): Define app routes in apps/web/config/paths.ts. Shared path constants for links, redirects, and navigation across the Next.js app.
    - Database
      - [Overview](/docs/web/database/overview): Drizzle ORM for typed SQL, migrations, and queries. How the database layer connects to Better Auth and the Hono API modules.
      - [Schema](/docs/web/database/schema): Design tables and relations in the shared Drizzle schema. Migrations, conventions, and extending the data model for new features.
      - [Migrations](/docs/web/database/migrations): Generate and apply Drizzle migrations with ready-made CLI commands — use db:generate to create SQL files and db:migrate to push them to your database.
      - [Database client](/docs/web/database/client): Use database client to interact with the database. How data is modeled, migrated, and accessed from your web app.
      - [SQLite](/docs/web/database/sqlite): Switch the project from PostgreSQL to SQLite. Database setup, schema changes, and client usage with Drizzle ORM.
      - [MySQL](/docs/web/database/mysql): Switch from the default PostgreSQL to MySQL: update the Drizzle driver, schema imports, Better Auth adapter, and a handful of PostgreSQL-specific patterns.
    - API
      - [Overview](/docs/web/api/overview): Learn how the TurboStarter API is built with Hono. Modular routers, protected routes, mutations, and the typed RPC client used across apps.
      - [Adding new endpoint](/docs/web/api/new-endpoint): Add a Hono endpoint to the API: create a module with a router file, validate input with Zod, and register it in the main application router.
      - [Protected routes](/docs/web/api/protected-routes): Protect Hono routes with middleware before handlers run. Session checks, role gates, and patterns for secure API endpoints.
      - [Using API client](/docs/web/api/client): Use the Hono RPC client from Server Components, Route Handlers, and client components. Two patterns for type-safe API calls in Next.js.
      - [Mutations](/docs/web/api/mutations): Create, update, and delete data through Hono routes and server actions. Auth checks, Zod validation, and cache invalidation with React Query.
      - [Internationalization](/docs/web/api/internationalization): Return localized API errors and messages using the same i18n stack as the frontend. Translate server responses per user locale.
    - Authentication
      - [Overview](/docs/web/auth/overview): Better Auth for email, OAuth, sessions, and organizations on the web app. Secure authentication wired to your database and UI.
      - [Configuration](/docs/web/auth/configuration): Toggle password, magic link, OTP, passkey, anonymous, and OAuth providers independently through the Better Auth server config and UI provider list.
      - [User flow](/docs/web/auth/flow): Follow the TurboStarter authentication flow from sign-up to session. How login, callbacks, and protected routes work in your web app.
      - [OAuth](/docs/web/auth/oauth): Configure OAuth sign-in for your web app. Provider credentials, redirect URLs, and session handling with Better Auth.
      - [Two-Factor Authentication (2FA)](/docs/web/auth/2fa): Add two-factor authentication with TOTP and backup codes via Better Auth. Secure enrollment, verification, and recovery flows for your web app.
    - Organizations/teams
      - [Overview](/docs/web/organizations/overview): Everything you need for multi-tenant SaaS: TurboStarter handles org creation, member roles, invitations, and URL-based tenant context out of the box.
      - [Data model](/docs/web/organizations/data-model): Explore the multi-tenant data model: organizations, memberships, and invitations joined by organizationId for clean per-tenant data isolation.
      - [Active organization](/docs/web/organizations/active-organization): Read the active organization from server components via URL slug, from client components via a dedicated hook, or from API routes via session context.
      - [RBAC (Roles & Permissions)](/docs/web/organizations/rbac): Define roles like member, admin, and owner, then enforce permissions server-side and client-side using the Better Auth organization plugin.
      - [Invitations](/docs/web/organizations/invitations): Invite teammates by email with signed, expiring tokens. New and existing users are onboarded seamlessly; admins can resend, revoke, or adjust roles.
    - Admin
      - [Overview](/docs/web/admin/overview): Built-in admin dashboard for users, content, and operations. Central management UI you can extend with role checks and custom views.
      - [Super Admin UI](/docs/web/admin/ui): Get familiar with the Super Admin dashboard and start managing your application. Built-in admin surfaces for managing users, content, and operations.
    - Billing
      - [Overview](/docs/web/billing/overview): Billing packages for Stripe, Lemon Squeezy, Polar, and more. Plans, checkout, subscriptions, and entitlements for your SaaS web app.
      - [Configuration](/docs/web/billing/configuration): Define plans, variants, limits, and discounts in one shared billing config schema. Learn how provider IDs map to checkout sessions and access control.
      - [Subscriptions](/docs/web/billing/subscriptions): Configure recurring plans with monthly and yearly variants, optional trials, and provider price IDs for Stripe, Lemon Squeezy, and Polar.
      - [One-time payments](/docs/web/billing/one-time): Sell lifetime access or one-off add-ons with one-time billing variants. Provider checkout events and order syncing keep entitlements accurate in your database.
      - [Credits-based billing](/docs/web/billing/credits): Build a credits system on TurboStarter: design a balance ledger, map billing variants to credit grants, and deduct atomically after billable actions.
      - [Metered usage](/docs/web/billing/metered-usage): Charge for actual usage like API calls or tokens: configure a metered variant with tiered pricing, report usage server-side, and query period totals.
      - [Per-seat billing](/docs/web/billing/per-seat): Bill teams per seat: TurboStarter auto-counts members at checkout and keeps subscription quantity synced as your organization grows or shrinks.
      - [Stripe](/docs/web/billing/stripe): Set up Stripe as your billing provider: get API keys, create products, configure webhooks, and enable the Customer Portal for plan management.
      - [Lemon Squeezy](/docs/web/billing/lemon-squeezy): Switch to Lemon Squeezy as your billing provider: configure API keys, create product variants, and register subscription and order webhooks.
      - [Polar](/docs/web/billing/polar): Connect Polar to TurboStarter: generate an access token, create a separate product per pricing tier, and wire up subscription webhooks.
      - [Dodo Payments](/docs/web/billing/dodo-payments): Add Dodo Payments with API keys, product mapping, webhooks, and the hosted customer portal for managing subscriptions and invoices.
      - [Webhooks](/docs/web/billing/webhooks): Handle billing webhooks reliably in your web app. Verify events, sync subscription state, and keep customer access accurate.
    - AI
      - [Overview](/docs/web/ai/overview): AI editor rules, skills, subagents, and commands for Cursor and similar tools. Keep generated code aligned with repo conventions.
      - [Configuration](/docs/web/ai/configuration): Proxy AI requests securely through your Hono backend: set provider API keys, register the streaming endpoint, and configure the client-side hooks.
    - Emails
      - [Overview](/docs/web/emails/overview): Transactional email with React Email templates and pluggable providers. Build welcome, reset, and billing messages as components.
      - [Configuration](/docs/web/emails/configuration): Configure transactional emails with Resend, Mailgun, Nodemailer, or another provider: set your sender address, theme color, and active provider export.
      - [Sending emails](/docs/web/emails/sending): Send mail through Resend, Mailgun, Postmark, or a custom provider strategy. One simple interface every email backend implements.
    - Internationalization
      - [Overview](/docs/web/internationalization/overview): TurboStarter uses i18next under a shared package abstraction, giving you type-safe translations, automatic language detection, and React hooks out of the box.
      - [Configuration](/docs/web/internationalization/configuration): Set up supported locales, default language, and namespaces in the shared i18n config. Translation files are co-located and shared across all apps.
      - [Translating app](/docs/web/internationalization/translations): Learn how to translate your application to multiple languages. Configure languages, load translations, and keep copy maintainable.
    - Marketing
      - [Marketing pages](/docs/web/marketing/pages): Discover which marketing pages are available out of the box and how to add a new one. Ship credible marketing pages faster with the built-in site structure.
      - [Legal pages](/docs/web/marketing/legal): Learn how to create and update legal pages. Improve discoverability and add the legal and landing pages users expect.
      - [SEO](/docs/web/marketing/seo): Learn how to optimize your app for search engines. Ship credible marketing pages faster with the built-in site structure.
    - Customization
      - [Styling](/docs/web/customization/styling): Tailwind CSS and Base UI for the web design system. Theme tokens, component variants, and how to restyle without fork drift.
      - [Components](/docs/web/customization/components): Add shadcn/ui components to your app via the CLI or copy-paste. Keep atomic shared components in @workspace/ui-web for reuse across views.
      - [Adding packages](/docs/web/customization/add-package): Scaffold a new monorepo package with turbo gen, configure exports for client and server, and import it across your TurboStarter apps.
      - [Adding apps](/docs/web/customization/add-app): Learn how to add apps to your Turborepo workspace. Extend the design system and monorepo without fighting the starter layout.
    - Storage
      - [Overview](/docs/web/storage/overview): Upload and serve user files—images, documents, videos—through the shared storage layer. Presigned URLs and access patterns included.
      - [Configuration](/docs/web/storage/configuration): S3-compatible storage: AWS, R2, Spaces, and more. Bucket credentials, env vars, and upload settings for the storage package.
      - [Managing files](/docs/web/storage/managing-files): Learn how to manage files. Upload files, configure S3-compatible storage, and manage access from your web app.
    - CMS
      - [Overview](/docs/web/cms/overview): Manage blog posts, docs, and marketing content in TurboStarter. Overview of the CMS setup, collections, and how content is sourced at build time.
      - [Content Collections](/docs/web/cms/content-collections): Use Content Collections to type-check MDX content across the repo. Schema, transforms, and how docs, blog, and legal content are loaded.
      - [Blog](/docs/web/cms/blog): Create, publish, and manage blog posts in TurboStarter. MDX frontmatter, locales, thumbnails, and the content workflow used on the marketing site.
    - Analytics
      - [Overview](/docs/web/analytics/overview): Unified event tracking API across PostHog, GA, and other providers. Instrument the web app consistently without vendor lock-in.
      - [Configuration](/docs/web/analytics/configuration): Wire up web analytics in minutes: choose from Vercel Analytics, PostHog, and other providers by switching a single export file and setting env vars.
      - [Tracking events](/docs/web/analytics/tracking): Learn how to track events in your TurboStarter web app. Instrument your web app, choose a provider, and validate events in production.
    - Monitoring
      - [Overview](/docs/web/monitoring/overview): Lightweight hooks to see what's failing, where, and for whom. Sentry and PostHog integration with sensible defaults for production.
      - [Sentry](/docs/web/monitoring/sentry): Learn how to setup Sentry as your web monitoring provider. Instrument your web app, choose a provider, and validate events in production.
      - [PostHog](/docs/web/monitoring/posthog): Configure PostHog for real-time error tracking, session replay, and feature flags: create a project, activate the monitoring provider, and set env vars.
    - Deployment
      - [Checklist](/docs/web/deployment/checklist): A step-by-step pre-launch checklist covering database provisioning, environment variables, auth configuration, billing setup, and DNS verification.
      - [Vercel](/docs/web/deployment/vercel): Vercel is the recommended host for TurboStarter and provides first-class Next.js support with zero-config deployments and automatic preview environments.
      - [Cloudflare](/docs/web/deployment/cloudflare): Run your Next.js app on Cloudflare's global edge network using OpenNext, Wrangler for deployment, Hyperdrive for database connections, and R2 for caching.
      - [Netlify](/docs/web/deployment/netlify): Connect your repository to Netlify, configure the monorepo build command, and set environment variables to get automatic deployments on every push.
      - [Render](/docs/web/deployment/render): Deploy to Render by connecting your repository, configuring the monorepo build command, and managing environment variables for a production-ready service.
      - [Railway](/docs/web/deployment/railway): Link your repository to Railway, configure the build command for your monorepo, and manage environment variables to get a reliable production deployment.
      - [AWS Amplify](/docs/web/deployment/amplify): Connect your GitHub repository to AWS Amplify for automated deployments, then configure the build spec and environment variables for your monorepo.
      - [Docker](/docs/web/deployment/docker): Generate a production-ready Dockerfile with the built-in generator or add the files manually to containerize your TurboStarter app for any environment.
      - [VPS](/docs/web/deployment/vps): Deploy to any Linux VPS using Docker Compose and Caddy as a reverse proxy with automatic HTTPS, giving you full control over runtime, networking, and costs.
      - [Fly.io](/docs/web/deployment/fly): Deploy a Docker-packaged TurboStarter app to Fly.io's global infrastructure using flyctl, with full control over secrets and environment variable management.
      - [Standalone API](/docs/web/deployment/api): Extract the Hono API into a standalone Node.js service to deploy it independently, useful for mobile or extension backends and long-running server tasks.
    - Testing
      - [Unit tests](/docs/web/tests/unit): Write and run fast unit tests for individual functions and components with instant feedback. Run fast checks locally and in CI with the included test tooling.
      - [E2E tests](/docs/web/tests/e2e): Run end-to-end tests with Playwright against a production build. Covers auth flows, email testing, cross-browser CI, and the test layout.
    - Background tasks
      - [Overview](/docs/web/background-tasks/overview): Run long jobs and cron work outside HTTP requests with Trigger.dev and QStash. When to queue work and how the starter integrates.
      - [trigger.dev](/docs/web/background-tasks/trigger): Integrate Trigger.dev for durable background jobs and cron tasks. Queue work, handle retries, and run long-running jobs outside request cycles.
      - [Upstash QStash](/docs/web/background-tasks/qstash): Integrate Upstash QStash with your TurboStarter application for serverless-first background task processing. Queue jobs, schedule cron work, and keep.
    - Recipes
      - [Prisma](/docs/web/recipes/prisma): Switch TurboStarter from Drizzle to Prisma: schema design, Prisma Client setup, migrations, and query rewrites.
      - [Supabase](/docs/web/recipes/supabase): Learn how to set up Supabase for your TurboStarter project. Practical instructions you can apply directly to your web app.
      - [Subdomain multi-tenancy](/docs/web/recipes/subdomain-multi-tenancy): Route tenants by subdomain in your TurboStarter web app. DNS, middleware, organization context, and data isolation patterns for multi-tenant SaaS.
      - [Feature-based access](/docs/web/recipes/feature-based-access): Gate TurboStarter web features by subscription plan. Define entitlements, enforce access in API routes, and show upgrade prompts in the UI.
      - [Multiple environments](/docs/web/recipes/multiple-environments): Set up development, staging, and production environment variables for the web app. Practical instructions you can apply directly to your web app.
      - [Build a production feature](/docs/web/recipes/build-a-feature): Ship a complete feature from database to UI. Uses a feedback widget walkthrough across database, API, types, and UI.
    - Troubleshooting
      - [Installation](/docs/web/troubleshooting/installation): Solve clone, pnpm, Docker, and local dev startup problems. Fixes for the most frequent TurboStarter installation blockers.
      - [Billing](/docs/web/troubleshooting/billing): Fix checkout failures, webhook mismatches, and subscription state drift. Common Stripe and provider billing issues and solutions.
      - [Deployment](/docs/web/troubleshooting/deployment): Find answers to common web deployment issues. Resolve frequent issues quickly with practical troubleshooting steps.
      - [Emails](/docs/web/troubleshooting/emails): Troubleshoot missing mail, provider errors, and template rendering. Swap providers or debug delivery when transactional email breaks.
  - Mobile: Expo app for iOS & Android
    - [Introduction](/docs/mobile): Start building with the TurboStarter mobile kit. Expo, React Native, auth, billing, and shared API patterns for iOS and Android apps.
    - [Tech Stack](/docs/mobile/stack): Explore the mobile stack behind TurboStarter: Expo, React Native, shared API client, auth, billing, and monorepo packages.
    - [CLI](/docs/mobile/cli): Create a new TurboStarter monorepo from the CLI with your preferred apps preconfigured. Fastest path from install to running Expo.
    - [Extras](/docs/mobile/extras): Launch resources beyond code: Discord, changelog, marketing tips, and workflows that help you ship your mobile SaaS faster.
    - [FAQ](/docs/mobile/faq): Answers to common TurboStarter mobile questions about Expo setup, auth, billing, publishing, and local development.
    - Installation
      - [Cloning repository](/docs/mobile/installation/clone): Clone the TurboStarter repository and prepare your local workspace. From git checkout to a running dev environment on your machine.
      - [Editor setup](/docs/mobile/installation/editor-setup): Set up your editor for fast TurboStarter development. Recommended extensions, formatters, and settings for a smooth DX.
      - [AI-assisted development](/docs/mobile/installation/ai-development): Use Cursor, Claude Code, Codex, or Antigravity effectively with TurboStarter. Skills, rules, and workflows that speed up feature work.
      - [Development](/docs/mobile/installation/development): Run the mobile app locally with hot reload and shared monorepo packages. The everyday workflow after your environment is ready.
      - [Firebase project](/docs/mobile/installation/firebase): Add Firebase to your TurboStarter mobile app for push notifications and other native services. Setup steps, config files, and env wiring.
      - [Conventions](/docs/mobile/installation/conventions): Naming, folder layout, and coding conventions used across the TurboStarter monorepo. Keep new code consistent with the starter.
      - [Common commands](/docs/mobile/installation/commands): Common pnpm and Turborepo commands for daily TurboStarter work. Dev servers, builds, linting, database tasks, and useful scripts.
      - [Project structure](/docs/mobile/installation/structure): Understand the TurboStarter monorepo layout for your mobile app. Where apps, packages, configs, and shared code live.
      - [Updating codebase](/docs/mobile/installation/update): Pull upstream TurboStarter changes into your fork or project. Merge strategies, conflict hotspots, and safe upgrade checks.
      - [Managing dependencies](/docs/mobile/installation/dependencies): Add, update, and sync packages across the TurboStarter monorepo. Workspace rules, version alignment, and safe upgrade habits.
      - [MCP server](/docs/mobile/installation/mcp): Connect TurboStarter to AI assistants through the built-in MCP server. Help coding tools understand your mobile app and monorepo setup.
    - Configuration
      - [Environment variables](/docs/mobile/configuration/environment-variables): Define mobile env vars at the monorepo root and apps/mobile. Connect API URLs, auth keys, and billing SDK secrets for local and EAS builds.
      - [App configuration](/docs/mobile/configuration/app): App-wide Expo and EAS settings live in different config files. Know which file owns bundle IDs, scheme, icons, and build profiles.
      - [Paths configuration](/docs/mobile/configuration/paths): Centralize route and deep-link paths in apps/mobile/config/paths.ts. One source of truth for navigation constants across the app.
    - [Database](/docs/mobile/database): Expo apps reach data through your deployed Hono API. Deploy the web backend first, then consume routes from the mobile RPC client.
    - API
      - [Overview](/docs/mobile/api/overview): Call the shared Hono API from your Expo app. Protected routes, mutations, session-aware clients, and React Query patterns for mobile.
      - [Using API client](/docs/mobile/api/client): Interact with the Hono API from Expo using the shared typed client. Auth headers, React Query hooks, and calling routes from native screens.
    - Authentication
      - [Overview](/docs/mobile/auth/overview): Better Auth powers mobile sign-up, login, sessions, and OAuth. Production-ready authentication shared with your web app and API.
      - [Configuration](/docs/mobile/auth/configuration): Enable password, magic link, OTP, or OAuth on mobile. Configure Apple, Google, and GitHub providers and set your app scheme as a trusted origin.
      - [User flow](/docs/mobile/auth/flow): Follow the TurboStarter authentication flow from sign-up to session. How login, callbacks, and protected routes work in your mobile app.
      - OAuth
        - [OAuth](/docs/mobile/auth/oauth): Enable dozens of OAuth providers through Better Auth with minimal config. Overview of social login options for Expo mobile apps.
        - [Apple](/docs/mobile/auth/oauth/apple): Sign in with Apple on iOS using native APIs and Better Auth verification. Credentials, identity tokens, and App Store expectations.
        - [Google](/docs/mobile/auth/oauth/google): Sign in with Google on Android and iOS with native account picker flows. Platform client IDs, token exchange, and Better Auth setup.
      - [Two-Factor Authentication (2FA)](/docs/mobile/auth/2fa): Add two-factor authentication to your mobile app with TOTP and backup codes. Secure enrollment and verification flows via Better Auth.
    - Organizations/teams
      - [Overview](/docs/mobile/organizations/overview): Teams and multi-tenant SaaS on mobile with shared org context from Better Auth. Invites, roles, and active organization switching.
      - [Active organization](/docs/mobile/organizations/active-organization): Set and switch the current organization context within your application. Team invites, roles, permissions, and active organization context explained.
      - [RBAC (Roles & Permissions)](/docs/mobile/organizations/rbac): Define member, admin, and owner roles in your mobile app. Check permissions client-side using authClient helpers or the hasPermission API.
      - [Invitations](/docs/mobile/organizations/invitations): Send, track, and accept organization invites. Team invites, roles, permissions, and active organization context explained.
    - Billing
      - [Overview](/docs/mobile/billing/overview): Mobile billing across App Store and Google Play with RevenueCat and Superwall. Cross-platform subscriptions without reinventing stores.
      - [Configuration](/docs/mobile/billing/configuration): Configure native store products, offerings, and paywalls for iOS and Android. User and organization billing with cross-platform plan sync.
      - [RevenueCat](/docs/mobile/billing/revenuecat): Step-by-step RevenueCat setup for TurboStarter: connect App Store and Play Store, create entitlements, build paywalls, and register webhooks.
      - [Superwall](/docs/mobile/billing/superwall): Switch to Superwall for no-code paywall experiments and A/B testing. Configure entitlements, products, and webhooks without releasing app updates.
      - [Webhooks](/docs/mobile/billing/webhooks): Handle billing webhooks reliably in your mobile app. Verify events, sync subscription state, and keep customer access accurate.
    - [AI](/docs/mobile/ai): Add AI features to your mobile app with TurboStarter. Providers, prompts, tools, and integration patterns that scale.
    - [Internationalization](/docs/mobile/internationalization): i18next plus expo-localization for multilingual mobile apps. Load locales, detect device language, and keep translations maintainable.
    - Customization
      - [Styling](/docs/mobile/customization/styling): Style the mobile app with Uniwind and shared tokens. Tailwind-like utilities adapted for React Native screens and components.
      - [Components](/docs/mobile/customization/components): Customize UI with react-native-reusables primitives. Accessible, composable components aligned with the mobile design system.
      - [Adding packages](/docs/mobile/customization/add-package): Learn how to add packages to your Turborepo workspace. Practical ways to adapt styling and components in your mobile app.
      - [Adding apps](/docs/mobile/customization/add-app): Use git subtree to fork the mobile app into a new app within the monorepo while pulling TurboStarter updates without conflicts.
    - [Push notifications](/docs/mobile/push-notifications): Push notifications for Expo are on the roadmap. What to expect and how TurboStarter will wire FCM and APNs when the feature ships.
    - [Marketing](/docs/mobile/marketing): Market your mobile app with landing pages, ASO basics, and starter resources. Turn the included web marketing site into acquisition.
    - Analytics
      - [Overview](/docs/mobile/analytics/overview): Product analytics vs technical monitoring on mobile. Instrument Expo apps, pick a provider, and track the events that matter early.
      - [Configuration](/docs/mobile/analytics/configuration): Set up mobile analytics providers (PostHog, Mixpanel, or Google Analytics), handle App Tracking Transparency permissions, and wrap your app.
      - [Tracking events](/docs/mobile/analytics/tracking): Call track() anywhere in your React Native app to capture events and properties. Identify users by ID to link sessions across devices.
    - Monitoring
      - [Overview](/docs/mobile/monitoring/overview): Know what broke, on which screen, and for which user in production. Sentry and PostHog hooks built for Expo error and performance data.
      - [Sentry](/docs/mobile/monitoring/sentry): Integrate Sentry for crash reporting in your Expo app. Upload source maps via the Expo config plugin and Metro plugin for readable stack traces.
      - [PostHog](/docs/mobile/monitoring/posthog): Learn how to setup PostHog as your mobile monitoring provider. Provider setup, env vars, and the events worth tracking early on.
    - Publishing to stores
      - [Checklist](/docs/mobile/publishing/checklist): Store submission checklist for iOS App Store and Google Play. Certificates, screenshots, privacy labels, and review readiness.
      - [App Store (iOS)](/docs/mobile/publishing/ios): Learn how to publish your mobile app to the Apple App Store. From build artifacts to live release on the target app marketplace.
      - [Google Play (Android)](/docs/mobile/publishing/android): Submit your app to Google Play via manual upload, EAS CLI, or a pre-configured GitHub Actions workflow. Includes review and managed publishing tips.
      - [Updates](/docs/mobile/publishing/updates): Push JavaScript-only fixes instantly via EAS OTA updates or bump the version and resubmit to app stores for native changes.
    - Testing
      - [Unit tests](/docs/mobile/tests/unit): Write fast, isolated unit tests for React Native components and utilities with Jest. Test organization patterns and where to add coverage first.
      - [E2E tests](/docs/mobile/tests/e2e): Run Maestro end-to-end tests on iOS and Android against a production API build. Covers flows, testIDs, EAS profiles, and CI.
    - Recipes
      - [Prisma](/docs/mobile/recipes/prisma): Switch TurboStarter from Drizzle ORM to Prisma ORM: schema design, Prisma Client setup, Better Auth adapter changes, migrations, and query rewrites.
      - [Supabase](/docs/mobile/recipes/supabase): Replace the default database with Supabase in your TurboStarter mobile app. Database and optional storage integration in a few steps.
      - [Feature-based access](/docs/mobile/recipes/feature-based-access): Gate TurboStarter mobile features by subscription plan. RevenueCat and Superwall entitlements, API checks, paywalls, and upgrade flows.
      - [Multiple environments](/docs/mobile/recipes/multiple-environments): Isolate dev, preview, and production builds in Expo with separate EAS environments, bundle identifiers, and EXPO_PUBLIC_ variable sets.
      - [Build a production feature](/docs/mobile/recipes/build-a-feature): Add a native screen for your feature. Feedback widget walkthrough with Expo Router, Bottom Sheet forms, and the mobile API client.
    - Troubleshooting
      - [Installation](/docs/mobile/troubleshooting/installation): Fix SSH clone failures, Docker startup errors, missing translations, Xcode detection issues, and module-not-found errors in your mobile setup.
      - [Billing](/docs/mobile/troubleshooting/billing): Debug paywall and subscription issues: missing products, sandbox accounts, RevenueCat sync, and entitlements not updating.
      - [Publishing](/docs/mobile/troubleshooting/publishing): Resolve App Store and Play rejections: metadata, permissions, login demos, and common policy fixes before resubmitting.
  - Browser extension: Add-on for your browser
    - [Introduction](/docs/extension): Start building with the TurboStarter browser extension kit. WXT, Vite, auth, and shared backend patterns for Chrome, Firefox, and Edge.
    - [Tech Stack](/docs/extension/stack): Explore the extension stack behind TurboStarter: WXT, Vite, React, shared auth, API client, and monorepo tooling.
    - [CLI](/docs/extension/cli): Scaffold a new TurboStarter project from the CLI. Generate a configured monorepo with your chosen apps and packages in one command.
    - [Extras](/docs/extension/extras): Bonus resources bundled with the extension kit: launch tips, community links, and shortcuts that speed up shipping your product.
    - [FAQ](/docs/extension/faq): Answers to common TurboStarter extension questions about WXT setup, auth, store publishing, and project structure.
    - Installation
      - [Cloning repository](/docs/extension/installation/clone): Clone the TurboStarter repository and prepare your local workspace. From git checkout to a running dev environment on your machine.
      - [Editor setup](/docs/extension/installation/editor-setup): Set up your editor for fast TurboStarter development. Recommended extensions, formatters, and settings for a smooth DX.
      - [AI-assisted development](/docs/extension/installation/ai-development): Use Cursor, Claude Code, Codex, or Antigravity effectively with TurboStarter. Skills, rules, and workflows that speed up feature work.
      - [Development](/docs/extension/installation/development): Run the browser extension locally with hot reload and shared monorepo packages. The everyday workflow after your environment is ready.
      - [Conventions](/docs/extension/installation/conventions): Naming, folder layout, and coding conventions used across the TurboStarter monorepo. Keep new code consistent with the starter.
      - [Common commands](/docs/extension/installation/commands): Common pnpm and Turborepo commands for daily TurboStarter work. Dev servers, builds, linting, database tasks, and useful scripts.
      - [Project structure](/docs/extension/installation/structure): Understand the TurboStarter monorepo layout for your browser extension. Where apps, packages, configs, and shared code live.
      - [Updating codebase](/docs/extension/installation/update): Pull upstream TurboStarter changes into your fork or project. Merge strategies, conflict hotspots, and safe upgrade checks.
      - [Managing dependencies](/docs/extension/installation/dependencies): Add, update, and sync packages across the TurboStarter monorepo. Workspace rules, version alignment, and safe upgrade habits.
      - [MCP server](/docs/extension/installation/mcp): Connect TurboStarter to AI assistants through the built-in MCP server. Help coding tools navigate your extension project and shared packages.
    - Configuration
      - [Environment variables](/docs/extension/configuration/environment-variables): Env vars for the extension live in the repo root and apps/extension. Wire API URLs, auth secrets, and provider keys correctly.
      - [App configuration](/docs/extension/configuration/app): Set global extension settings in apps/extension/src/config/app.ts. Central place for names, URLs, and app-wide flags.
      - [Manifest](/docs/extension/configuration/manifest): Configure manifest.json for Chrome, Firefox, and Edge requirements. Permissions, entry points, and store-ready extension metadata.
    - Structure
      - [Overview](/docs/extension/structure/overview): Explore the app/ directory structure that drives your extension: popup, options, sidepanel, background scripts, content scripts, and more.
      - [Pages](/docs/extension/structure/pages): Get started with your extension's pages. Understand responsibilities, file layout, and runtime behavior in the extension.
      - [Content scripts](/docs/extension/structure/content-scripts): Learn more about content scripts. Understand responsibilities, file layout, and runtime behavior in the extension.
      - [Background service worker](/docs/extension/structure/background): Configure your extension's background service worker. Understand responsibilities, file layout, and runtime behavior in the extension.
      - [Messaging](/docs/extension/structure/messaging): Communicate between your extension's components. How this part of the extension fits together and where to add your logic.
      - [Storage](/docs/extension/structure/storage): Learn how to store data in your extension. How this part of the extension fits together and where to add your logic.
    - [Database](/docs/extension/database): Extensions talk to your deployed Hono API for data. Why the web backend must be live and how the extension client connects.
    - API
      - [Overview](/docs/extension/api/overview): Use the shared Hono API from your browser extension. Session headers, protected routes, and the typed RPC client for popup and background scripts.
      - [Using API client](/docs/extension/api/client): Call the Hono API from your extension with the shared typed client. Pass session cookies, hit protected routes, and fetch from popup or background.
    - Authentication
      - [Overview](/docs/extension/auth/overview): Better Auth in your browser extension with shared sessions from the web app. Sign-in, OAuth, and secure session handling out of the box.
      - [Session](/docs/extension/auth/session): Learn how to manage the user session in your extension. How authentication is wired in your browser extension and what to customize.
    - [Organizations/teams](/docs/extension/organizations): Share organization context from the web session inside your extension. Active org data available to gated features and API calls.
    - [Billing](/docs/extension/billing): Extension billing flows through your web app checkout. Gate premium extension features using the same subscriptions and entitlements.
    - [AI](/docs/extension/ai): Add AI features to your browser extension with TurboStarter. Providers, prompts, tools, and integration patterns that scale.
    - [Internationalization](/docs/extension/internationalization): i18next and cookies power extension locale switching. Translate popup and content-script UI without rebuilding language plumbing.
    - Customization
      - [Styling](/docs/extension/customization/styling): Get started with styling your extension. Extend the design system and monorepo without fighting the starter layout.
      - [Components](/docs/extension/customization/components): Manage and customize your extension components. Practical ways to adapt styling and components in your browser extension.
      - [Adding packages](/docs/extension/customization/add-package): Learn how to add packages to your Turborepo workspace. Practical ways to adapt styling and components in your browser extension.
      - [Adding apps](/docs/extension/customization/add-app): Use git subtree to duplicate the extension app template into a new monorepo app while staying in sync with upstream TurboStarter updates.
    - [Marketing](/docs/extension/marketing): Launch and grow your browser extension with landing pages, SEO basics, and go-to-market ideas included with the starter kit.
    - Analytics
      - [Overview](/docs/extension/analytics/overview): Two analytics layers for extensions: product events and technical monitoring. Pick providers and track popup and background behavior.
      - [Configuration](/docs/extension/analytics/configuration): Connect Google Analytics or PostHog to your browser extension by configuring measurement IDs, API secrets, and VITE_ environment variables.
      - [Tracking events](/docs/extension/analytics/tracking): Call track() anywhere in your extension to log events, then use identify() to tie actions to a specific user across sessions.
    - Monitoring
      - [Overview](/docs/extension/monitoring/overview): Monitoring helpers show what failed, where (popup, content script, background), and for whom. Provider-agnostic error tracking for extensions.
      - [Sentry](/docs/extension/monitoring/sentry): Capture errors from your extension's popup, background worker, and content scripts in Sentry with readable stack traces via source maps.
      - [PostHog](/docs/extension/monitoring/posthog): Learn how to setup PostHog as your browser extension monitoring provider. Provider setup, env vars, and the events worth tracking early on.
    - Publishing to stores
      - [Checklist](/docs/extension/publishing/checklist): Pre-submission checklist for Chrome Web Store, Firefox, and Edge. Assets, permissions, privacy policy, and review pitfalls to avoid.
      - [Chrome Web Store](/docs/extension/publishing/chrome): Register a Chrome Web Store developer account, upload your extension zip, and automate future releases with the pre-built GitHub Actions workflow.
      - [Firefox Add-ons](/docs/extension/publishing/firefox): Submit your extension to Firefox Add-ons manually for the first release, then automate updates using JWT secrets in your GitHub Actions workflow.
      - [Edge Add-ons](/docs/extension/publishing/edge): Submit your Chromium extension to Microsoft Edge Add-ons. Reuse most Chrome assets with Edge-specific packaging and review steps.
      - [Updates](/docs/extension/publishing/updates): Ship a new extension version by bumping the version field in package.json and following the same publish checklist — both manual and automated.
    - Testing
      - [Unit tests](/docs/extension/tests/unit): Write fast, isolated unit tests for your extension's functions and components using the same Vitest setup as the web app.
      - [E2E tests](/docs/extension/tests/e2e): Test your Chrome MV3 extension with Playwright. Covers popup flows, sign-in via the web app, content scripts, and CI.
    - Recipes
      - [Prisma](/docs/extension/recipes/prisma): Switch TurboStarter from Drizzle ORM to Prisma ORM: schema design, Prisma Client setup, Better Auth adapter changes, migrations, and query rewrites.
      - [Supabase](/docs/extension/recipes/supabase): Integrate Supabase as the database and optional storage backend for your browser extension, following the same steps as the web app recipe.
      - [Feature-based access](/docs/extension/recipes/feature-based-access): Gate TurboStarter browser extension features by subscription plan. Read billing summary from the API, hide UI, and link users to web checkout.
      - [Multiple environments](/docs/extension/recipes/multiple-environments): Manage dev, staging, and production configs with Vite-style mode files, browser-specific overrides, and separate CI secrets for store credentials.
      - [Build a production feature](/docs/extension/recipes/build-a-feature): Surface your feature inside the browser extension. Session-aware API calls, popup UI, and deep links back to the web app.
    - Troubleshooting
      - [Installation](/docs/extension/troubleshooting/installation): Fix common extension setup problems: SSH clone failures, Docker not starting, missing manifest permissions, module-not-found errors, and OneDrive conflicts.
      - [Publishing](/docs/extension/troubleshooting/publishing): Fix common store rejection reasons: permission issues, privacy disclosures, misleading listings, and manifest problems.
- AI: 10+ ready-to-use templates for AI applications on web and mobile.
  - [Get started](/ai/docs): Get started with TurboStarter AI. Explore template apps, provider integrations, and the architecture behind the AI starter kit.
  - [Tech stack](/ai/docs/stack): See the libraries, frameworks, and services that power TurboStarter AI, from Next.js and Expo to AI SDK providers and billing.
  - [Architecture](/ai/docs/architecture): See how TurboStarter AI is organized across apps, packages, and AI capabilities. A map of the monorepo before you customize providers, routes, or UI.
  - **Core services**
  - [API](/ai/docs/api): Hono-powered API layer shared across web and mobile, with route groups for AI, auth, and storage, plus middlewares for credits and rate limiting.
  - [Authentication](/ai/docs/auth): Anonymous sessions are created automatically on first visit so users can interact with AI features before signing up, with easy upgrade paths to full auth.
  - [Billing](/ai/docs/billing): Middleware-based credit system that deducts a configured amount per AI request, with usage-based billing and payment provider integration planned.
  - [Database](/ai/docs/database): PostgreSQL with Drizzle ORM stores chat history, vector embeddings for RAG, AI-generated images, and per-user credits in feature-isolated pg schemas.
  - [Internationalization](/ai/docs/internationalization): Ships with English by default and an i18next-based ai namespace for feature strings; extend by adding translation files and extra locales to the config.
  - [UI](/ai/docs/ui): Shared UI packages across web and mobile deliver chat interfaces, image galleries, and generative UI elements driven by AI SDK structured output.
  - [Storage](/ai/docs/storage): S3-compatible blob storage handles user uploads for RAG, AI-generated images and audio, and document collections, with bucket-level permission guidance.
  - [Security](/ai/docs/security): Authentication, credit limits, and rate limiting guard every AI endpoint; provider API keys stay server-side and never reach client code.
  - **Templates**
  - [Chat](/ai/docs/chat): Chat demo with attachments, web search, and streaming replies. Learn how the conversational assistant is built and how to extend it.
  - [Voice](/ai/docs/voice): Real-time voice agent demo with live audio sessions. See how listening, speaking, and tool calls work in a low-latency voice UI.
  - [Image playground](/ai/docs/image): Image playground for text-to-image generation across multiple models. Prompt UI, model switching, and output handling in one demo app.
  - [Knowledge RAG](/ai/docs/rag): Knowledge RAG demo: upload documents and ask questions against your content. Retrieval, chunking, and chat over private data sources.
  - [Text to Speech](/ai/docs/tts): Text-to-speech demo powered by ElevenLabs. Stream spoken audio from written input with voice selection and playback controls.
  - [Agents](/ai/docs/agents): AI agents template (coming soon). Planned patterns for autonomous workflows, tool use, and multi-step task execution in TurboStarter AI.
  - **Components**
  - [<AnalyzingImage />](/ai/docs/components/analyzing-image): AnalyzingImage UI for when an assistant is inspecting an upload. Show image-analysis state without generic loading spinners.
  - [<Attachments />](/ai/docs/components/attachments): Attachments component for files, uploads, and generated assets in prompts and messages. Consistent media handling across AI UIs.
  - [<Context />](/ai/docs/components/context): Context component surfaces token usage and response cost. Help users understand how much context a reply consumed.
  - [<Conversation />](/ai/docs/components/conversation): Conversation shell handles scrolling, loading, errors, and transcript layout. The outer frame for chat experiences in the AI kit.
  - [<Message />](/ai/docs/components/message): Message primitives for user and assistant turns, rich content, and layout. The foundation of conversation UI in TurboStarter AI.
  - [<ModelSelector />](/ai/docs/components/model-selector): ModelSelector picker with web and mobile variants. Let users switch models without rebuilding selection UI from scratch.
  - [<PromptInput />](/ai/docs/components/prompt-input): PromptInput family for chat, image, RAG, and voice entry points. Text input, attachments, and actions in one composable surface.
  - [<Reasoning />](/ai/docs/components/reasoning): Reasoning component exposes model thinking progress and final rationale. Surface hidden reasoning without cluttering messages.
  - [<ShimmerText />](/ai/docs/components/shimmer): ShimmerText adds subtle motion to waiting states during reasoning or tool runs. Lightweight feedback while async work finishes.
  - [<Tool />](/ai/docs/components/tool): Tool component renders tool calls as readable UI instead of raw JSON. Show what ran, current state, and results in the thread.
  - [<VoiceControlBar />](/ai/docs/components/voice-control-bar): VoiceControlBar groups mute, end call, and session actions during voice chat. Core controls for an in-call voice experience.
  - [<VoiceVisualizer />](/ai/docs/components/voice-visualizer): Voice visualizer components for web and mobile voice sessions. Multiple styles that react to audio activity during live calls.
  - **AI Capabilities**
  - [Generating text](/ai/docs/generating-text): Core text generation for chat, summarization, extraction, and classification. The building block behind most AI product features.
  - [Image generation](/ai/docs/image-generation): Generate images from natural-language prompts. Model choices, prompt structure, and product UX patterns for visual AI features.
  - [Tool calling](/ai/docs/tool-calling): Let models call APIs, search, and workflows instead of guessing. Define tools, handle results, and build agent-style experiences.
  - [Web search](/ai/docs/web-search): Give chat apps access to current web information beyond model memory. Integrate search providers into assistant responses.
  - [Model Context Protocol (MCP)](/ai/docs/mcp): Connect models to external tools and data through Model Context Protocol. Let assistants discover and call capabilities safely.
  - [Reasoning](/ai/docs/reasoning): Use reasoning models for multi-step planning, comparison, and troubleshooting. When deeper thinking beats fast single-pass replies.
  - [Embeddings](/ai/docs/embeddings): Turn text into searchable vectors for semantic retrieval. Compare meaning, not keywords, to power RAG and similarity features.
  - [Transcription](/ai/docs/transcription): Transcribe spoken audio into editable, searchable text. Meetings, voice notes, and media workflows with speech-to-text APIs.
  - [Speech](/ai/docs/speech): Convert text to natural-sounding audio for narration, assistants, and accessibility. Speech synthesis APIs and voice UX patterns.
  - AI Providers
    - [AI providers](/ai/docs/providers): Compare the main AI providers in the stack, understand what each is best at, and choose the right model platform for your product.
    - [OpenAI](/ai/docs/providers/openai): OpenAI spans text, vision, image generation, speech, transcription, and embeddings in one provider — a practical default for teams moving fast.
    - [Google AI](/ai/docs/providers/google): Learn when Google AI fits your product, how Gemini supports multimodal features, and where retrieval-heavy workflows benefit most.
    - [Anthropic](/ai/docs/providers/anthropic): Use Claude for assistant-style chat, nuanced writing, and reasoning-heavy workflows. When Anthropic fits your AI product best.
    - [Meta](/ai/docs/providers/meta): Run Llama and other open-weight Meta models via hosted or self-managed paths. A flexible option for cost and control tradeoffs.
    - [xAI Grok](/ai/docs/providers/xai): Integrate xAI Grok models for chat, reasoning-style interaction, and tool-enabled assistants in modern AI products.
    - [DeepSeek](/ai/docs/providers/deepseek): Evaluate DeepSeek for text-heavy and reasoning workloads as an alternative to default frontier providers in your stack.
    - [Replicate](/ai/docs/providers/replicate): Replicate for running open-source and community models without managing GPUs yourself. Great for experimentation and niche models.
    - [ElevenLabs](/ai/docs/providers/eleven-labs): ElevenLabs for realistic voice synthesis and transcription. Speech-first features when text models alone are not enough.
  
## Full

- [llms-full.txt](/llms-full.txt): Full markdown snapshot of all public documentation.

## Tools

- [skill.md](/skill.md): Agent skill definition for using TurboStarter documentation.
- [MCP server](/mcp): Tool endpoint for searching and reading TurboStarter documentation.
