Developer Hub — Live
6 Edge Functions · 11 DB Tables · JWT Auth

Build on Future.
Real integrations, real docs.

Future AI exposes its backend through Supabase Edge Functions — standard HTTPS endpoints, JWT auth, and a PostgreSQL data layer. This page documents only what actually exists. Every endpoint, field, and rate limit shown here is live in production.

6

Edge Functions

11

Database Tables

JWT

Auth Method

4

Public Tables

Developer Capabilities

What you can do right now, and what's coming.

Each capability is labelled by its current implementation status. No ambiguity.

Available now

Edge Function API

6 HTTPS endpoints (Supabase Deno Edge Functions). Call them from any HTTP client with a valid JWT. No SDK required — standard fetch() works.

Available now

JWT Authentication

All endpoints require a Supabase JWT. Obtain via email/password or OAuth (Google, Apple). 2FA-protected accounts require a TOTP code at login.

Available now

Database Access (RLS)

Query Supabase tables directly via the JS client or REST. 4 tables are publicly readable without auth; 7 are scoped to the authenticated user via RLS.

Available now

Open Data (Public)

knowledge_base and shared_knowledge tables are fully public. No auth required. Anonymised AI patterns and reviewed platform facts — read by anyone.

Planned

Persistent API Keys

Long-lived tokens not tied to a browser session. Unlocked via the api_access Feature Vault item (3,000 coins). Key issuance layer is in development.

Conceptual

Webhooks / Event Hooks

Event-based callbacks for unlock events, coin awards, and account deletions. Not yet designed. Would require a webhook delivery infrastructure.

Endpoint Reference

6 live endpoints. Click to expand.

All endpoints are Supabase Edge Functions. Base URL: {SUPABASE_URL}/functions/v1/

6 / 6 livePOST onlyJSON body

Send a message to the AI. Tracks word count, awards Gold Coins, and persists messages when conversationId is provided.

Standalone web search via Perplexity. Returns a synthesised answer with citations. Does not interact with the coin system or conversation history.

Unlock a Feature Vault item by spending Gold Coins. Atomic — coin deduction and unlock record are consistent. Auto-refunds coins if the unlock record fails.

Credit a coin package to the authenticated user. Coin amounts are authoritative server-side. Uses atomic upsert to prevent double-crediting.

Wipe all user-generated data and reset coin balance to zero. Account remains active. Creates a GDPR deletion_requests audit record.

Permanently delete the authenticated user account and all data. Irreversible. Performs explicit table wipes before auth deletion to handle tables without CASCADE. Creates GDPR audit record first.

Data Layer

11 PostgreSQL tables with RLS.

Access via the Supabase JS client or direct PostgREST API. RLS is enforced at the database level.

Public readNo auth required
Own rowsJWT required
TableAccessDescription
knowledge_basePublic readUser-sourced Q&A pairs with upvote scores. Updated after each chat.
shared_knowledgePublic (reviewed)AI-extracted platform facts. Only reviewed=true AND is_active=true rows visible.
community_postsPublic readFeature requests and bug reports from authenticated users.
community_votesPublic readVote records linking users to community posts.
profilesOwn rowname, bio, avatar_type, learning_pref, onboarding_completed.
user_coinsOwn rowbalance, total_earned, total_spent, words_written, words_to_next_coin.
conversationsOwn rowsConversation metadata. Messages stored in a separate FK table.
messagesOwn rowsIndividual chat messages: role, content, word_count.
unlocked_featuresOwn rowsOne row per unlocked Feature Vault item per user.
coin_transactionsOwn rowsEarn / spend / purchase / refund audit trail.
deletion_requestsOwn rowsGDPR audit log. Created by delete-user-data and delete-user-account.
// Public table — no JWT needed
const { data } = await supabase
  .from("knowledge_base")
  .select("question, answer, upvotes, topic")
  .order("upvotes", { ascending: false })
  .limit(20);

// Private table — JWT required (own rows only via RLS)
const { data: coins } = await supabase
  .from("user_coins")
  .select("balance, total_earned, words_to_next_coin")
  .maybeSingle();

Integration Use Cases

Concrete scenarios grounded in the actual platform.

Every scenario listed here is achievable today with the existing API surface.

Available now

Internal analytics dashboard

Query user_coins, coin_transactions, and unlocked_features with a service-role key to build a usage view for your team. All table schemas are stable.

Available now

Automated chat workflows

Drive the /chat endpoint with a service account JWT for Q&A pipelines, onboarding automation, or retrieval-augmented generation scenarios.

Available now

Consume the public knowledge base

Pull knowledge_base and shared_knowledge without any auth. Build a semantic search index, training dataset, or context layer for downstream models.

Available now

Feature request aggregator

Read community_posts and community_votes to build a roadmap view, Slack integration, or automated triage pipeline.

Available now

Standalone web search

Invoke /web-search as a Perplexity-backed research API without managing a Perplexity key yourself. Answers include cited source URLs.

Available now

Coin balance integrations

Read coin balances and transaction history to drive external gamification, progress notifications, or reward dashboards.

Implementation Status

What's live. What's not. No ambiguity.

This table is the authoritative source of truth for what is and isn't available in the current platform.

Feature / CapabilityStatusNotes
6 Edge Function endpointsAvailable nowCallable via HTTPS with JWT. Stable schema.
JWT authentication (email/OAuth)Available nowGoogle and Apple OAuth via PKCE. 2FA optional.
Supabase DB — public tablesAvailable nowknowledge_base, shared_knowledge, community tables.
Supabase DB — private tablesAvailable nowRLS enforced. Own-row access only via JWT.
Open Data JSON datasetAvailable nowDownloadable at /open-data. Cryptographically signed.
Rate limiting (chat)Available now3s min between messages, server-side enforced.
Coin economy API (spend/purchase)Available nowAtomic RPCs, guaranteed consistent balance.
GDPR delete endpointsAvailable nowdelete-user-data and delete-user-account functions.
Persistent API keysPlannedapi_access vault item (3,000 coins) reserves eligibility.
API key management UIPlannedCreate, rotate, revoke keys. Follows key issuance.
Usage metering per keyPlannedRequest counts and coin spend tracked per key.
Webhook / event deliveryConceptualNot yet designed. No timeline.
Public REST API (no Supabase)Coming laterPossible as a thin gateway layer over Edge Functions.
SDK or client libraryConceptualNo SDK exists or is planned. Use fetch() directly.

Feature IDs (for spend-coins)

web_search150 coins
creative_mode300 coins
deep_analysis600 coins
data_insights1,000 coins
priority1,500 coins
api_access3,000 coins
memory5,000 coins
agents8,000 coins
custom_prompts12,000 coins
fine_tuning20,000 coins
team_workspace40,000 coins
whitelabel100,000 coins

Package IDs (for purchase-coins)

starter
100 $4.99
standard
400 $17.99
pro
1,200 $49.99
power
4,500 $149.99
elite
15,000 $449.99
unlimited
60,000 $1,499.99

Quick Start

Authenticate and call your first endpoint.

Three steps: get a JWT, call an endpoint, handle the response.

1Install the Supabase client
npm install @supabase/supabase-js
2Authenticate and get a JWT
import { createClient } from "@supabase/supabase-js";

const supabase = createClient(
  "https://your-project.supabase.co",
  "your-anon-key"
);

const { data, error } = await supabase.auth.signInWithPassword({
  email: "user@example.com",
  password: "password",
});

const jwt = data.session?.access_token; // Use this in all requests
3Call the chat endpoint
const response = await fetch(
  "https://your-project.supabase.co/functions/v1/chat",
  {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
      "Authorization": `Bearer ${jwt}`,
    },
    body: JSON.stringify({
      userMessage: "What is the Feature Vault?",
    }),
  }
);

const { response: text, coinsEarned, newBalance } = await response.json();

Error Response Shape

// All errors follow this shape:
{ "error": "Human-readable message", "code"?: "MACHINE_CODE" }

// 402 Insufficient coins also includes:
{ "error": "Insufficient coins", "required": 600, "available": 300, "shortfall": 300 }

// 429 Rate limited also includes:
{ "error": "Rate limited", "retryAfterMs": 1800 }

Rate Limits (enforced in production)

/chatMinimum 3 seconds between messages per user. Server-side, via message timestamp comparison.
/chatuserMessage max 4,000 characters. Returns 400 with code: MESSAGE_TOO_LONG.
/web-searchquery max 2,000 characters. Returns 400 on overflow.
Developer Support

Questions or integration issues?

The best way to get help is the Community — open a Bug Report or Feature Request. For documentation, the Docs section covers platform workflows and user-facing features.

Future © 2026 · Developer Hub · All schemas reflect production code.

Cookie preferences

We use strictly necessary cookies to keep you signed in, and optional functional cookies for UI preferences. No analytics, no advertising, no third-party trackers.

Strictly Necessaryrequired
Functional