Files
recflare/apps/datacollection
Nexi 222547ee13 [api] audit fixes: account tests, dependencies and security hardening (#54)
* test(accounts): cover three username changes

* chore(deps): update vulnerable runtime dependencies

* fix(security): bound uploads and validate token subjects strictly

---------

Co-authored-by: Nexi (CWN) <communityshieldofficial@gmail.com>
2026-09-08 23:47:58 -04:00
..
2026-08-21 15:15:55 -04:00
2026-08-21 15:15:55 -04:00
2026-08-21 15:15:55 -04:00

datacollection

Client telemetry sink, served on the datacollection subdomain. Nothing here stores or forwards what it receives — there is no analytics backend behind this server — so both routes are acknowledgements, and neither is auth-gated (the client posts before a session is fully established, and treats a failure as a reason to retry).

  • POST /data/event — a single gameplay/analytics event. Discarded; answers {}. The client only checks that the call succeeded and never reads the body.
  • POST /data/events — the same for a batch of them. Answers [] — an array, mirroring the request's, not the singular path's object.
  • GET /sampling?sessionId=<guid> — sampling configuration, asked for once per session. {} carries no per-event overrides, which the client reads as "sample at the built-in default rates". The sessionId is not read.

Development

Run in dev mode

pnpm dev

Run tests

pnpm test

Deploy

pnpm turbo deploy