Docs / Search / LingCode Cloud
πŸ“˜ Reference ● Start here Updated 2026-06-11

LingCode Cloud

TL;DR: LingCode Cloud is a managed backend for the apps you build in LingCode β€” a private Postgres database with auth, file storage, realtime, vector search, a secrets vault, serverless functions, and full-stack app hosting. You reach it through one zero-dependency SDK (Supabase/Firebase-shaped) or over REST. Provision a backend, point the SDK at its URL + anon key, and call from('table').select(). No server to run, no keys in the browser.

This is the home for everything LingCode Cloud. If you've used Firebase or Supabase the model will feel familiar: a database you reach over HTTPS, auth and storage that come with it, and somewhere to run the bit of server logic that can't live in the browser. The pages below go product-by-product; start with the five-minute walkthrough here, then dive into whichever piece you need.

What's in the box

Every backend is provisioned with the full set β€” there's nothing to install or turn on per feature:

One mental model to hold

The client SDK talks to a data gateway, not to Postgres directly. The gateway does single-table CRUD plus batch insert and upsert; for a genuinely relational read (JOINs, aggregates, full-text ranking) you define a SQL function in a migration and call it with rpc() β€” the SQL stays server-side, RLS enforced. That split β€” CRUD/upsert/rpc over the wire, schema and SQL in migrations β€” is how the anon key ships safely in your browser bundle. Keep it in mind and most surprises disappear.

What LingCode Cloud does not host

It's an edge/serverless platform, not a general-purpose server host β€” so "it hosts everything" is the wrong mental model. Full-stack apps run as Cloudflare V8 isolates, not Node.js, which rules out: a long-running Node process, a persistent WebSocket server, background queues/workers, any single request over ~30s, and non-JS backends (Python/Django, Rails, Go). A plain Express/next start server won't run as-is β€” port it to a Worker-targeting framework (Hono, TanStack Start, or an OpenNext adapter). Work that doesn't fit (scrapers, long ingest pipelines, minutes-long jobs) runs on a server you operate and writes into the managed backend over the gateway. Everything else β€” static sites, SSR apps, data, auth, storage, short functions and cron β€” runs here.

Getting started in five minutes

The fastest path is from inside LingCode β€” the /try playground and the Mac IDE both provision a backend for you and pre-inject the client as window.lingcode. Here's the whole loop, including how to wire it into your own app.

Provision a backend

In the Mac IDE or /try, ask the agent to add a backend (or use Connect a managed backend). It calls provision_backend and hands you a data URL (https://lingcode.dev/api/cloud/be/<backend-id>) and a public anon key. You can also manage backends at lingcode.dev/backends. See Connect a managed backend.

Create your schema

Tables come from migrations, not runtime calls. Run SQL from the console's SQL tab, or let the agent call apply_migration:

create table todos (
  id         bigint generated always as identity primary key,
  user_id    uuid,
  title      text not null,
  done       boolean not null default false,
  created_at timestamptz not null default now()
);

This is also where indexes, views, constraints, and row-level-security policies live. See Manage database migrations.

Connect the SDK

Load the one-file SDK and create a client with your two values. Inside /try and the Mac preview, skip this β€” window.lingcode already exists.

<script src="https://lingcode.dev/sdk/lingcode-v1.js"></script>
<script>
  const lingcode = LingCode.createClient(
    'https://lingcode.dev/api/cloud/be/<your-backend-id>',
    '<your-anon-key>'
  );
  await lingcode.ready; // settles any sign-in redirect first
</script>

Read and write

Every call returns { data, error }. Filters chain before the verb; update/delete require one.

await lingcode.from('todos').insert({ title: 'Buy milk' });

const { data, error } = await lingcode
  .from('todos')
  .eq('done', false)
  .order('created_at', { ascending: false })
  .limit(50)
  .select();

Add auth, storage, realtime

Same client, more surface β€” each has its own guide:

await lingcode.auth.signUp({ email, password });
await lingcode.storage.from('public').upload('avatars/me.png', file);
const off = lingcode.from('todos').subscribe(({ type, row }) => render(type, row));
The anon key is public by design. It belongs in your client bundle β€” RLS on the server, not key secrecy, is what protects data. Your private keys (Stripe secret, third-party API keys) go in the backend's Secrets vault and are read only from functions, which run server-side.

Browse the guides

Each page follows the same shape: what the product is and why, a step-by-step guide, and runnable samples grounded in the real SDK and endpoints.

Identity

Authentication

Email/password, magic links, OTP, Google/GitHub/Apple OAuth, TOTP MFA, and the access-token model.

Data

Database

Tables, the chainable query builder, filter operators, migrations, RLS, and the no-JOIN/upsert rule.

Files

Storage

Public vs private buckets, inline uploads, and direct-to-storage presigned PUTs for GB-scale files.

Compute

Functions

Seven zero-deploy builtins plus custom Deno-sandboxed functions β€” limits, secrets, and how to invoke.

Deploy

App hosting

Ship static frontends and full-stack Worker/SSR apps to *.run.lingcode.dev with custom domains.

Live

Realtime

Subscribe to INSERT/UPDATE/DELETE over SSE, RLS-filtered so users only see their own rows.

AI

Vector search

pgvector similarity, managed embeddings, and hybrid full-text + semantic ranking for RAG.

Security

Secrets vault

AES-256-GCM encrypted vendor keys, set in the console and read server-side from functions.

Engage

Push notifications

Web Push (VAPID) plus native iOS (APNs) and Android (FCM) β€” subscribe a user and send from your server or a function.

Measure

Analytics

First-party events, screens, traces, and error reporting β€” tied to a user id, stored in your backend.

Control

Remote config

Feature flags, tunable values, and A/B experiment variants β€” change behavior without a redeploy.

Security

Security & RLS

Why the anon key is safe, and copy-paste row-level-security policies so users only see their own rows.

Production

Best practices

Data modeling, pagination, indexing, the security checklist, and quotas β€” what to get right before you ship.

Reference

Troubleshooting

Every error code β€” what it means and the one-line fix β€” grouped by product.

Reference

API reference

The full SDK surface and every /api/cloud/be/<id>/… REST endpoint, with shapes.