Skip to content

Go7hic/flareboard

Repository files navigation

Flareboard

Privacy-first web analytics on Cloudflare Workers — pageviews, events, sessions, reports, session replay, teams, and share links. Self-hosted on D1, KV, R2, and Queues.

Features

  • Website stats with segments, comparisons, and CSV export
  • Realtime visitors (last 5 minutes)
  • Reports: funnel, retention, attribution, web vitals, and more
  • Session replay (rrweb → R2)
  • Custom boards and public share links
  • Teams and admin console; optional Google/GitHub login

Stack

Component Dev port Role
apps/ingest 8787 Tracking (/api/send, /script.js, replay ingest)
apps/api 8788 Authenticated REST API
workers/aggregator Queue consumer → D1
apps/dashboard 5173 React dashboard

Monorepo packages: @flareboard/db, @flareboard/shared.

Quick start

Requires Node.js 20+ and pnpm 9+.

pnpm install
pnpm db:migrate
pnpm seed
pnpm dev:api       # :8788
pnpm dev:ingest    # :8787
pnpm dev:dashboard # :5173
pnpm dev:aggregator

Create apps/dashboard/.env:

VITE_API_URL=http://localhost:8788
VITE_INGEST_URL=http://localhost:8787

Copy .dev.vars.example.dev.vars in apps/api and apps/ingest.

Open http://localhost:5173 and sign in with the credentials from pnpm seed (scripts/seed.ts --help for overrides).

Deploy

Production setup (Cloudflare resources, secrets, custom domains): Deployment guide.

Forkers: replace D1/KV IDs in each app's wrangler.jsonc with your own resources before deploying.

Docs

Development Local dev, scripts, smoke tests
API reference REST and ingest endpoints
Database Schema and migrations
Security Vulnerability reporting

License

PolyForm Noncommercial License 1.0.0 — free for personal, educational, and other noncommercial use. Commercial use requires separate permission from the copyright holders.

About

The Google Analytics alternative on Workers, D1, KV, R2, and Queues. Run Flareboard Cloud or deploy on your own Cloudflare account.

Resources

License

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages