posthog-reference-architecture

Installation
SKILL.md

PostHog Reference Architecture

Overview

Production-grade architecture for PostHog analytics in a web application. Covers file structure, event taxonomy design, SDK initialization layers, feature flag management, group analytics for B2B, and data pipeline integration.

Prerequisites

  • PostHog Cloud or self-hosted instance
  • posthog-js and posthog-node SDKs
  • Next.js or React application (patterns adapt to other frameworks)

Architecture

┌─────────────────────────────────────────────────────┐
│  Browser (posthog-js)                                │
│  $pageview, $autocapture, custom events, identify   │
│  Feature flag evaluation, session recordings         │
Related skills
Installs
25
GitHub Stars
2.2K
First Seen
Jan 30, 2026