Intro Video: See the full product walkthrough in
purestat-intro.mp4— registration, org setup, site tracking, dashboard, goals, team invites, and billing in under 2 minutes.
Purestat is a privacy-first, cookie-free web analytics platform that gives you accurate website insights without compromising your visitors' privacy. Built with Rust for performance and reliability, it serves as a self-hostable alternative to Plausible and Fathom.
| Feature | Description |
|---|---|
| Privacy-first | Cookie-free tracking via daily-rotating SHA-256 visitor hashes |
| Lightweight tracker | < 1KB gzipped JS snippet, SPA-aware |
| Real-time dashboard | Live visitor count and activity stream |
| Goals & conversions | Track custom events with properties and revenue |
| Multi-tenant | Organizations with owner/admin/viewer roles |
| Stripe billing | Free, Pro, and Business plans with usage limits |
| OAuth login | Google, GitHub, Facebook, LinkedIn, Microsoft |
| Dark mode | Full dark/light theme support |
| i18n ready | Internationalization via vue-i18n |
| CSV export | Export filtered analytics data |
| API keys | Scoped programmatic access to stats |
| Invite system | Shareable invite links for team onboarding |
| Layer | Technology |
|---|---|
| Backend | Rust 1.85, Axum 0.8, JWT, argon2 |
| Frontend | Vue 3.5, Vuetify 3, Pinia 3, Chart.js |
| Analytics DB | ClickHouse 24 (time-series events & sessions) |
| Config DB | MongoDB 7 (users, orgs, sites, goals) |
| Cache | Redis 7 |
| Tracker | TypeScript, Rollup, < 1KB gzipped output |
| Infra | Docker Compose, Caddy 2 (auto-HTTPS) |
graph TB
subgraph Client
Browser[Browser]
TrackerJS[purestat.js<br/>< 1KB]
end
subgraph "Rust Backend"
API[API Server<br/>Axum 0.8]
Tracker[Tracker Server<br/>Axum 0.8]
Services[Services Layer]
DB[DB Layer / DAOs]
Config[Config Crate]
end
subgraph Databases
MongoDB[(MongoDB 7<br/>Users, Orgs, Sites)]
ClickHouse[(ClickHouse 24<br/>Events, Sessions)]
Redis[(Redis 7<br/>Cache, Sessions)]
end
subgraph External
Stripe[Stripe API]
OAuth[OAuth Providers]
end
Browser -->|SPA| API
TrackerJS -->|POST /api/event| Tracker
API --> Services
Tracker --> Services
Services --> DB
DB --> MongoDB
DB --> ClickHouse
Services --> Redis
API --> Stripe
API --> OAuth
Config --> API
Config --> Tracker
- Docker and Docker Compose
- Rust 1.85+ (with cargo)
- Bun (for frontend and tracker builds)
git clone https://github.com/purestat/purestat.git
cd purestatdocker-compose up -dThis starts MongoDB, ClickHouse, and Redis.
cargo runcd ui
bun install
bun devThe application will be available at http://localhost:5173 (frontend) with the API at http://localhost:3000.
docker-compose -f docker-compose.full.yml up -dSee docs/deployment.md for production setup with Caddy and auto-HTTPS.
| Document | Description |
|---|---|
| Architecture | Crate graph, request flow, scaling strategy |
| Data Model | MongoDB collections, ClickHouse tables, indexes |
| API Reference | Full endpoint reference with examples |
| JS Tracker | Installation, custom events, technical details |
| Frontend / UI | Vue app structure, stores, components, theming |
| Testing | Integration tests, E2E tests, coverage |
| Deployment | Docker, production, environment variables |
| Use Cases | User flow walkthroughs |
- Fork the repository
- Create a feature branch (
git checkout -b feat/my-feature) - Write tests for your changes
- Ensure all tests pass (
cargo test -p purestat-tests) - Run
cargo fmtandcargo clippy - Commit using conventional commits (
feat:,fix:,refactor:, etc.) - Open a pull request
This project is licensed under the MIT License.