Skip to content

How Playdex fits together

A Playdex instance is three web apps sharing one PostgreSQL database. Some optional helpers sit around them.

┌──────────────────────────────┐
Browser ─────────────►│ Web (Blazor WASM, nginx) │ :5056
│ └──────────────────────────────┘
│ /api/* ┌──────────────────────────────┐ ┌───────────────┐
└─────────────────►│ API (ASP.NET) │───────►│ Steam / PSN / │
Wrapper / Playnite ──►│ • runs DB migrations │ polls │ OpenXBL / IGDB│
(API key) │ • polls providers │ └───────────────┘
│ • sends notifications ──────┼──► Apprise ──► Telegram
└──────────────┬───────────────┘ :3000
│
┌──────▼──────┐
│ PostgreSQL │
└──────▲──────┘
│ direct DB access, never calls the API
Admin browser ───────►┌──────────────┴───────────────┐
│ Admin (Blazor Server) │ :3100
└──────────────────────────────┘
Piece What it does Required?
API Login, sessions, games, integrations. Runs migrations on every start. Background poller checks Steam/PSN/Xbox every Polling__IntervalSeconds. Yes
Web The app your users see. Static files served by nginx; talks to the API from the browser. Yes
Admin Operator console: dashboard, integrations, sessions, games, AI history. Reads and writes the database directly. Recommended
PostgreSQL 16 Everything is stored here. Yes
Apprise Delivers Telegram notifications on behalf of the API. For notifications
Wrapper Windows tray app that launches PC games and reports play time via an API key. Optional, per user
WireMock Fake Steam/PSN/Xbox APIs for local testing. Dev only

There are three capture methods:

  1. Polling. A user connects Steam, PSN or Xbox in Web → Settings. The API asks that provider “what is this account playing?” every poll cycle. It opens a session when a game appears and closes it when the game is gone.
  2. API capture. The Windows Wrapper or Playnite pings POST /api/capture/sessions/ping every 30s while a game runs. If no ping arrives for 3 minutes, the session closes.
  3. Manual. The user adds a session in the Web app, optionally drafted by AI from pasted text or a screenshot.

Each session start or end can trigger a Telegram notification.