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, 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.
Quick Links
- Getting Started — Set up your first project
- Auth for your app — Use Foir as your authentication layer, no CMS required
- Features — Everything the platform gives you
- Authorization & Access — How data isolation works, and why you can’t misconfigure it
- API Reference — GraphQL API, authentication, files, webhooks
- Config System — Define your project as code with
foir.config.ts - CLI Reference — Manage your project from the terminal
What you get
A database with a typed API
Model your data with Models and field types — text, prose for 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 User Authentication — email/password, one-time codes, and OAuth providers — or hand the whole flow to hosted sign-in, on your own login domain. Users get durable accounts you manage from the console; you get short-lived tokens to authorize their requests. See Users. 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 and background work
Send transactional email, watch your workspace’s usage against its plan 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.
Search
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 user 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 console UIs with the Editor SDK, and package anything reusable as an App — a JSON manifest at a URL. There are two ways to install one: browse the Marketplace and pick it, or paste the manifest URL directly.
Capabilities at a glance
| Area | What it gives you |
|---|---|
| Data | Typed models and records, versioning, drafts, scheduled publishing |
| API | Auto-generated GraphQL, scoped API keys, response caching |
| Auth | User accounts, OAuth, one-time codes, hosted sign-in on custom domains |
| Authorization | Database-enforced project isolation, per-record visibility, sharing grants |
| Storage | Image/video/file uploads, on-the-fly image transforms, signed private files |
| Email & usage | Transactional email; your workspace’s own plan, usage and invoices under Billing |
| Automation | Operations, lifecycle hooks, cron schedules, webhooks, durable retries |
| Search | Full-text and semantic (vector) search |
| Personalization | Variants, targeting, and user segments |
| Localization | Per-locale translations on text and prose fields, resolved per field for the locale a request asks for |
| Collaboration | Notes, comments, @mentions, and a per-user notification inbox |
| Extensibility | Config-as-code, CLI, Editor SDK, installable Apps |
Getting Started
- Create an API Key — Connect your application to Foir
- Install the CLI — Get the platform CLI with
npm install -g @foir/cli - Fetch Content — Query the GraphQL API from your frontend
- Define as Code — Set up
foir.config.tsfor your project