documentation

A small SDK, documented in full.

Two doors, one house: start from an idea with nothing built yet, or arrive with an app that already exists. Gemmein is the part that takes it to real customers either way. The surface is small: sign-in, data with one safety rule per collection, and Stripe payments, with no raw queries and no client-configurable security. Everything the SDK can do fits in these pages, and your AI tool already has them, because the machine-readable guide ships inside @gemmein/sdk itself.

start here

Quickstart

Key, install, then a signed-in app with stored data, in about an hour.

guide

Auth & sessions

Email codes, no passwords. Sessions, sign-out, account deletion.

guide

Data & the rules

Collections with one rule each; the server enforces who reads and writes.

guide

Contention

Unique usernames, limited stock, and last-write races. Conflicts return 409, and your code handles the retry.

guide

Payments

Subscriptions and one-off sales through Stripe. You never build a webhook. Any provider that signs its webhooks drives access the same way through a relay.

guide

Credits

A balance your customers hold and your product spends. A pack they buy, a comp you give, a call that costs one. Floor zero, no expiry.

guide

The AI route

OpenAI, Anthropic or Google through Gemmein, on your own provider key, which never reaches the browser. Each call spends the credits you set on the tool it names — one for an unnamed call.

guide

Relays

A provider's webhook, a schedule or a record change runs Gemmein's own verbs. One JSON file, no code.

guide

Mobile

The same contract from an Expo or Swift app. Email-code sign-in, private records, sealed files, credits and AI tools, and the store account token a RevenueCat purchase lands on.

guide

Reaffirm your app

Prove your boundaries in CI with live calls. The server enforces the rules, and the frontend is never the check.

guide

Errors

Every failure is a typed code with a message you can render. Branch on it.

reference

SDK reference

Every method, signature, and return shape of @gemmein/sdk.

for your agent

MCP server

Docs, explainers and a live boundary check as tools, through npx -y @gemmein/mcp.