How actidoo/gamification-engine works
Project type and purpose
• This is an open-source, full-stack “service” framework (gamification-engine) written in Python (Pyramid) that exposes a REST API and ships a React/JS admin UI.
• Its purpose is to let any application “talk” to it (over REST) to manage achievements, leaderboards, triggers, time-zone aware evaluations, caching, push notifications, etc.
File structure
• Top level:
• Docker & CI configs: Dockerfile, docker-compose.yml(.production), travis.yml
• Python package metadata: setup.py, requirements.txt, MANIFEST.in
• Configs: development.ini, production.ini (in docker-files), uwsgi/nginx configs
• gengine/app: the Pyramid application
• api/ (resources.py, schemas.py) → REST controllers
• alembic/ → DB migrations (SQLAlchemy + Alembic)
• jsscripts/ → React frontend code & built static assets
• tasks.py, tasksystem.py & maintenance/scripts/ → background scheduler & workers
• cache.py → dogpile.cache integration
• push.py → push notification triggers
• model.py → SQLAlchemy models
• templates/static/ → admin UI templates & JS components
• tests/ → unit/integration tests
• gengine/base: shared utilities, settings, context, caching, error handling
• Top-level scripts: init.sh, wait-for-it.sh, paster-script.py
README for additional insights
• Confirms: Python service with REST interface, admin UI
• Dependencies: Pyramid, SQLAlchemy, Alembic, dogpile.cache (memcached), Flask-admin, psycopg2 (PostgreSQL), etc.
• Docker support: docker-compose for dev & prod
• Maintenance scripts manage DB init, migrations, scheduler beat & worker, push messages