Forkbase 0.8.0
GraphQL at /graphql/v1, compatible with Supabase's (pg_graphql's schema): a <type>Collection connection per table and view with…
- GraphQL at
/graphql/v1, compatible with Supabase's (pg_graphql's schema): a<type>Collectionconnection per table and view withfirst/last/before/after/offset, filters per column (eq,in,is,like,ilike,startsWith,and/or/not, ...),orderBy,totalCountand page info; relationships from foreign keys both ways;node(nodeId:);insertInto/update/deleteFrom<type>CollectionwithatMost; functions as queries (stable, immutable) and mutations (volatile); enums and pg_graphql's scalars; names inflected to camelCase withcomment on schema ... '@graphql({"inflect_names": true})'; introspection for GraphiQL and codegen. Each request runs as the caller, so grants and row-level security apply exactly as over REST, and each role's schema shows only what it was granted. A query is one SQL statement however deep it nests. The dashboard's API docs have a GraphQL page: query editor, variables, answer and schema explorer. - Realtime presence: supabase-js's
channel.track()/untrack()and itspresenceevents work. A channel's state comes after joining (presence_state) and every change after that (presence_diff), keyed byconfig.presence.key; an entry ends when its client untracks, leaves, or its socket closes or goes silent. One channel tracks at mostrealtime.presence_limitclients (1000), each state up to 16 KB. - Private realtime channels (
supabase.channel(name, { config: { private: true } })): joining takes a person's access token, and row-level security policies onrealtime.messages, as in Supabase, decide who may join and receive (select) and who may send broadcasts and track presence (insert), withrealtime.topic()naming the channel. Broadcast from the database withrealtime.send(payload, event, topic, private)(or an insert intorealtime.messages), and over HTTP withPOST /realtime/v1/api/broadcast, which honours private channels. - A setting to allow only private channels:
realtime.private_onlyinforkbase.toml(FORKBASE_REALTIME_PRIVATE_ONLY), or the toggle on the dashboard's Realtime page (Access), which also lists the realtime policies and opens them in the policy editor. Channels there show whether they are private and who is present. - Multi-factor sign-in: people add an authenticator app (
POST /auth/v1/factors, with a QR code and anotpauth://URI), and a verified code (/factors/{id}/challenge,/factors/{id}/verify) raises their session toaal2; tokens carryaalandamras Supabase's do, andsupabase.auth.mfa.*works. Codes are TOTP (30 s, six digits), accepted once, with wrong codes limited per factor; secrets are sealed. Admins list and remove a user's factors (/auth/v1/admin/users/{id}/factors, and the user's pane in the dashboard). - Anonymous sign-ins: with
auth.anonymous_sign_inson (off by default),supabase.auth.signInAnonymously()makes a signed-in user withis_anonymous: true(a claim policies can check).PUT /auth/v1/userwith an email and a password makes them a permanent user with the same id. - Captcha: hCaptcha or Cloudflare Turnstile (
[auth.captcha], or the dashboard) checked on sign-up, password sign-in, emailed sign-in links and codes, texted codes, and password recovery, fromgotrue_meta_security.captcha_token(supabase-jscaptchaToken). - Auth hooks: a custom access token hook (claims added before signing), a send-email hook (your endpoint sends the sign-in emails), a send-SMS hook (your endpoint texts the codes) and a before-user-created hook (refuse an account), each an HTTP endpoint with a signing secret, signed the Standard Webhooks way as Supabase's are, with a timeout and a clear failure. Set in
forkbase.tomlor the dashboard's auth settings (Hooks). - SQL snippets on the server: the SQL editor saves snippets to the database instead of the browser, so they follow you to any browser. Put them in folders, rename them, share one with the team (others read it and save a copy), and move the ones a browser kept with one click. Over HTTP:
/platform/v1/snippets. - SQL assistant: a panel in the SQL editor writes SQL from a description, explains the selected SQL and fixes the last error, using a model connection of the gateway and the served schemas (tables, columns, keys, policies; never rows). The answer streams in; you insert or replace and run it yourself.
POST /platform/v1/sql/assist, model chosen bygateway.assistant_model. - Reports: a page per area in the dashboard (API, auth, storage, realtime, database, jobs and agents) over the last hour, day or week: requests and p50/p95/p99 latency by route group and status, sign-ups and sign-ins by provider, uploads, downloads and egress, realtime connections and messages, table sizes, cache hit ratio and, with
pg_stat_statements, the slowest queries.GET /platform/v1/reports/{kind}. - SDKs for Dart and Flutter (
sdk/dart), Swift (sdk/swift, SwiftPM from the repository's URL) and .NET 8 (sdk/dotnet): agents' runs (start, SQL, changes, ledger, snapshot, propose, review, undo), webhooks and policies, jobs (deploy, invoke, replay, schedules, triggers), chat with declared agents with streamed turns, evals, vectors and the gateway's connections and actions, with typed models and errors that carry the server'scodeandmessage. They sit beside supabase_flutter, supabase-swift and supabase-csharp, which keep tables, auth, storage and realtime: hand the session's access token to the Forkbase client and chat runs as the signed-in person. - REST embeds go to any depth, as PostgREST's do: nested embeds, many-to-many through a junction table,
!fk_nameand!columnhints (a300PGRST201when two keys are possible and none is named),!inner, filters, order and paging inside an embed (books.year=gte.2002,books.order=year.desc,books.limit=2), ordering by a to-one embed's column (order=author(name).desc),embed=is.null, spread embeds (...authors(name)), and embeds on what a write returns and on a function's rows. Each read is still one SQL statement. - Backups in postgres mode:
pg_dumpbackups made by hand or on a schedule ([backups] schedule, cron), kept in the data folder or an S3 bucket with a retention count, listed, downloaded, deleted and restored in place from the dashboard and/platform/v1/backups. A restore asks for confirmation and makes a pre-restore backup first. The Postgres client tools are found on PATH or in the usual install folders, must match the server's major version or newer, and are named when missing. Chronos mode gets the same schedule, S3 destination and downloads. - Log drains: send API requests, auth, functions and jobs, database errors and agents' ledger entries to an HTTP webhook, Datadog, Grafana Loki or syslog over TCP or TLS, batched, gzipped if asked, and retried with backoff. Managed at
/platform/v1/log-drainsand on Settings, Log drains (add, send a test event, pause, delete, delivery status); their headers, API keys and passwords are sealed. - Dev branches:
forkbase branch create|list|delete|reset|mergeand/platform/v1/branchesmake a copy of the project (main's data, or main's migrations on an empty database) with its own database, API keys and URL at/b/<name>. Merging applies the branch's new migrations to main. The dashboard has a branch switcher and a Branches page. App migrations now keep their SQL so branches can be set up and merged. - Vault, as in Supabase: secrets kept encrypted in the database (
vault.secrets), read in SQL fromvault.decrypted_secretsby the service role or a role you grant it, and made or changed withvault.create_secret(...)andvault.update_secret(...). It needs no extension and works the same in both modes; the key is made when Forkbase first starts. Over HTTP at/platform/v1/vault/secrets(values never listed; revealing one is for admins and goes in the audit log), and on the dashboard's Database, Vault page. See docs/vault.md for what it protects against and what it does not. - Advisors, like Supabase's database linter:
GET /platform/v1/advisors?type=security|performancefinds tables open to the API without row-level security, policies that let anon write anything, security definer views and functions, mutable search paths, keys written into functions, unindexed foreign keys, unused and duplicate indexes, tables without a primary key, policies callingauth.uid()per row and overlapping permissive policies, each with SQL that fixes it. The dashboard has an Advisors page, with the security advisor's count in the sidebar. - Storage: resumable uploads with the TUS 1.0 protocol at
/storage/v1/upload/resumable, as Supabase serves them (tus-js-client, Uppy): uploads in pieces that survive a dropped connection or a restart, the length told up front or later,x-upsert, signed upload URLs (/upload/resumable/sign), the bucket's limits and the caller's policies checked when an upload starts and when it ends. Unfinished uploads are removed afterstorage.upload_expiry_s. - Storage: byte ranges on every download (
Range, answered206withContent-Range,416past the end), withAccept-Ranges,Last-Modified,If-Modified-SinceandIf-Range, so players can seek in stored video and audio. - Storage: image transformations at
/storage/v1/render/image/public|authenticated|sign/...(supabase-jstransform): width, height,cover/contain/fill, quality, and WebP for browsers that take it, made once and kept beside the file.storage.image_transformation,image_max_input_bytesandimage_max_dimensionset it. - Storage: an S3-compatible endpoint at
/storage/v1/s3(AWS CLI, SDKs, rclone): buckets, listings, get with ranges, put, copy, delete, and multipart uploads, signed with AWS Signature Version 4. S3 access keys are made and revoked in the dashboard's Storage page or at/storage/v1/s3-credentials(secrets kept sealed); a person's session token works too, with their policies.storage.s3_protocol = falseturns it off. - Single sign-on: a company's identity provider signs its people in, by SAML 2.0 or OpenID Connect.
POST /auth/v1/sso(supabase-jssignInWithSSO, by domain or provider id) answers the provider's sign-in page; the person comes back to the app with a one-time code like every other sign-in. SAML responses are checked against the provider's certificate (XML signatures, made without C libraries), its audience, recipient, request and times, and each assertion is taken once; OIDC uses PKCE, a nonce and the issuer's keys. Providers and their email domains are kept at/auth/v1/admin/sso/providers, as in Supabase, or on the dashboard's Auth, SSO page. - Phone sign-in: six-digit codes by text message (
POST /auth/v1/otp {phone},POST /auth/v1/verify {type: "sms"}), phone and password sign-up and sign-in, and changing a number, as in Supabase. Texts go through Twilio, Twilio Verify, MessageBird or Vonage, set in[auth.phone]or on the dashboard with the secrets sealed; test numbers get a fixed code, and a number gets at most one code a minute and five an hour. - Seventeen more social sign-in providers: Apple, Azure, GitLab, Bitbucket, Discord, Facebook, Twitter (X), Slack, Spotify, Twitch, LinkedIn, Notion, Zoom, Keycloak, WorkOS, Figma and Kakao, each set up in
[auth.<provider>]or on the dashboard. Apple's client secret is made from its.p8key for each sign-in. - Dashboard: one project / branch switcher in the top bar (it showed three unlabelled "main"s), a chip with the agents' open and held runs, and a Version graph page: main, dev branches, agent runs (merged, held, open, rejected, undone, discarded), migrations and backups on one time axis, with zoom and pan, filters, keyboard steps and a side panel to review, approve, reject or undo a run, or switch to a branch.