About this project

Traks is a lightweight, cookie-free web analytics platform designed to be deployed directly into a user's own Cloudflare account. It leverages a full suite of Cloudflare services, including Workers, Durable Objects, D1, Pipelines, and R2 (with Data Catalog and SQL), ensuring that no third-party services are in the data path and no personal data is stored. Key capabilities include: - **Privacy-First Tracking**: Uses a daily-rotating hash for visitor counting instead of cookies or persistent fingerprinting; raw IP addresses are never stored. - **Hybrid Data Path**: Employs a "hot/cold" split where real-time data (today's views) is served via SQLite-backed Durable Objects for millisecond latency, while historical data is stored in Apache Iceberg on R2 and queried via R2 SQL. - **Real-time Dashboard**: Features a WebSocket-driven dashboard that pushes live visitor activity, including pages, referrers, and city-level map data. - **AI Integration**: Analytics are exposed to AI agents through MCP/WebMCP tools, with specific classification for bot and agent traffic. - **Self-Contained Infrastructure**: Includes its own authentication system (via Better Auth on D1) and self-hosted map assets, removing dependencies on external SaaS or tile servers. - **Efficient Scaling**: Designed to remain cost-effective by minimizing R2 SQL scans through edge caching and optimized data compaction.