Files
shooting-event/phoenix
2026-04-29 00:45:48 +04:00
..
2026-04-29 00:45:48 +04:00
2026-04-29 00:45:48 +04:00
2026-04-29 00:45:48 +04:00
2026-04-29 00:45:48 +04:00
2026-04-29 00:45:48 +04:00
2026-04-29 00:45:48 +04:00
2026-04-29 00:45:48 +04:00
2026-04-29 00:45:48 +04:00
2026-04-29 00:45:48 +04:00
2026-04-29 00:45:48 +04:00

Shooting Event Phoenix Backend

This folder contains a Phoenix + SQLite implementation of the existing Go API contract used by the Vue frontend.

Run (dev)

cd phoenix
mix deps.get
mix ecto.create
mix ecto.migrate
PORT=8080 mix phx.server

Or from project root:

make phoenix-dev

Build

make phoenix-build

API compatibility

The Phoenix app exposes the same /api/* endpoints currently used by the Vue app, including:

  • Public:
    • GET /api/health
    • GET /api/state
    • GET /api/events (SSE)
  • Admin:
    • POST /api/admin/login
    • POST /api/admin/logout
    • GET /api/admin/state
    • PUT /api/admin/settings
    • Player CRUD + auto-group
    • Score/proof update/delete + reset
    • AI score advice endpoint

Environment

  • PORT (default: 8080)
  • DB_PATH (default: ../data/shooting_phoenix.db)
  • ADMIN_USER (default: datwyler)
  • ADMIN_PASS (default: datwyler)
  • GEMINI_API_KEY (default follows existing project fallback)
  • GEMINI_MODEL (default: gemini-3.1-flash-lite-preview)