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.
Quickstart
Key, install, then a signed-in app with stored data, in about an hour.
guideAuth & sessions
Email codes, no passwords. Sessions, sign-out, account deletion.
guideData & the rules
Collections with one rule each; the server enforces who reads and writes.
guideContention
Unique usernames, limited stock, and last-write races. Conflicts return 409, and your code handles the retry.
guidePayments
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.
guideCredits
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.
guideThe 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.
guideRelays
A provider's webhook, a schedule or a record change runs Gemmein's own verbs. One JSON file, no code.
guideMobile
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.
guideReaffirm your app
Prove your boundaries in CI with live calls. The server enforces the rules, and the frontend is never the check.
guideErrors
Every failure is a typed code with a message you can render. Branch on it.
referenceSDK reference
Every method, signature, and return shape of @gemmein/sdk.
MCP server
Docs, explainers and a live boundary check as tools, through npx -y @gemmein/mcp.