0
Fork 0
mirror of https://github.com/TanStack/router.git synced 2026-11-16 19:38:07 +00:00
router/examples/react/start-supabase-basic
History 2026-02-05 21:50:29 +00:00
..
.vscode chore(examples): add .vscode/settings.json configuration (#3349) 2025-02-07 10:29:48 +13:00
src chore: add source() to Tailwind v4 imports to ensure consistent hashing (#6459) 2026-01-24 01:49:12 +01:00
.env chore(start): add Start example with supabase for auth (#2277) 2024-09-07 15:13:00 +12:00
.gitignore feat: Merge alpha to main (#4365) 2025-06-10 23:19:32 +02:00
.prettierignore chore(examples): cleanup the deps for the start examples (#2388) 2024-09-21 22:21:59 +12:00
package.json release: v1.158.3 2026-02-05 21:50:29 +00:00
README.md docs(examples): Remove 'VITE_' from environment variables to match code in supabase.ts (#6224) 2026-01-02 15:24:50 +02:00
tsconfig.json chore: move start e2e and example projects from ./app to ./src (#3712) 2025-03-09 23:35:20 +01:00
vite.config.ts docs: move to tailwind 4 w/ vite (#6168) 2025-12-21 04:13:49 +01:00

TanStack Start - Supabase Example

A TanStack Start example demonstrating integration with Supabase for authentication and database.

Start a new project based on this example

To start a new project based on this example, run:

npx gitpick TanStack/router/tree/main/examples/react/start-supabase-basic start-supabase-basic

Setup

This example requires Supabase configuration. The .env file contains the necessary environment variables:

SUPABASE_URL=your-project-url
SUPABASE_ANON_KEY=your-anon-key

You'll need to:

  1. Create a Supabase project at supabase.com
  2. Get your project URL and anon key from the project settings
  3. Update the .env file with your credentials

Getting Started

From your terminal:

pnpm install
pnpm dev

This starts your app in development mode, rebuilding assets on file changes.

Build

To build the app for production:

pnpm build

Supabase Integration

This example demonstrates:

  • Authentication with Supabase Auth
  • Database queries with Supabase client
  • Real-time subscriptions
  • Server-side data fetching