Ahoy is a Rails engine that provides first-party analytics for Ruby on Rails applications. It tracks visits and events, storing data in the application's database by default while supporting custom data stores. The architecture follows Rails engine patterns with controllers, models, and concerns. Key features include automatic visit tracking, event tracking, geocoding via background jobs, IP masking for GDPR compliance, and associating visits with application models. The system provides both server-side Ruby tracking and client-side JavaScript/AMP/native app tracking through a configurable API.
Mixpanel-node is a server-side SDK for Mixpanel analytics, providing event tracking, people and group profile management, and feature flag evaluation (local and remote). It includes an optional OpenFeature provider for standardized flag evaluation. The SDK is structured as an npm workspace with two packages: the core `mixpanel` library and `@mixpanel/openfeature-server-provider`. The codebase demonstrates solid engineering practices: clear module separation, comprehensive test coverage with vitest and nock, robust error handling, deprecation warnings, and service account authentication support. The feature flags subsystem includes custom json-logic operators for semver and datetime comparison, validated against cross-platform golden vectors. The OpenFeature provider correctly maps Mixpanel's fallback reasons to OpenFeature error codes. Dependencies are modern, and the project is actively maintained with automated CI/CD and release workflows.
Ackee is a self-hosted, privacy-focused web analytics tool. It tracks page views, durations, referrers, browsers, devices, operating systems, screen sizes, languages, and custom events without using cookies or collecting personally identifiable information. Visitor identity is anonymized via SHA-256 hashing of IP + user agent + domain ID with a daily rotating salt. The architecture is a full-stack Node.js application: an Express server with Apollo Server for GraphQL, a React single-page application frontend (using `createElement` instead of JSX), and MongoDB for persistence. The backend provides a GraphQL API for querying aggregated statistics and managing domains, events, and authentication tokens. The frontend consumes this API via Apollo Client and renders a dashboard with reusable card and presentation components. Key design patterns include a `pipe` utility for chaining resolver middleware (auth, demo mode blocking), modular MongoDB aggregation stages stored in `src/stages/`, and a custom build pipeline using Rosid handlers. The application supports multiple deployment targets: Docker, Heroku, Vercel, Netlify, and manual Node.js processes.