Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

1.3 KB
Raw Blame
---
title: Supabase Client Libraries
description: Supabase client for TanStack Start
preview: <BlockOverview name="supabase-client-tanstack" showFiles />
---

## Installation

<BlockItem name="supabase-client-tanstack" />

<TanStackBeta />

## Usage

This block installs Supabase clients for connecting your TanStack Start project to Supabase. They're designed for use in both server-side loaders and actions, as well as client-side components.

If you've already set up a Supabase client in your project, you can just continue using that existing setup.

### Getting started

After installing the block, you'll have the following environment variables in your `.env.local` file:

```env
VITE_SUPABASE_URL=
VITE_SUPABASE_PUBLISHABLE_KEY=
```

- If you're using supabase.com, you can find these values in the [Connect modal](https://supabase.com/dashboard/project/_?showConnect=true&connectTab=frameworks&framework=react&using=vite&with=supabasejs) under App Frameworks or in your project's [API settings](https://supabase.com/dashboard/project/_/settings/api).

- If you're using a local instance of Supabase, you can find these values by running `supabase start` or `supabase status` (if you already have it running).

## Further reading

- [Generating TypeScript types for your client](https://supabase.com/docs/guides/api/rest/generating-types)