Eurobase + Supabase

Your app on Eurobase can use a Supabase project for its database, Auth, Storage and Edge Functions. What works depends on whether your app runs as a Worker or as a container.

What your app can use

Supabase serviceFrom a WorkerFrom a container
Data API: supabase-js, REST, GraphQL and RPCYesYes
AuthYesYes
StorageYesYes
Calling Edge FunctionsYesYes
RealtimeFrom the browser onlyYes
Postgres through the pooler: Prisma, Drizzle, pg, psycopgNoYes
Postgres direct connectionNoNo

A Worker reaches Supabase over HTTPS only: it can't open a Postgres connection or a WebSocket. Its outbound requests also have a time and size limit; see Runtime limits. Realtime subscriptions you open in the browser connect to Supabase directly and work in every app.

Set up the keys

In Supabase, open Connect and copy the project URL and the publishable key (sb_publishable_…). Use these keys, not the legacy anon and service_role keys.

  • The project URL and the publishable key are public: they end up in visitors' browsers, and Row Level Security decides what each visitor can read. Commit them to your repository, for example as NEXT_PUBLIC_SUPABASE_URL and NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY in .env.production, so the build can add them to your browser code. An agent connected to Eurobase can set them as public variables instead; see AI agents.
  • A secret key (sb_secret_…) bypasses Row Level Security. Add it only in Secrets, never under a NEXT_PUBLIC_, VITE_ or PUBLIC_ name, and use it only in server code. Secrets reach your code when it runs, not during the build.

Read and write data

Use @supabase/supabase-js, which talks to the Data API over HTTPS and works the same in a Worker, a container and the browser:

import { createClient } from '@supabase/supabase-js'

const supabase = createClient(
  process.env.NEXT_PUBLIC_SUPABASE_URL,
  process.env.NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY
)

const { data, error } = await supabase.from('todos').select('id, title')

In a Worker, put queries that need several statements or a transaction in a Postgres function and call it with supabase.rpc(), or in a Supabase Edge Function that your app calls over HTTPS.

Sign-in

Run sign-in, the sign-in callback and sign-out in the browser, and send the access token to your server in the Authorization header, which Eurobase forwards unchanged. Your server checks it with supabase.auth.getUser(token). The default @supabase/ssr and @nuxtjs/supabase setups keep the session in cookies that don't reach your server on Eurobase; Cookies in your app shows the change for each.

Postgres connection string

A container app can use Prisma, Drizzle, pg, psycopg or any other Postgres driver. In Supabase, open Connect and copy a pooler connection string; its host ends in pooler.supabase.com. Use the transaction pooler (port 6543) for most apps and turn off prepared statements in your driver, or the session pooler (port 5432) if your app needs them. Add the connection string, which contains the database password, as a secret named DATABASE_URL.

The direct connection, db.<project-ref>.supabase.co, has only an IPv6 address, which a container on Eurobase can't reach. In a Worker, use supabase-js instead of a connection string.

Choose a region

Eurobase runs your app in Paris. Every query travels to your Supabase project and back, so create the project in West EU (Paris), eu-west-3, to keep that trip short.