# Triggair > Game backend for browser games: leaderboards, cloud saves, anonymous player identity, achievements, daily rewards, remote config, deterministic RNG. One import, one publishable key. ## Start - Install: `npm i @triggair/sdk` then `const tg = createClient({ key: 'tg_pk_…' })`. - Only the `tg_pk_` publishable key goes in client code. NEVER ship a `tg_sk_` secret key. - Player-scoped calls auto-authenticate (an anonymous token is minted + silently refreshed). - Every error is a TriggairError with an `agentHint` — read it. Transient errors retry automatically. - Before deploying, add your origin to the game's allowed_origins (CORS). ## Recipes - Install & initialize - Player identity (anonymous-first) - Cloud saves - Leaderboards - Achievements & daily rewards - Analytics (durable & offline) - CORS: works locally, 403s when deployed - Recovery (cross-device) - Errors are actionable - Verify your integration ## More - Full guide: /llms-full.txt - Drop-in prompt: /dropin - Error docs: /docs/errors/ - Self-test: run the MCP tool `triggair_verify_integration` after wiring to close the loop.