Skip to content

measurestack/measure-stack

Repository files navigation

MeasureStack v0.3.0

Privacy-first web analytics platform. Self-hosted, simple, and extensible.

Quick Install

cd deploy && cp config.source.template deploy/config.source
# Then edit with your settings; bring your own Google Cloud Project
./deploy_app.sh      # Deploy tracking API
./deploy_dbt.sh      # Deploy analytics pipeline

Documentation

📖 More Documentation

Features

  • Privacy-first: privacy friendly cookieless tracking with daily salt rotation,
  • Self-hosted: Deploy in your own cloud environment, fully own your data
  • Simple: 5 core files (~500 lines), easy to understand and extend
  • Real-time tracking: Events, pageviews, and custom parameters
  • Device & location enrichment: User-agent parsing and IP geolocation
  • Consent management: Cookie-based opt-in/opt-out and/or flexible cookieless tracking
  • Data pipeline: dbt-powered transformation and analytics
  • Scalable: Serverless architecture on Google Cloud Run

Tech Stack

  • Runtime: Bun
  • Framework: Hono
  • Database: BigQuery + Firestore
  • Analytics: dbt
  • Deployment: Google Cloud Run

🏗️ Architecture Overview

┌─────────────────┐    ┌───────────────┐    ┌─────────────────┐
│   Client Side   │    │   Server Side │    │  Events Layer   │
│                 │    │               │    │                 │
│ measure.js SDK  │───▶│  Hono API     │───▶│  BigQuery       │
│ (Browser)       │    │  (Cloud Run)  │    │  (Raw Events)   │
└─────────────────┘    └───────────────┘    └─────────────────┘
                                                       │
                                                       ▼
                                            ┌─────────────────┐    ┌──────────────┐
                                            │  Data Pipeline  │    │  Analytics   │
                                            │                 │    │              │
                                            │  dbt Models     │───▶│  Dashboard   │
                                            │  (Cloud Run)    │    │  (Insights)  │
                                            └─────────────────┘    └──────────────┘

Development

bun install          # Install dependencies
bun run dev          # Start dev server with hot reload
bun test             # Run end-to-end tests

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •