How peterwb1/osrs-xp-tracker works
OSRS XP Tracker is a multi-user web app: users authenticate, register OSRS usernames, and view per-account skill snapshots, dashboard metrics, and skill history gathered from the official Hiscores. The documented flow includes initial validation/snapshotting, scheduled polling, and manual refresh. The graph connects sampled controller, polling, and persistence code; frontend route and chart capabilities are documented but their detailed wiring was not sampled, so uncertain internal frontend links are omitted.
Main entry points: app Web app · AccountsController.cs Account endpoints · api.ts API client · AccountPoller.cs Account poller
Components 15
Web experience
- Web app
web/app - Account views
web/app/accounts - Dashboard and charts
web/components/AccountDashboard.tsx - API client
web/lib/api.ts - Auth state
web/lib/auth.tsx
API workflows
- Auth endpoints
api/OsrsTracker.Api/Controllers/AuthController.cs - Account endpoints
api/OsrsTracker.Api/Controllers/AccountsController.cs
Hiscores tracking
- Scheduled polling
api/OsrsTracker.Api/Services/PollingService.cs - Account poller
api/OsrsTracker.Api/Services/AccountPoller.cs - Hiscores client
api/OsrsTracker.Api/Hiscores/HiscoresClient.cs - CSV parser
api/OsrsTracker.Domain/Hiscores/HiscoresParser.cs
Identity and data
- Identity users
api/OsrsTracker.Api/Program.cs - Tracking data
api/OsrsTracker.Api/Data/AppDbContext.cs
Other components
- User
- Official Hiscores
Connections 18
- User → Web app: uses
- Web app → Account views: navigates
- Account views → Dashboard and charts: renders
- Web app → API client: requests
- Web app → Auth state: authenticates
- Auth state → API client: uses
- API client → Auth endpoints: calls
- API client → Account endpoints: calls
- Auth endpoints → Identity users: reads/writes
- Account endpoints → Tracking data: reads/writes
- Account endpoints → Hiscores client: validates username
- Account endpoints → Account poller: manual refresh
- Scheduled polling → Tracking data: finds due accounts
- Scheduled polling → Account poller: dispatches polls
- Account poller → Hiscores client: fetches stats
- Hiscores client → Official Hiscores: requests CSV
- Hiscores client → CSV parser: parses response
- Account poller → Tracking data: stores snapshots