$ show PostHog/posthog
PostHog is a comprehensive product analytics and customer data platform (CDP) built as a polyglot monorepo. It combines Python/Django for core application logic and API, Rust for high-performance event ingestion and symbolication, and Node.js for ingestion pipelines and CDP services. The frontend is a React/TypeScript application using Kea for state management. It supports self-hosting and cloud deployment, with data stored in PostgreSQL, ClickHouse, and Redis. Key features include event tracking, session replay, feature flags, experiments, error tracking, and AI observability. The architecture emphasizes high-throughput event processing via Kafka and Temporal workflows for async tasks.
The LLM identified 4 files worth highlighting for reuse:
Implements a reusable batch processing pipeline abstraction for event ingestion. Handles backpressure, retries, and batching logic, allowing other pipelines to easily adopt robust processing patterns without reinventing error handling or flow control.
Core CDP transformation logic that executes HogQL/HogVM transformations on events. Demonstrates a clean service pattern for applying user-defined logic to data streams, decoupling transformation execution from ingestion infrastructure.
Specialized pipeline for session replay data, handling encryption, anonymization, and storage. Shows complex data processing logic for privacy-sensitive data, including key management and secure storage patterns.
Defines the custom query language (HogQL) used across the platform for analytics queries. A domain-specific language implementation that allows flexible querying of analytics data, demonstrating advanced parser generation and query planning skills.