Loading...
Loading...
Build applications with InsForge Backend-as-a-Service. Use when developers need to: (1) Set up backend infrastructure (create tables, storage buckets, deploy functions, configure auth/AI) (2) Integrate InsForge SDK into frontend applications (database CRUD, auth flows, file uploads, AI operations, real-time messaging) (3) Deploy frontend applications to InsForge hosting IMPORTANT: Before any backend work, you MUST have the user's Project URL and API Key. If not provided, ask the user first. Key distinction: Backend configuration uses HTTP API calls to the InsForge project URL. Client integration uses the @insforge/sdk in application code.
npx skill4agent add insforge/agent-skills insforgeget-backend-metadataget-anon-keyExample: User says "deploy to insforge"
✓ Try: get-backend-metadata via MCP
✓ If success: Extract project URL from metadata, get anon key via get-anon-key
✗ If fail: Ask user for credentials| Credential | Format | Required For |
|---|---|---|
| Project URL | | All API calls |
| API Key | | Authorization header |
Do you have an InsForge project? I'll need:
1. Project URL (e.g., https://abc123.us-east-1.insforge.app)
2. API Key (starts with ik_)
You can find these in InsForge Dashboard → Project Settings.sdk-integration.md@insforge/sdkbackend-configuration.mdpostsGET /api/metadata
Authorization: Bearer {admin-token-or-api-key}npm install @insforge/sdk@latestimport { createClient } from '@insforge/sdk'
const insforge = createClient({
baseUrl: 'https://your-project.region.insforge.app',
anonKey: 'your-anon-key'
})| Module | SDK Integration | Backend Configuration |
|---|---|---|
| Database | database/sdk-integration.md | database/backend-configuration.md |
| Auth | auth/sdk-integration.md | auth/backend-configuration.md |
| Storage | storage/sdk-integration.md | storage/backend-configuration.md |
| Functions | functions/sdk-integration.md | functions/backend-configuration.md |
| AI | ai/sdk-integration.md | ai/backend-configuration.md |
| Real-time | realtime/sdk-integration.md | realtime/backend-configuration.md |
| Schedules | — | schedules/backend-configuration.md |
| Deployments | — | deployments/workflow.md |
| Logs | — | logs/debugging.md |
| Module | sdk-integration.md | backend-configuration.md |
|---|---|---|
| Database | CRUD operations, filters, pagination | Create tables, RLS policies, triggers, indexes. See also database/postgres-rls.md for RLS best practices |
| Auth | Sign up/in, OAuth, sessions, profiles | Auth config, user management, anon tokens |
| Storage | Upload, download, delete files | Create/manage buckets |
| Functions | Invoke functions | Deploy, update, delete functions |
| AI | Chat, images, embeddings | Models, credits, usage stats |
| Real-time | Connect, subscribe, publish events | Channel patterns, database triggers |
| Schedules | — | Cron jobs, HTTP triggers, execution logs |
| Deployments | — | Deploy frontend apps |
| Logs | — | Fetch container logs for debugging |
| Guide | When to Use |
|---|---|
| database/postgres-rls.md | Writing or reviewing RLS policies — covers infinite recursion prevention, |
{ data, error }| Module | Methods |
|---|---|
| |
| |
| |
| |
| |
| |
https://your-project.region.insforge.appAuthorization: Bearer {admin-token-or-api-key}| Task | Endpoint |
|---|---|
| Execute SQL | |
| Create bucket | |
| Deploy function | |
| Configure auth | |
| Get metadata | |
| Create schedule | |
| Deploy frontend | |
| Get logs | |
# 1. Install dependencies
npm install
# 2. Set up environment variables for your framework
cp .env.example .env.local # or create .env.production
# 3. Run production build
npm run build| Issue | Common Cause | General Solution |
|---|---|---|
| Missing environment variables | Build-time env vars not set | Create |
| Module resolution errors | Edge functions mixed with app code | Exclude edge function directories from TypeScript/compiler config |
| Static export conflicts | Dynamic routes with static export | Use server-side rendering or configure static params |
| Missing dependencies | Incomplete node_modules | Run |
VITE_*NEXT_PUBLIC_*REACT_APP_*PUBLIC_*functions/npm run buildinsert([{...}])insert({...})urlkey/functions/{slug}/api