# Fóir compared with Supabase

Both run on Postgres and give you sign-in, files and realtime. Fóir also runs your app's logic, organisations, agents and hosting, so your agent configures them instead of connecting another service for each.

## Part by part

| Part | Supabase | Fóir |
| --- | --- | --- |
| Database and API | Built in: Postgres with generated REST and GraphQL APIs. Access is the row-level security policies you write | A typed API and SDK, with access checked in Postgres on every read |
| SDKs and MCP server | Partly: Client libraries and generated types. Its MCP server manages your project, not your users' data | A typed SDK, CLI and MCP server for every project, generated from one contract |
| Sign-in | Partly: Email, phone, social and SAML sign-in. Organisations for your customers, and SCIM, are yours to build Most teams add WorkOS. | Hosted sign-in on your domain, SAML and SCIM for any organisation, and an audit log each one can read |
| App logic and jobs | Partly: Cron, queues and Edge Functions. Steps, waits and undo are yours to build Most teams add Inngest. | Declared steps with retries and undo, started by calls, schedules or verified webhooks, and run as the caller |
| AI agents and chat | Add a service: pgvector and automatic embeddings, with no agent runtime Most teams add LangChain. | Agents with your data as tools, chat streamed to your app, each run in its own sandbox |
| Notifications | Add a service: Sign-in emails only, sent through your own SMTP server Most teams add Resend. | Email from your own domain, push and in-app, all from one step, with bounces as events |
| Realtime | Built in: Database changes, broadcast and presence | Every read can be watched |
| Hosting | Add a service: Your front end is hosted somewhere else Most teams add Vercel. | foir.build or your own domain, with a preview for every pull request |
| Files, images and video | Partly: Storage with image transformations. Video isn't transcoded Most teams add Mux. | Images as WebP and AVIF, video streaming, and signed links |
| Search | Built in: Postgres full-text search, pgvector and PostGIS | Search by meaning and by distance |
| Content and translation | Add a service: A table editor for your team, without drafts, publishing or translation Most teams add Contentful. | Drafts, versions, scheduled publishing, and translation into each of your locales |
| Admin and support | Partly: Studio for your team, where you can test policies as a role Most teams add Retool. | Your pages, notes, approvals and impersonation in the console |
| Personalisation | Add a service: Not included Most teams add Optimizely. | Variants of any record, field or list item, by audience |
| Plans and entitlements | Add a service: Not included Most teams add Stigg. | Plans that gate any model or logic, granted by a subscription |
| Payments | Partly: Your Stripe account, wired up through your own functions | Your own accounts, connected for you. Fóir turns their events into entitlements and takes no percentage |

## The same app, built on each

### Keeping studios apart

`migrations/0004_bookings_policies.sql`

```sql
-- Every table needs policies like these.
alter table bookings enable row level security;

create policy "members read their studio's bookings"
on bookings for select
using (studio_id in (
  select studio_id from memberships
  where user_id = (select auth.uid())
));

create policy "members book in their own studio"
on bookings for insert
with check (studio_id in (
  select studio_id from memberships
  where user_id = (select auth.uid())
));
```

Then the same for update and delete, on every table, and a memberships table to keep in step with who belongs where.

`foir.config.ts`

```ts
userRoles: [
  { key: 'owner', name: 'Studio owner', isDefault: false,
    grants: ['records:write:class'] },
  { key: 'member', name: 'Member', isDefault: true,
    grants: ['records:read', 'records:write:booking'] },
],
```

Each studio is an organisation. Postgres checks every read and write against the caller's organisation and role, so no policy is written by hand.

### Holding a place for 15 minutes

`migrations/0007_release_holds.sql`

```sql
-- Free places that were held but never paid for.
select cron.schedule(
  'release-expired-holds',
  '* * * * *',
  $$
    update bookings set status = 'open', held_until = null
    where status = 'held' and held_until < now();
  $$
);
```

Plus a held_until column, an Edge Function for Stripe's webhook, and another job to offer the place to the waitlist. The sweep runs once a minute.

`bookings.reserve`

```ts
const pay = step.first('pay', {
  paid:    step.waitForEvent('paid', 'booking.paid', { match: id }),
  expired: step.sleep('timeout', '15m'),
}, { after: [hold] });

const offer = step.operation('offer', 'waitlist.offer', { bookingId: id },
  { when: rule(pay.winner).eq('expired') });
```

The run waits for whichever comes first and frees the place on time. A deploy or a restart in between changes nothing.

## What each costs

- Supabase: **Free** To start
- Supabase: **$25** a month for Pro, with $10 of compute. Each extra project adds its own compute
- Supabase: **$599** a month for Team

- Fóir: **Free** For one project and 1,000 records
- Fóir: **£0.99** a month for Entry, after a 90-day trial with no card
- Fóir: **£29** a month for Starter, and £99 for Pro. Hosting and sign-in come with every plan

Supabase's prices are from supabase.com/pricing, checked on 16 November 2026.

## Start building for free

Production-ready from the first preview.
