Skip to content
SAFUUINTEL · SAFUU.NET

Developer reference

Reporting interfaces.

All sensitive operations use server routes. Database credentials are never sent to the browser.

Public read endpoints

GET /api/public/summary returns aggregate totals, monthly counts, and up to 50 approved cases. GET /api/public/cases/:id returns one approved case. The server cache refreshes after 60 seconds; the CDN can serve a previous public response while refreshing for up to five minutes. Pending cases and private evidence are excluded. Visible dashboard pages request an update once a minute and show an unavailable state if that request fails.

Web intake

GET /api/reports initializes a signed private session cookie. POST /api/evidence/upload reserves a private file and returns a signed direct upload URL. POST /api/reports validates incident fields and records a report with a client-generated request ID and private receipt key. Retries with the same request ID and payload return the same receipt.

Private tracking

POST /api/reports/status accepts a report ID and private receipt key. It returns only receipt status and fingerprints, never report text or evidence. Tracking keys must not be placed in URLs.

Operations

The Telegram webhook durably queues updates before acknowledging them. Persistent worker code processes leased jobs with bounded concurrency, per-chat ordering, and provider rate limits. Production uses the webhook drain and a one-minute scheduled retry backstop; persistent workers for national throughput are not provisioned. Staff endpoints require a verified Supabase Auth session, a server-managed staff role, and an authenticator by default.

Complete the setup

Apply the database migrations and configure the server variables before deploying. An administrator must create staff Auth accounts and grant their verified user IDs a role in the staff directory. Staff can then use “Set up authenticator” at the review desk, scan the code, and verify it before gaining access. Enrollment does not grant a staff role.

The repository’s production setup instructions cover the webhook, scheduled worker, private storage, anti-spam keys, and recovery requirements. Check service status after each configuration change. Paid capacity, staff appointments, and provider accounts are separate operating steps.