High-Level Components
- Frontend (Next.js): Dashboard UI, server-side API proxy routes, session cookie handling
- Backend (Django + Ninja): Auth, app management, ingest API, analytics/query endpoints
- PostgreSQL: Core relational data (users, apps, API keys, sessions, environments, endpoint metadata)
- ClickHouse: High-volume request event storage and analytical queries
Data Flow
- Client/service sends telemetry to
POST /ingest/requestswith app-scoped API key - Ingest service validates payload and app scope
- Request events are written to ClickHouse
- Endpoint metadata is auto-discovered/updated from method + path
- Dashboard queries analytics endpoints with JWT auth
- Backend returns filtered aggregates to frontend
Tenant Isolation Model
- User JWT routes are app-scoped through
/{app_slug}and validated against owner - API-key ingest routes resolve tenant context from key and app relationship
- Query filters enforce app IDs in analytics SQL
Auth Model
- Passwordless-first via magic links (
/auth/magic-link+/auth/verify) - Optional password login (
/auth/login) only after password is set - Password reset flow starts with magic link reset request and ends with authenticated password set
Operational Notes
- ClickHouse is required for analytics/ingest-backed metrics
- Frontend filtering is hybrid: backend query + safe short-lived cache for responsive UX
- Endpoint tables and filters are server-driven for scale