How rishi2600/analytics-board-supabase works
Analytics is a self-serve product analytics platform: teams install the SDK, events are ingested and aggregated, then users explore project data and manage access in a Supabase-backed dashboard. The README documents scheduled rollups and several dashboard capabilities whose implementation files are not included in the excerpts; their paths and wiring are shown only where the tree supports them.
Main entry points: router.tsx Dashboard routes · api.ts Analytics queries · supabase.ts Web Supabase client · index.ts Event ingestion
Components 26
Event collection
- Analytics SDK
packages/sdk/src/index.ts - Event ingestion
supabase/functions/ingest/index.ts
Event processing
- Scheduled rollups
- Rollup backfill
scripts/backfill-rollups.ts
Analytics dashboard
- Dashboard routes
apps/web/src/app/router.tsx - Overview
apps/web/src/routes/project/overview.tsx - Event explorer
apps/web/src/routes/project/events.tsx - Live feed
apps/web/src/routes/project/live.tsx - Funnels
apps/web/src/routes/project/funnels.tsx - Retention cohorts
apps/web/src/routes/project/retention.tsx - Reports and exports
apps/web/src/routes/project/reports.tsx - Ingestion health
apps/web/src/routes/project/health.tsx - Analytics queries
apps/web/src/features/analytics/api.ts - Export runner
supabase/functions/export-run/index.ts - Export download
supabase/functions/export-download/index.ts
Workspace management
- Authentication
apps/web/src/features/auth/auth-provider.tsx - Organizations and members
apps/web/src/features/orgs/api.ts - Project settings
apps/web/src/features/projects/api.ts - API key management
apps/web/src/features/keys/api.ts
Supabase platform
- Web Supabase client
apps/web/src/lib/supabase.ts - Ingestion key verification
supabase/functions/_shared/auth.ts - Postgres
- Supabase Auth
- Supabase Storage
Other components
- Customer app
- Dashboard user
Connections 30
- Customer app → Analytics SDK: sends events
- Analytics SDK → Event ingestion: submits batches
- Event ingestion → Ingestion key verification: resolves key
- Ingestion key verification → Postgres: verifies key
- Event ingestion → Postgres: stores events
- Scheduled rollups → Postgres: reads and writes
- Rollup backfill → Postgres: recomputes rollups
- Dashboard user → Dashboard routes: uses dashboard
- Dashboard routes → Overview: routes to
- Dashboard routes → Event explorer: routes to
- Dashboard routes → Live feed: routes to
- Dashboard routes → Funnels: routes to
- Dashboard routes → Retention cohorts: routes to
- Dashboard routes → Reports and exports: routes to
- Dashboard routes → Ingestion health: routes to
- Overview → Analytics queries: queries metrics
- Event explorer → Analytics queries: queries events
- Funnels → Analytics queries: queries funnels
- Retention cohorts → Analytics queries: queries cohorts
- Ingestion health → Analytics queries: queries health
- Analytics queries → Web Supabase client: uses client
- Web Supabase client → Postgres: queries data
- Reports and exports → Export runner: requests exports
- Export runner → Postgres: claims and reads
- Export runner → Supabase Storage: stores export
- Export download → Supabase Storage: retrieves export
- Authentication → Supabase Auth: reads session
- Organizations and members → Web Supabase client: uses client
- Project settings → Web Supabase client: uses client
- API key management → Web Supabase client: uses client