# Fóir compared with Convex

Both give you a typed backend with live queries, workflows, files and search. Fóir also has SSO, email, hosting, content and plans, so your agent configures them instead of connecting a service for each.

## Part by part

| Part | Convex | Fóir |
| --- | --- | --- |
| Database and API | Built in: Document database queried through TypeScript functions. Access checks are code you write | A typed API and SDK, with access checked in Postgres on every read |
| SDKs and MCP server | Built in: A generated typed client API, a CLI and an MCP server | A typed SDK, CLI and MCP server for every project, generated from one contract |
| Sign-in | Partly: Convex Auth, in beta, covers basic sign-in. SSO and SCIM need a provider Most teams add Clerk. | Hosted sign-in on your domain, SAML and SCIM for any organisation, and an audit log each one can read |
| App logic and jobs | Built in: Scheduler, crons, HTTP actions and a Workflow component with durable, retried steps | Declared steps with retries and undo, started by calls, schedules or verified webhooks, and run as the caller |
| AI agents and chat | Built in: Agent component with threads, tools and streaming that syncs live to clients | Agents with your data as tools, chat streamed to your app, each run in its own sandbox |
| Notifications | Partly: Components send email via Resend and push via Expo. In-app is yours to build Most teams add Resend. | Email from your own domain, push and in-app, all from one step, with bounces as events |
| Realtime | Built in: Every query is a live subscription that updates clients automatically | Every read can be watched |
| Hosting | Partly: A component serves static builds. Previews per pull request need another host Most teams add Vercel. | foir.build or your own domain, with a preview for every pull request |
| Files, images and video | Partly: File storage with public URLs. No image transforms, video streaming or expiring links Most teams add Cloudinary. | Images as WebP and AVIF, video streaming, and signed links |
| Search | Built in: Full-text and vector search built in. Geo search is a component | Search by meaning and by distance |
| Content and translation | Add a service: Not included Most teams add Contentful. | Drafts, versions, scheduled publishing, and translation into each of your locales |
| Admin and support | Partly: A developer dashboard to edit data and run functions as a user 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 | Built in: A Stripe component handles checkout, subscriptions and webhook sync | 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

`convex/bookings.ts`

```ts
export const list = query({
  args: { studioId: v.id('studios') },
  handler: async (ctx, { studioId }) => {
    const userId = await getAuthUserId(ctx);
    const member = await ctx.db
      .query('memberships')
      .withIndex('by_user_and_studio', (q) => q.eq('userId', userId).eq('studioId', studioId))
      .unique();
    if (!member) throw new Error('Not a member of this studio');
    return await ctx.db
      .query('bookings')
      .withIndex('by_studio', (q) => q.eq('studioId', studioId))
      .collect();
  },
});
```

The same check goes in every query and mutation that touches a studio's data.

`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

`convex/bookings.ts`

```ts
export const hold = mutation({
  args: { classId: v.id('classes') },
  handler: async (ctx, { classId }) => {
    const bookingId = await ctx.db.insert('bookings', { classId, status: 'held' });
    await ctx.scheduler.runAfter(15 * 60 * 1000, internal.bookings.releaseIfUnpaid, { bookingId });
    return bookingId;
  },
});
```

Plus releaseIfUnpaid, which frees the booking if it wasn't paid, and the code that offers it to the waitlist.

`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

- Convex: **Free** Free & Starter: $0 a month, then pay as you go, for 1 to 6 developers
- Convex: **Professional** $25 per developer a month, for 1 to 20 developers
- Convex: **Business** Business & Enterprise: $2,500 monthly minimum, with SAML SSO and SLAs

- 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

Convex's prices are from convex.dev/pricing, checked on 16 November 2026.

## Start building for free

Production-ready from the first preview.
