API Reference GameServer v#1.0.637
Copy MarkdownModules
GameServer keeps the contexts that define your domain and business logic.
The Accounts context.
Defines the scope of the caller to be used throughout the app.
The User schema and associated changeset functions used across the application (registration, OAuth, and admin changes).
Small helpers used to deliver transactional emails for the Accounts flow (confirmation, magic link, and email change instructions).
Functions and schema for persistent user tokens used by sessions, magic links, and email-change workflows.
Apple OAuth client secret generation for Ueberauth.
Utilities for running best-effort background work.
Application cache backed by Nebulex.
L1 cache (local, in-memory).
L2 cache (partitioned topology).
This is the cache for the primary storage.
L2 cache backed by Redis.
Context for chat messaging across lobbies, groups, and friend DMs.
Ecto schema for the chat_messages table.
Ecto schema for the chat_read_cursors table.
Reads and renders Markdown content from files/directories configured
in the theme JSON config ("changelog" and "blog" keys).
Helpers for reading and parsing environment variables.
Friends context - handles friend requests and relationships.
Ecto schema representing a friendship/request between two users.
Context module for group management: creating, updating, listing, joining, leaving, kicking, promoting/demoting members, and handling join requests.
Ecto schema for the groups table.
Ecto schema for the group_join_requests table.
Ecto schema for the group_members join table.
Behaviour for application-level hooks / callbacks.
Default no-op implementation for GameServer.Hooks
Runtime registry for dynamic RPC function names exported by hook plugins.
Builds an OTP plugin bundle from plugin source code on disk.
Loads and manages hook plugins shipped as OTP applications under modules/plugins/*.
A loaded plugin descriptor.
Generic key/value storage.
The Leaderboards context.
Ecto schema for the leaderboards table.
Ecto schema for the leaderboard_records table.
Context module for lobby management: creating, updating, listing and searching lobbies.
Ecto schema for the lobbies table and changeset helpers.
Lightweight ETS-based tracker for lobby spectators.
Serialized execution using database-level advisory locks.
Notifications context – create, list, and delete persisted user-to-user notifications.
Subscribes to the global "friends" PubSub topic and automatically creates
notifications for key friend events
Ecto schema representing a notification sent from one user to another.
Default implementation for exchanging OAuth codes with providers.
Verifies Google OpenID Connect id_tokens for native/mobile sign-in flows.
Simple Ecto schema for OAuth session polling used by client SDKs.
Helpers for creating and retrieving short-lived OAuth sessions.
Context module for party management.
Ecto schema for the parties table.
Advisory locking for protecting TOCTOU (Time-of-Check-Time-of-Use) patterns.
Dynamic cron-like job scheduling for hooks.
Schema for schedule job locks.
Defines a quantum Scheduler.
Behaviour for pluggable site theming providers.
JSON-backed Theme provider. Reads a JSON file specified by the THEME_CONFIG environment variable (single canonical runtime source) — e.g. THEME_CONFIG=theme/custom.json
Shared types used across GameServer contexts.
Mix Tasks
Generates SDK stub modules from the real GameServer modules.