About this project

Sheeplytics is a streamlined analytics solution designed for indie developers and small teams who need to track app events without the complexity of enterprise tools. It emphasizes simplicity, efficiency, and privacy by utilizing a self-hosted backend to reduce third-party data access. The framework consists of two primary components: 1. **Swift SDK**: A lightweight, non-blocking SDK for iOS and macOS. It uses Swift's actor-based concurrency model to ensure thread safety and provides a simple API for tracking four types of events: Flags (Boolean), Actions (String/Increment), Choices (String/Override), and Values (JSON). 2. **Backend Worker**: A frontend-agnostic Cloudflare Worker that receives events and stores them in a Cloudflare D1 database. It provides a REST-based query interface for retrieving analytics data, secured via Bearer tokens for query and admin endpoints. The backend supports various query filters (appId, userId, eventName) and aggregation methods (count, sum, avg) to analyze the collected event streams.