Flati-Boss-Tracker-Server

module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2026 License: BSD-2-Clause

README

Flati Boss Tracker Server

Backend for the Flati Boss Tracker RuneLite plugin. Tracks Group Ironman boss kill counts, agility laps, clues, raids KC, and a shared kill timeline dashboard.

Can run standalone for self-hosting, or embed in another Go site via the osrs package.

Quick start (Docker)

docker compose up --build

Open http://localhost:8080/osrs/create to create a group, then configure the RuneLite plugin with your API key and endpoint URLs:

Plugin setting Self-hosted URL
Boss kill endpoint http://localhost:8080/api/osrs/boss-kill
KC update endpoint http://localhost:8080/api/osrs/kc-update
KC sync endpoint http://localhost:8080/api/osrs/kc-sync

Set OSRS_SIGNING_SECRET to a random string (32+ bytes hex) before production. With OSRS_COOKIE_SECURE=false locally; set true behind HTTPS.

Postgres is exposed on host port 5433 to avoid conflicting with other local databases.

Environment variables

Variable Default Description
DB_HOST localhost PostgreSQL host
DB_USER osrs Database user
DB_PASSWORD osrs Database password
DB_NAME osrs Database name
PORT 8080 HTTP listen port
OSRS_SIGNING_SECRET (ephemeral) HMAC key for signed cookies
OSRS_COOKIE_SECURE false Set true when served over HTTPS

Manual setup

  1. Create a PostgreSQL database and run schema.sql.
  2. Build and run:
go run ./cmd/server

Embed in another Go application

import "github.com/Flati/Flati-Boss-Tracker-Server/osrs"

osrs.Register(http.DefaultServeMux, db, osrs.Config{
    SigningSecret: os.Getenv("OSRS_SIGNING_SECRET"),
    CookieSecure:  true,
    ExternalLayoutPath: "templates/layout.html", // optional site shell
})

When ExternalLayoutPath is set, OSRS page templates are loaded from this module's embedded assets while the layout comes from your app.

API contract

All plugin endpoints require Authorization: Bearer <api_key>.

POST /api/osrs/boss-kill
{
  "playerName": "Flatmundur",
  "bossName": "Vorkath",
  "killedAt": "2026-08-25T12:00:00Z",
  "killCount": 142
}
POST /api/osrs/kc-update
{
  "playerName": "Flatmundur",
  "bossName": "Vorkath",
  "killCount": 142,
  "updatedAt": "2026-08-25T12:00:00Z"
}
POST /api/osrs/kc-sync
{
  "playerName": "Flatmundur",
  "source": "boss_log",
  "updatedAt": "2026-08-25T12:00:00Z",
  "entries": [
    { "bossName": "Vorkath", "killCount": 142 }
  ]
}
GET /api/osrs/{group}/kills?since=1d

Timeline JSON for the dashboard (cookie or API key auth).

License

BSD-2-Clause — see LICENSE.

Directories

Path Synopsis
cmd
server command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL