GAME - Goals And Motivation Engine

An adaptive, programmable gamification engine

GAME turns user activity into points, coins, and behavioral incentives through programmable scoring strategies. Unlike static points APIs whose rules are frozen at design time, GAME lets a strategy react to behavior, context, and system state - so incentives can be redistributed toward under-engaged users, tasks, or regions instead of amplifying the participation inequality that fixed rules tend to reinforce.

It runs in two shapes:

  • as a complete gamification backend - manage games, tasks, users, point assignment, and wallets; or

  • as a scoring microservice - your system owns the application logic and calls GAME only to compute how many points an event is worth.


New here? Start with the path that matches your goal

This documentation follows the Diátaxis model - it separates learning-oriented tutorials, task-oriented how-to guides, understanding-oriented explanation, and dry reference. Pick your lane:

Audience map

This site serves two readers at once, and every page declares which one it is written for:

Reader

You want to…

Read first

Integrator

Consume GAME from an external app as a gamification/scoring backend.

Getting Started, Authentication, Integrating with GAME, Strategies, REST API Reference

Contributor / Operator

Extend the engine, run it, or reason about its internals.

Architecture, The DSL Strategy Engine, Security, Observability, Configuration Reference, Operations



At a glance

Property

Value

Stack

Python ≥ 3.12 · FastAPI/Starlette · SQLModel/SQLAlchemy 2.0 (async) · PostgreSQL · Keycloak (OIDC) · Redis (optional)

Architecture

Layered - endpoint → service → strategy engine → repository → database - wired by a dependency-injection container

Scoring

Built-in deterministic & adaptive strategies, plus a sandboxed DSL (no-code, Blockly-authored) with hard CPU/size limits

Auth

API key (X-API-Key) or OAuth2 bearer (Keycloak), with per-key scoping and rate limiting

Observability

Prometheus /metrics, structured JSON logs, Sentry, sampled DSL execution traces, KPI rollups

Reproducibility

Deterministic execution, simulation mode (isSimulated), versionable strategies - usable as an experimental research platform


See also

  • Interactive API - every deployment serves Swagger UI at /docs and ReDoc at /redocs generated from the live OpenAPI schema.

  • Source - https://github.com/fvergaracl/GAME

  • License - Apache-2.0