Skip to main content

Documentation Index

Fetch the complete documentation index at: https://revlytics.co/docs/llms.txt

Use this file to discover all available pages before exploring further.

Architecture overview

Revlytics is built on a modern, high-performance stack designed to handle millions of events with minimal latency.
┌──────────────┐     ┌──────────────────┐     ┌──────────────┐
│  Your Site   │────▶│  Revlytics API   │────▶│  ClickHouse  │
│  (script.js) │     │  (Next.js)       │     │  (Analytics)  │
└──────────────┘     └──────────────────┘     └──────────────┘


                     ┌──────────────────┐
                     │    Supabase      │
                     │  (Auth + Config) │
                     └──────────────────┘

Tech stack

ComponentTechnologyPurpose
FrontendNext.js 16, React 19, Tailwind CSSDashboard UI
Analytics DBClickHouseHigh-speed event storage and aggregation
Auth & ConfigSupabase (PostgreSQL)User auth, site config, integrations
TrackingVanilla JSLightweight client-side tracking script
Session ReplayrrwebDOM recording and playback
MapsMapbox GLReal-time visitor globe
ChartsRechartsInteractive data visualizations

Data flow

1

Script loads

The tracking script (script.js) loads asynchronously on your site. It’s under 10KB gzipped and doesn’t block rendering.
2

Events are captured

The script captures pageviews, clicks, errors, and other interactions. Events are sent via POST requests with navigator.sendBeacon for reliability.
3

Server processes events

The /api/event endpoint validates the event, extracts geolocation from the IP address, parses the user agent, and enriches the data.
4

Data is stored

Events are inserted into ClickHouse for fast analytical queries. ClickHouse’s columnar storage makes aggregations over millions of rows instant.
5

Dashboard queries

The dashboard queries ClickHouse directly with time-range filters, breakdowns, and aggregations. Results are rendered in real-time.

Privacy by design

  • No third-party cookies — Visitor identification uses first-party cookies only
  • IP anonymization — IP addresses are used for geolocation only and can be configured to not be stored
  • Minimal data — Only essential analytics data is collected
  • Self-hostable — Run on your own infrastructure for full data ownership
  • Opt-out support — Users can opt out via localStorage or your consent manager