Services
Services
One section per SnugNut service. Each section explains what the service is for, when to reach for it, its core concepts, and a minimal end-to-end run over HTTP and the CLI, then links into the generated API reference for every endpoint's exact contract.
Data & State
- KV Store - JSON key-value storage with TTL, tags, search, counters, and merge patching
- Blob Storage - file storage with signed URLs, quotas, and public serving
- Config - read-only cached project configuration
- Distributed State - shared state with compare-and-swap and distributed locks
- ECS - entity component system with schemas, queries, systems, and a coordinator
- I18n - localization with fallback chains, plurals, publishing, and experiments
- Live JSON - real-time collaborative JSON documents over WebSocket
- Remote Config - environment-scoped configuration with inheritance and targeting rules
- Vault - time-locked attestations with multi-signature and lottery reveal
Messaging & Realtime
- PubSub - capability-scoped publish/subscribe channels with grants and rooms
- WebSocket - how sockets work platform-wide: auth, the general socket, limits, and admin controls
- Message Queue - SQS/SNS-style topics, queues, visibility timeouts, and dead-letter redrive
- Inbox - persistent per-user notifications with read state, actions, and scheduled delivery
- Presence - who is here right now: heartbeats, activity states, capacity policies
- Comment - threaded comments with reactions and moderation on any subject
- Timeline - append-only event streams with windowed queries and aggregation
- Webhooks - signed outbound deliveries with retries and a dead-letter queue
Jobs & Workflow
- Job Queue - delayed and prioritized background jobs with retries, backoff, and a dead-letter queue
- FSM - finite state machines with guards, timeouts, and Mermaid rendering
- Chrono - regenerating resources: energy meters, cooldowns, and idle accrual
- Director - tension-curve pacing with budgeted decisions and deterministic seeds
- Consensus - reputation-weighted fact attestation with challenges and slashing
- Human-in-the-Loop - approval and input requests with deadlines, multi-approver tallies, and expiry
- Lease - exclusive time-bound access to unique resources, with waiting rooms and fencing tokens
- Arbiter - LLM-as-judge evaluation with rubrics, sessions, and experiments
Commerce & Economy
- Treasury - double-entry virtual currency with wallets, holds, and supply analytics
- Meter - usage metering with budget reservations, quotas, and billing rollups
- Cart - purchase-intent carts with real inventory reservations and checkout freeze
- Item - inventory: definitions, stacking, transfers, crafting, durability, collections
- Auction - English auctions with proxy bidding, anti-sniping, and treasury settlement
- Promo Code - hashed code batches with capped, windowed, geo-fenced redemption
- Subscription - entitlement timing: trials, grace, seats, usage caps, agent leases
- Surge Pricing - rule-driven adaptive pricing with explainable calculations
- Loyalty - referral campaigns, points ledgers, and reward catalogs
Game Mechanics
- Leaderboard - ranked scoring with windows, weighted metrics, and surrounding-rank queries
- Tournament - single/double elimination, swiss, and round-robin brackets with auto-progression
- Matchmaking - ticket queues with rule-based compatibility matching in streaming or batch pools
- Guild - player organizations with join policies, roles, and a shared treasury-backed bank
- Quest - multi-step objectives with expeditions, puzzle chains, and treasury rewards
- Achievement - rule-driven achievements across seven rule types with live progress over WebSocket
- Badge - versioned SVG badges with live state sources, signed metadata, and offline verification
- Lottery - weighted random draws with seeded determinism, unique and consumable modes
Simulation & Social
- Reputation - domain-scoped trust scores with decay and tiers, plus directed affinity edges and a nemesis ladder
- Ritual - N-party synchronized action within a simultaneity window, and dead-man switches when inverted
- Rumor - information propagating hop by hop through a graph, mutating as fidelity decays, chased by corrections
- Pact - staked agreements in four shapes (oath, bounty, market, pool) escrowed in real treasury wallets
- Biome - coupled population dynamics integrated deterministically on read, with harvests and interventions
- Seedling - deterministic generation with supply-capped series and hash-chained provenance
- Succession - what happens to a subject's assets when it dies or goes dark: plans, triggered cases, and dispositions
- Talent Trees - server-authoritative progression with tier gates, XP curves, respecs, and versioned player migration
Product & Growth
- Waiting Room - virtual waiting rooms for scarce capacity with admission strategies, sessions, and anti-gaming
- Tour - versioned product tours and server-tracked onboarding progress with branching and A/B variants
- Link - a redirect control plane and click hot path with scheduling, click caps, password gates, and conditional routing
Identity & Trust
- Auth - the platform's front door: accounts, credentials, organizations, sessions, and tenant resolution
- SCIM Provisioning - the SCIM 2.0 surface Okta and Entra drive to keep an organization in step with a corporate directory
- Alias - canonical identity resolution across fragmented external accounts, wallets, handles, and personas
- Attestation - proof that a Snug identity controls an account elsewhere, via publicly posted nonce challenges
- Moniker - a naming registry with per-namespace charset and case rules, atomic uniqueness, and confusable blocking
- Handshake - bilateral negotiation with escrowed stage-and-dual-confirm settlement over currency and items
- Term - versioned policy documents and consent tracking with a hash-chained audit log
Interactive Fiction
- Narrative Engine - scoped actor state for interactive fiction, isolated per story and session then promoted to canon
- Lore Story Engine - runs compiled Lore DSL programs as server-side sessions, emitting story events and blocking on player choice
Input & Feedback
- Forms - schema-backed intake with drafts, file uploads, and validation, without writing a backend handler
- Poll - voting with real ballot integrity: four tally strategies, one ballot per identity, and instant-runoff results
Simulation & Infrastructure
- Almanac - shared simulated time: virtual clocks, custom calendars, and a seeded weather model
- Geo - a spatial index for current positions, with radius, bounding-box, and distance queries plus geofences
- Agent Registry - identity and configuration records for AI agents, with prompts, TOML payloads, and procedure runbooks
- Liveness - heartbeat monitoring for machines, with uptime, latency trends, and fleet-wide queries
- Throttle - rate limiting you configure: named token buckets checked against your own subjects and actions
Every service above has a guide. For the exact contract of any single endpoint - parameters, schemas, status codes - see the generated API reference.