Skip to content
remcostoetenPublic

Latest commit

 

History

237 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Analytics

Self-hosted, privacy-first web analytics: a browser and server SDK, an API for ingest and reads, and a dashboard, on your own Postgres.

Version 2 is in prerelease. The API runs on api.analytics.remcostoeten.nl and its docs on docs.analytics.remcostoeten.nl. The v2 dashboard is not built yet; v1, which still serves production, lives in v1/.

  • @spoar/sdk tracks pageviews, events, errors and speed from the browser and the server, with React and Next entries and a first-party proxy.
  • @spoar/devtools is an overlay panel for admins that shows live visitors, sessions and the event log on their own site.

Install

npm install @spoar/sdk@next
npm install @spoar/devtools@next

Self-host

bun install
DATABASE_URL=postgres://... bun run setup --owner your-github-login --project my-site --domain example.com

This migrates the database, allows your GitHub login to sign in and creates the first project with its keys. The self-hosting guide covers the environment in apps/api/.env.example, deploying the API and scheduling the jobs.

Development

Requires Bun 1.3.

bun install          # install every workspace
bun run test         # run all tests
bun run typecheck    # typecheck every workspace
bun run dev:v1       # start the v1 dashboard

How the repo is organised and how work is done is in AGENTS.md.


xxx,
Remco Stoeten
MIT

Releases

Packages

Contributors

Languages