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.
This is a production-grade Customer Data Platform (CDP) backend written in Go. It ingests events via HTTP (gateway), transforms and enriches them (processor), and routes them to over 90 destinations including streaming services (e.g., Kafka, Kinesis) and data warehouses (e.g., Snowflake, BigQuery, ClickHouse). The core of the system is a PostgreSQL-backed job queue (JobsDB) that provides partitioned, multi-consumer, durable processing. The architecture is a monolith with multiple internal services that can be deployed in different modes (gateway-only, processor-only, embedded). It includes enterprise features like OAuth token management, user suppression, regulatory deletion (GDPR), and reporting with HyperLogLog aggregation. The codebase is well-structured with clear separation of concerns, extensive unit and integration tests, and many reusable patterns (worker pool, circuit breaker, transaction listeners, config reloading). It is actively maintained with regular commits and security patching.