# InsForge Docs - [API Reference (213 pages)](https://docs.insforge.dev/_llms/en/api-reference.md): Documentation for API Reference. ## Docs ### Getting Started - [InsForge: open-source backend for AI agent coding](https://docs.insforge.dev/introduction.md): InsForge bundles Postgres, auth, storage, realtime, functions, and a model gateway behind one CLI and MCP server for AI agent coding workflows. - [Products](https://docs.insforge.dev/products.md): Browse every InsForge product — Postgres database, auth, storage, realtime, edge functions, sites, model gateway, analytics, and payments — in one place. #### Quickstart - [CLI setup](https://docs.insforge.dev/quickstart.md): Install the InsForge CLI, link a project, and generate types from the terminal in about five minutes to start building against your backend. - [Set up MCP for Cursor, Claude, Windsurf, and more](https://docs.insforge.dev/mcp-setup.md): Connect Cursor, Claude, Windsurf, and other editors to InsForge over MCP so AI agents can query your database, auth, storage, and functions. ### Products #### Database - [Database](https://docs.insforge.dev/core-concepts/database/overview.md): Every InsForge project ships a full Postgres database with typed REST and SDK endpoints, row-level security, pgvector, and realtime change feeds built in. - [Database migrations](https://docs.insforge.dev/core-concepts/database/migrations.md): Track Postgres schema changes as timestamped SQL files in git and apply them forward-only with the InsForge CLI, recording history for every project. - [Database backups and restore](https://docs.insforge.dev/core-concepts/database/backups.md): Create manual database backups, restore snapshots from the InsForge dashboard, and use automated daily backups on InsForge Cloud with 7-day retention. - [pgvector](https://docs.insforge.dev/core-concepts/database/pgvector.md): Use the pgvector extension shipped with every InsForge project to store embeddings and run semantic search, recommendations, and RAG queries in Postgres. #### Authentication - [Authentication](https://docs.insforge.dev/core-concepts/authentication/overview.md): Authenticate and authorize users in InsForge with email, magic links, one-time codes, OAuth, OIDC providers, and JWT-based sessions. #### Storage - [Storage](https://docs.insforge.dev/core-concepts/storage/overview.md): Store and serve images, video, PDFs, and other binary files in an S3-compatible bucket with signed URLs and Row Level Security on every InsForge project. - [S3-compatible gateway](https://docs.insforge.dev/core-concepts/storage/s3-compatibility.md): Use any AWS SigV4 client — aws CLI, rclone, boto3, Terraform — against InsForge Storage through the S3-compatible gateway at /storage/v1/s3. #### Realtime - [Realtime](https://docs.insforge.dev/core-concepts/realtime/overview.md): Push database changes, broadcasts, and presence updates to clients over WebSocket channels, with optional webhook fan-out and Row Level Security checks. #### Edge Functions - [Edge Functions](https://docs.insforge.dev/core-concepts/functions/overview.md): Deploy Deno-powered serverless TypeScript edge functions with HTTP invocation, cron schedules, database triggers, secrets, and environment variables. - [Schedules: cron-triggered functions](https://docs.insforge.dev/core-concepts/functions/schedules.md): Trigger InsForge edge functions on a cron schedule with pg_cron: secret-aware headers, encrypted keys, job logs, retry guidance, and keep-alive tips. #### Model Gateway - [Model Gateway](https://docs.insforge.dev/core-concepts/ai/overview.md): Call any LLM through one OpenAI-compatible endpoint, with InsForge-managed provider keys, OpenRouter routing, and per-project usage tracking and quotas. #### Sites - [Sites](https://docs.insforge.dev/core-concepts/sites/overview.md): Deploy the frontend of your InsForge project to Vercel from the CLI or dashboard, with tracked URLs, environment variables, domains, and deployment history. #### Messaging - [Messaging overview](https://docs.insforge.dev/core-concepts/messaging/overview.md): Send transactional emails from your InsForge project with the managed sender or custom SMTP. SMS and push are on the roadmap for the same API. - [Custom SMTP](https://docs.insforge.dev/core-concepts/messaging/custom-smtp.md): Configure your own SMTP server to deliver auth and transactional emails from InsForge, including verification, magic links, and password resets. #### Payments - [Payments](https://docs.insforge.dev/core-concepts/payments/overview.md): Collect money in your app with your own Stripe or Razorpay account. Pick the provider-specific InsForge Payments integration for checkout and subscriptions. - [Stripe Payments](https://docs.insforge.dev/core-concepts/payments/stripe.md): Integrate Stripe Checkout, Billing Portal, Products, Prices, Subscriptions, and verified webhook fulfillment with InsForge Payments and mirrored tables. - [Razorpay Payments](https://docs.insforge.dev/core-concepts/payments/razorpay.md): Integrate Razorpay Orders, Items, Plans, and Subscriptions with InsForge: server-side signature verification, mirrored tables, and webhook fulfillment. #### Custom Compute - [Custom Compute](https://docs.insforge.dev/core-concepts/compute/overview.md): Run long-lived containers next to your InsForge project for queue workers, AI inference loops, websocket servers, background jobs, and scrapers. #### Analytics - [Analytics](https://docs.insforge.dev/core-concepts/analytics/overview.md): Wire PostHog to your InsForge project to see traffic, retention, and session replay dashboards for your app without leaving the InsForge dashboard. #### Web Scraper - [Web Scraper overview: Apify integration for InsForge](https://docs.insforge.dev/core-concepts/webscraper/overview.md): Connect Apify to InsForge to let your coding agent run scrapers on demand, manage actors and runs, and land scraped datasets in your app. ### Integrations - [Auth Integrations](https://docs.insforge.dev/integrations/overview.md): Bring your own auth provider — Kinde, WorkOS, and more — sign a JWT with your InsForge secret, and let PostgREST and Row Level Security scope every request. - [Clerk Authentication](https://docs.insforge.dev/integrations/clerk.md): Add Clerk drop-in auth and user management to your InsForge app. Configure JWT verification, RLS policies, and synced user records in minutes. - [Auth0 Authentication](https://docs.insforge.dev/integrations/auth0.md): Add Auth0 enterprise authentication and SSO to your InsForge backend. Step-by-step setup for JWT validation, RLS policies, and user sync. - [WorkOS SSO and Directory Sync](https://docs.insforge.dev/integrations/workos.md): Add WorkOS enterprise SSO, AuthKit login, SCIM provisioning, and directory sync to your InsForge backend with a step-by-step JWT and Row Level Security setup. - [Kinde Authentication](https://docs.insforge.dev/integrations/kinde.md): Connect Kinde authentication to your InsForge backend with server-signed JWTs, Row Level Security, and user provisioning for social, MFA, and SSO logins. - [Stytch Passwordless Auth](https://docs.insforge.dev/integrations/stytch.md): Add Stytch passwordless authentication to your InsForge app. JWT verification, RLS policies, and user records via the InsForge SDK. - [Better Auth Self-Hosted Auth](https://docs.insforge.dev/integrations/better-auth.md): Run Better Auth in your own Postgres alongside InsForge. Same-origin sessions, HS256 bridge JWT, and Row Level Security in one app. ### Agent-Native Initiatives - [Agent-Native Initiatives](https://docs.insforge.dev/agent-native/overview.md): Explore the primitives — CLI harness, config as code, branching, and diagnostics — that let a coding agent operate your InsForge backend without a dashboard. - [VS Code extension](https://docs.insforge.dev/agent-native/vscode-extension.md): Sign in to InsForge from VS Code, pick an org and project, and install the InsForge MCP server into your AI coding assistant with one click. - [CLI harness](https://docs.insforge.dev/agent-native/cli-harness.md): The @insforge/cli is the agent's hands: one terminal interface with JSON output for schema, config, deploys, and diagnostics across your InsForge project. - [Diagnostics & advisor](https://docs.insforge.dev/agent-native/diagnostics.md): Use insforge diagnose so the agent can read backend health, advisor findings, RLS warnings, and error logs, then apply the fix without a dashboard. - [Config as code](https://docs.insforge.dev/agent-native/config-as-code.md): Manage InsForge auth, SMTP, storage, and deployment settings from a single insforge.toml using the CLI's plan, apply, and export workflow. - [Backend branching](https://docs.insforge.dev/agent-native/branching.md): Spin up an isolated child project with its own Postgres, auth, storage, and functions to test schema and config changes, then merge or reset safely. ### Referral Program - [Referral program: invite customers and earn credits](https://docs.insforge.dev/referral-program.md): Share your InsForge referral link to invite new customers, earn billing credits on their payments, and apply accumulated credits to future invoices. ### Partnership - [Partner Integration](https://docs.insforge.dev/partnership.md): Integrate InsForge as a co-branded or white-label partner platform with one-click connections, project lifecycle APIs, and dashboard embedding. - [OAuth Server](https://docs.insforge.dev/oauth-server.md): Use InsForge as an OAuth 2.0 identity provider with PKCE so third-party apps, MCP tools, and CLI clients can sign in users against your project. ### Self-Hosting - [VPS deployment and security guide](https://docs.insforge.dev/deployment/deployment-security-guide.md): Deploy InsForge on a generic Linux VPS, harden it with firewall, SSH, and TLS best practices, and maintain it with safe updates and rollbacks. - [Self-hosted storage backends](https://docs.insforge.dev/deployment/self-host-storage.md): Configure InsForge Storage for self-hosting: bring your own S3-compatible store, run a bundled MinIO or RustFS, and enable the S3-compatible gateway. - [Self-Host InsForge on AWS EC2](https://docs.insforge.dev/deployment/deploy-to-aws-ec2.md): Step-by-step guide to self-host the InsForge platform on an AWS EC2 instance using Docker Compose, including SSH setup, domain config, and TLS termination. - [Self-Host InsForge on Azure Virtual Machines](https://docs.insforge.dev/deployment/deploy-to-azure-virtual-machines.md): Self-host the InsForge platform on an Azure Virtual Machine using Docker Compose, covering SSH access, custom domains, HTTPS, and production hardening. - [Self-Host InsForge on Containarium](https://docs.insforge.dev/deployment/deploy-to-containarium.md): Self-host the InsForge platform on a Containarium LXC host with per-tenant containers, ZFS snapshots, and MCP-driven provisioning for agent-native deployments. - [Self-Host InsForge on Coolify](https://docs.insforge.dev/deployment/deploy-to-coolify.md): Self-host InsForge on Coolify as a Docker Compose resource, with the Postgres image built from the repo so its config always matches the release. - [Self-Host InsForge on Dokploy](https://docs.insforge.dev/deployment/deploy-to-dokploy.md): Self-host InsForge on Dokploy as a Compose application, with the Postgres image built from the repo so its config always matches the release. - [Self-Host InsForge on Google Cloud Compute Engine](https://docs.insforge.dev/deployment/deploy-to-google-cloud-compute-engine.md): Self-host the InsForge platform on a Google Cloud Compute Engine VM with Docker Compose, covering firewall rules, SSH access, custom domains, and HTTPS setup. - [Self-Host InsForge on Hetzner Cloud](https://docs.insforge.dev/deployment/deploy-to-hetzner.md): Step-by-step guide to self-host the InsForge platform on a Hetzner Cloud VPS using Docker Compose, including firewall setup, domain config, and TLS termination. ### Resources - [Alternatives](https://docs.insforge.dev/alternatives.md): Compare InsForge with Supabase and Firebase across Postgres, auth, storage, functions, MCP, and agent-native CLI workflows for coding agents. - [Pricing FAQ](https://docs.insforge.dev/pricing.md): InsForge free and paid plan limits, what's included, how usage-based billing and overages work, and how to check current usage and reset dates. - [Showcase](https://docs.insforge.dev/showcase.md): Explore production apps built on InsForge, from AI-powered SaaS to social platforms, showing real uses of the database, auth, storage, and functions. ### FAQ - [InsForge FAQ: databases, schemas, edge functions, and SDK](https://docs.insforge.dev/faq.md): Answers to common InsForge questions on database calls, edge functions, custom compute, querying non-public schemas from the SDK, and RLS. ## SDK & Examples ### TypeScript - [TypeScript and JavaScript SDK for InsForge](https://docs.insforge.dev/sdks/typescript/overview.md): Install and initialize the official InsForge TypeScript SDK in Node, browsers, and edge runtimes to use auth, database, storage, and realtime. - [Database SDK Reference](https://docs.insforge.dev/sdks/typescript/database.md): Run type-safe Postgres queries, inserts, updates, and deletes from browser or Node.js apps with the InsForge TypeScript SDK and Row Level Security. - [Authentication SDK Reference](https://docs.insforge.dev/sdks/typescript/auth.md): Sign up, sign in, manage sessions, and update user profiles from web and Node.js apps with the InsForge TypeScript SDK auth client and JWT tokens. - [Storage SDK Reference](https://docs.insforge.dev/sdks/typescript/storage.md): Upload, download, list, and delete files in S3-compatible InsForge buckets from browser or Node.js apps with the InsForge TypeScript SDK storage client. - [Functions SDK Reference](https://docs.insforge.dev/sdks/typescript/functions.md): Invoke InsForge serverless edge functions by slug from browser or Node.js apps with the InsForge TypeScript SDK, passing typed request and response payloads. - [Model Gateway](https://docs.insforge.dev/sdks/typescript/ai.md): Build AI features in TypeScript with the OpenAI SDK and the OpenRouter API key provisioned by the InsForge Model Gateway for chat, streaming, and embeddings. - [TypeScript realtime SDK reference](https://docs.insforge.dev/sdks/typescript/realtime.md): Subscribe to channels, publish events, track presence, and handle reconnects and token refreshes over Socket.IO with the InsForge TypeScript SDK. - [Email SDK Reference](https://docs.insforge.dev/sdks/typescript/email.md): Send transactional HTML emails to one or many recipients with the InsForge TypeScript SDK, including CC, BCC, reply-to, and Custom SMTP support. #### Payments - [Payments](https://docs.insforge.dev/sdks/typescript/payments.md): Choose between the Stripe or Razorpay payments helpers exposed by the InsForge TypeScript SDK for hosted checkout, subscriptions, and billing flows. - [Stripe Payments SDK](https://docs.insforge.dev/sdks/typescript/payments-stripe.md): Create Stripe Checkout sessions, open the Billing Portal, and manage subscriptions from your TypeScript frontend with the InsForge SDK payments.stripe helpers. - [Razorpay Payments SDK](https://docs.insforge.dev/sdks/typescript/payments-razorpay.md): Create Razorpay Orders, verify signatures, and manage Subscriptions from your TypeScript frontend with the InsForge SDK payments.razorpay helpers. #### Framework Guides - [Next.js](https://docs.insforge.dev/examples/framework-guides/nextjs.md): Create an InsForge project and build a full-stack Next.js app with the CLI and MCP, using AI editors like Cursor for schemas, queries, and deploys. - [React](https://docs.insforge.dev/examples/framework-guides/react.md): Create an InsForge project and build a full-stack React app with the CLI and MCP, using AI editors like Cursor for schemas, queries, and deploys. - [Vue](https://docs.insforge.dev/examples/framework-guides/vue.md): Create an InsForge project and build a full-stack Vue app with the CLI and MCP, using AI editors like Cursor for schemas, queries, and deploys. - [Nuxt](https://docs.insforge.dev/examples/framework-guides/nuxt.md): Create an InsForge project and build a full-stack Nuxt app with the CLI and MCP, using AI editors like Cursor for schemas, queries, and deploys. - [Svelte](https://docs.insforge.dev/examples/framework-guides/svelte.md): Create an InsForge project and build a full-stack Svelte app with the CLI and MCP, using AI editors like Cursor for schemas, queries, and deploys. ### Swift - [Swift SDK for iOS, macOS, tvOS, watchOS](https://docs.insforge.dev/sdks/swift/overview.md): Install and initialize the official InsForge Swift SDK via Swift Package Manager to use auth, database, storage, and realtime across Apple platforms. - [Database SDK Reference](https://docs.insforge.dev/sdks/swift/database.md): Run type-safe Postgres queries, inserts, updates, and deletes from iOS and macOS apps with the InsForge Swift SDK using Codable models and JWT auth. - [Swift authentication SDK reference](https://docs.insforge.dev/sdks/swift/auth.md): Sign up, sign in, verify email, manage sessions, and configure OAuth URL schemes for iOS, macOS, tvOS, and watchOS with the InsForge Swift SDK. - [Storage SDK Reference](https://docs.insforge.dev/sdks/swift/storage.md): Upload, download, list, and delete files in S3-compatible InsForge buckets from iOS and macOS apps with the InsForge Swift SDK storage client. - [Functions SDK Reference](https://docs.insforge.dev/sdks/swift/functions.md): Invoke InsForge serverless edge functions from iOS and macOS apps with the InsForge Swift SDK, passing typed request bodies and decoding JSON responses. - [Model Gateway](https://docs.insforge.dev/sdks/swift/ai.md): Call chat, streaming, and embedding models from Swift with the OpenRouter API key provisioned by the InsForge Model Gateway, from trusted server code. - [Swift realtime SDK reference](https://docs.insforge.dev/sdks/swift/realtime.md): Connect over Socket.IO, subscribe to channels, publish events, track presence, and handle reconnects with the InsForge Swift realtime client on Apple. ### Kotlin - [Kotlin SDK for Android and Multiplatform](https://docs.insforge.dev/sdks/kotlin/overview.md): Install and initialize the official InsForge Kotlin SDK to access auth, database, storage, and realtime from Android and Kotlin Multiplatform apps. - [Kotlin database SDK reference](https://docs.insforge.dev/sdks/kotlin/database.md): Type-safe insert, update, delete, select, and rpcRaw operations against InsForge tables using the Kotlin SDK with Kotlinx Serialization data classes. - [Authentication SDK Reference](https://docs.insforge.dev/sdks/kotlin/auth.md): Sign up, sign in, manage sessions, and update user profiles from Android and JVM apps with the InsForge Kotlin SDK auth client and JWT tokens. - [Storage SDK Reference](https://docs.insforge.dev/sdks/kotlin/storage.md): Upload, download, list, and delete files in S3-compatible buckets from Android and JVM apps with the InsForge Kotlin SDK storage client. - [Functions SDK Reference](https://docs.insforge.dev/sdks/kotlin/functions.md): Invoke InsForge edge functions from Kotlin apps by slug, pass typed JSON bodies, and read typed responses using the InsForge Kotlin SDK client. - [Model Gateway](https://docs.insforge.dev/sdks/kotlin/ai.md): Call chat, streaming, and embedding models from Kotlin with the OpenRouter API key provisioned by the InsForge Model Gateway, from trusted server code. - [Kotlin realtime SDK reference](https://docs.insforge.dev/sdks/kotlin/realtime.md): Connect over Socket.IO, subscribe to channels, publish events, track presence, and handle reconnects with the InsForge Kotlin realtime client. ### REST API - [InsForge REST API overview](https://docs.insforge.dev/sdks/rest/overview.md): Call InsForge auth, database, storage, and functions directly over HTTP with any language, using API keys, JWTs, and standard REST conventions. - [Database API Reference](https://docs.insforge.dev/sdks/rest/database.md): Query, insert, update, and delete rows in your InsForge Postgres tables over HTTP using PostgREST-style operations with JWT tokens and Row Level Security. - [Authentication API Reference](https://docs.insforge.dev/sdks/rest/auth.md): REST endpoints for user sign-up, password and email OTP sign-in, email verification, password reset, OAuth, and session management. - [Storage API Reference](https://docs.insforge.dev/sdks/rest/storage.md): Upload, download, list, and manage files in InsForge storage buckets over the REST API, backed by local disk or S3-compatible object storage. - [Functions API Reference](https://docs.insforge.dev/sdks/rest/functions.md): Invoke and manage serverless edge functions over HTTP with the InsForge REST API, running on Deno Subhosting in the cloud or locally in Docker. - [AI REST Reference](https://docs.insforge.dev/sdks/rest/ai.md): Call OpenRouter over HTTP with the key provisioned by InsForge, plus reference the legacy Model Gateway proxy endpoints for chat, images, and embeddings. - [Realtime API Reference](https://docs.insforge.dev/sdks/rest/realtime.md): Manage InsForge realtime channels, inspect message history, tune retention, and publish or subscribe with the raw Socket.IO surface over the REST API. ### Examples - [InsForge cookbook and framework examples](https://docs.insforge.dev/examples/overview.md): Browse InsForge examples for Next.js, React, Vue, Nuxt, and Svelte, plus AI prompts, setup guides, and community projects to build full-stack apps. ## OpenAPI Specs - [tables](https://raw.githubusercontent.com/InsForge/InsForge/main/openapi/tables.yaml) - [schedules](https://raw.githubusercontent.com/InsForge/InsForge/main/openapi/schedules.yaml) - [auth](https://raw.githubusercontent.com/InsForge/InsForge/main/openapi/auth.yaml) - [records](https://raw.githubusercontent.com/InsForge/InsForge/main/openapi/records.yaml) - [storage](https://raw.githubusercontent.com/InsForge/InsForge/main/openapi/storage.yaml) - [ai](https://raw.githubusercontent.com/InsForge/InsForge/main/openapi/ai.yaml) - [functions](https://raw.githubusercontent.com/InsForge/InsForge/main/openapi/functions.yaml) - [realtime](https://raw.githubusercontent.com/InsForge/InsForge/main/openapi/realtime.yaml) - [email](https://raw.githubusercontent.com/InsForge/InsForge/main/openapi/email.yaml) - [payments](https://raw.githubusercontent.com/InsForge/InsForge/main/openapi/payments.yaml) - [secrets](https://raw.githubusercontent.com/InsForge/InsForge/main/openapi/secrets.yaml) - [logs](https://raw.githubusercontent.com/InsForge/InsForge/main/openapi/logs.yaml) - [usage](https://raw.githubusercontent.com/InsForge/InsForge/main/openapi/usage.yaml) - [metadata](https://raw.githubusercontent.com/InsForge/InsForge/main/openapi/metadata.yaml) - [health](https://raw.githubusercontent.com/InsForge/InsForge/main/openapi/health.yaml) - [deployments](https://raw.githubusercontent.com/InsForge/InsForge/main/openapi/deployments.yaml) - [dashboard](https://raw.githubusercontent.com/InsForge/InsForge/main/openapi/dashboard.yaml) ## Optional - [Community](https://discord.gg/MPxwj5xVvW) - [Blog](https://insforge.dev/blog) - [Roadmap](https://feedback.insforge.dev/roadmap) - [GitHub](https://github.com/InsForge/InsForge) > The links below point to documentation indexes. Follow each `/_llms/` index recursively until you reach documentation pages. ## Indexes - [English / API Reference (213 pages)](https://docs.insforge.dev/_llms/en/api-reference.md): Documentation for English / API Reference. - [Chinese (303 pages)](https://docs.insforge.dev/_llms/zh.md): Documentation for Chinese. - [Chinese / API 参考 (213 pages)](https://docs.insforge.dev/_llms/zh/api.md): Documentation for Chinese / API 参考. - [Traditional Chinese (303 pages)](https://docs.insforge.dev/_llms/zh-hant.md): Documentation for Traditional Chinese. - [Traditional Chinese / API 參考 (213 pages)](https://docs.insforge.dev/_llms/zh-hant/api.md): Documentation for Traditional Chinese / API 參考. - [Spanish (303 pages)](https://docs.insforge.dev/_llms/es.md): Documentation for Spanish. - [Spanish / Referencia de API (213 pages)](https://docs.insforge.dev/_llms/es/referencia-de-api.md): Documentation for Spanish / Referencia de API.