Lytix
Lytix is an analytics platform for Torn players. Sign in with your Torn API key to track race results and stats, run leagues, seasons and tournaments, and manage your company.
- Tools
- Laravel
- Timeframe
- 2026
About the project
Lytix is a web platform for players of Torn, a browser-based multiplayer game. It turns the raw data from Torn's API into analytics, competitive tooling and management dashboards. Players sign in with their Torn API key instead of a password, and Lytix builds their profile, history and stats automatically.
What it does
Racing
- Global race tracking: imports and indexes every race the system sees. As of September 2026 that's over 2.2 million races and 14 million race entries, all browsable, searchable and filterable.
- Player profiles and insights: per-player race history, best laps, results and trends.
- Leagues: user-created communities with invite links, member caps, roles (owner/officer/member), and custom ranks. A member can hold several ranks, which lets them take part in multiple rank-restricted competitions.
- Seasons: multi-week competitions with configurable points systems (static values or formulas such as
max(0, {racers} - {position})), playoff and grand-race multipliers, qualification rules, knockout playoffs, and an optional multi-phase Finals Week (Wildcard → Semi-Final → Final). - Tournaments: including a King of the Hill format with team rosters, captains, penalties and auto-generated brackets.
- Shareable result images: server-rendered PNGs of race results, season leaderboards and tournament brackets, ready to post on Discord or forums.
Companies
- A directory of every Torn company type, with positions, stock, specials, and live rankings filterable by star rating.
- A dashboard for company directors: income, staff effectiveness, stock and training records, and benchmarks against similar companies.
Stocks, Personal Stats & More
- Stock price history and portfolio tracking.
- Personal stats, crimes, achievements, bank, and enlisted-car tracking.
Platform
- Subscription tiers per module (e.g. Racing Basic / Creator, Stocks Basic), paid in Torn's in-game currency and detected automatically through the Torn API.
- A public JSON API used by a companion Discord bot (account verification, race and event lookups, company and stock data).
- An admin panel covering users, billing, the API key pool, queue and scheduler health, incidents, activity logs, and moderation.
Engineering highlights
- API key auth: no passwords. A user's 16-character Torn key is validated against Torn's API, its access level and permissions are recorded, and features unlock based on what the key can access.
- Shared API key pool: background syncing spreads requests across a pool of opted-in keys, with rate-limit handling and automatic retries, so a single key never hits Torn's limits.
- Background job system: over 25 scheduled commands and queued jobs keep data fresh (race syncs every 15 minutes, company and director snapshots, name resolution for unknown players, payment detection). Failed scheduled jobs are logged as incidents so they're visible in the admin panel.
- Performance at scale: profiled slow pages against the production dataset and fixed the causes, cutting load times from over 15 seconds to around 200–400 ms. That included adding targeted indexes, caching aggregate stats, and a scheduled cache-warming job so visitors never hit an empty cache.
- Server-side image rendering: PNG generation with PHP GD, including multi-column layouts that keep tables of 100+ racers readable once shrunk down by Discord.
- Flexible competition engine: formula-based scoring checked in both the browser and the server, rank-restricted eligibility, multi-round finals with advancement rules, and automatic event scheduling from weekly time slots.
What I learned
Building Lytix meant designing around an external API I don't control: strict rate limits, partial data, and keys that can be revoked at any time. It also meant keeping a fast user experience on top of a dataset in the tens of millions of rows. That pushed me toward queue-driven architecture, defensive syncing, and measuring performance on real production data rather than guessing.