Skip to Content
Introduction

Welcome to Foir

Foir is the backend your applications run on. Instead of assembling and securing a separate database, authentication service, file store, email sender, billing integration, and background-job runner — and keeping them wired together — you get them as one platform, with every project’s data isolated in the database by default.

One Foir account can back many apps at once. Each project — a site, a store, a client build — is its own isolated space with its own content, users, API keys, and domains, so an agency or team can run a whole portfolio of apps from a single backend.

What you get

A database with a typed API

Model your data with Models and field types — text, rich text, images, references, and more — and read and write it through an auto-generated GraphQL API. Records back anything: content pages, product catalogs, bookings, form submissions, per-user data. Versioning, drafts, and scheduled publishing are built in per model.

Authentication for your users

Sign your end users in with Customer Authentication — email/password, one-time codes, and OAuth providers — or hand the whole flow to Login with Foir, hosted on your own custom domain. Customers get durable accounts you manage from the admin; you get short-lived tokens to authorize their requests. See Customers. Using Foir just for auth? Start with the Auth for your app track.

Authorization that can’t leak

Access rules are enforced in the database itself, so a request can only ever reach the project — and the rows — it’s allowed to. Tenancy isolation, per-record visibility, ownership, and sharing are all evaluated below your code, not inside it. See Authorization & Access.

File and media storage

Upload images, video, audio, and documents with Media & Files. Serve transformed images on the fly, stream video, and gate private files behind signed access — no separate object store to provision.

Email, billing, and background work

Send transactional email, meter usage and take payments through built-in Billing, and run work off the request path with Operations, Lifecycle Hooks, and cron Schedules on a durable queue with retries. Receive events at your own endpoints — see Webhooks.

Query by keyword or by meaning. Semantic search generates vector embeddings for your content, so “winter clothing” also finds “cold-weather apparel.”

Personalization

Serve different content to different audiences with Variants, targeted by device, market, language, or customer segments using targeting rules.

Extend it

Define your models, operations, hooks, and editor placements in a foir.config.ts file and push them with one command. Build custom admin UIs with the Editor SDK, and install first- or third-party Apps — Shopify, Stripe, translation, image transforms — by manifest URL.

Capabilities at a glance

AreaWhat it gives you
DataTyped models and records, versioning, drafts, scheduled publishing
APIAuto-generated GraphQL, scoped API keys, response caching
AuthCustomer accounts, OAuth, one-time codes, hosted login on custom domains
AuthorizationDatabase-enforced project isolation, per-record visibility, sharing grants
StorageImage/video/file uploads, on-the-fly image transforms, signed private files
Email & billingTransactional email, Stripe-backed billing and usage metering
AutomationOperations, lifecycle hooks, cron schedules, webhooks, durable retries
SearchFull-text and semantic (vector) search
PersonalizationVariants, targeting, and customer segments
LocalizationMulti-language content with fallback chains
CollaborationNotes, comments, @mentions, and a per-user notification inbox
ExtensibilityConfig-as-code, CLI, Editor SDK, installable Apps

Getting Started

  1. Create an API Key — Connect your application to Foir
  2. Install the CLI — Get the platform CLI with npm install -g @foir/cli
  3. Fetch Content — Query the GraphQL API from your frontend
  4. Define as Code — Set up foir.config.ts for your project

Need Help?

  • FAQ — Common questions answered
  • Guides — Step-by-step tutorials
Last updated on