MCPcopy Index your code
hub / github.com/Openpanel-dev/openpanel

github.com/Openpanel-dev/openpanel @main sqlite

repository ↗ · DeepWiki ↗
4,695 symbols 16,528 edges 1,299 files 95 documented · 2%
README

hero

<h1 align="center"><b>Openpanel</b></h1>



An open-source alternative to Mixpanel






<a href="https://openpanel.dev">Website</a>
·
<a href="https://openpanel.dev/docs">Docs</a>
·
<a href="https://dashboard.openpanel.dev">Sign in</a>
·
<a href="https://go.openpanel.dev/discord">Discord</a>
·
<a href="https://twitter.com/OpenPanelDev">X/Twitter</a>
·
<a href="https://twitter.com/CarlLindesvard">Creator</a>
·

Openpanel is an open-source web and product analytics platform that combines the power of Mixpanel with the ease of Plausible and one of the best Google Analytics replacements.

✨ Features

  • 🔍 Advanced Analytics: Funnels, cohorts, user profiles, and session history
  • 🎬 Session Replay: Record and replay user sessions with privacy controls built in
  • 📊 Real-time Dashboards: Live data updates and interactive charts
  • 🎯 A/B Testing: Built-in variant testing with detailed breakdowns
  • 🔔 Smart Notifications: Event and funnel-based alerts
  • 🌍 Privacy-First: Cookieless tracking and GDPR compliance
  • 🚀 Developer-Friendly: Comprehensive SDKs and API access
  • 📦 Self-Hosted: Full control over your data and infrastructure
  • 💸 Transparent Pricing: No hidden costs or usage limits
  • 🛠️ Custom Dashboards: Flexible chart creation and data visualization
  • 📱 Multi-Platform: Web, mobile (iOS/Android), and server-side tracking
  • 🤖 MCP Server: Ask Claude, Cursor, or any MCP client about your users — 38 tools, hosted, no install
  • 💰 Revenue Tracking: Monitor purchases, subscriptions, and LTV alongside product events
  • 🔌 Integrations: Connect Google Search Console, and more to enrich your data

📊 Analytics Platform Comparison

Feature OpenPanel Mixpanel GA4 Plausible
✅ Open-source
🧩 Self-hosting supported
🔒 Cookieless by default
🔁 Real-time dashboards
🔍 Funnels & cohort analysis ✅* ✅***
👤 User profiles & session history
🎬 Session replay ✅****
📈 Custom dashboards & charts
💬 Event & funnel notifications
🌍 GDPR-compliant tracking ❌**
📦 SDKs (Web, Swift, Kotlin, ReactNative)
💸 Transparent pricing ✅*
🚀 Built for developers
🔧 A/B testing & variant breakdowns

GA4 has a free tier but often requires BigQuery (paid) for raw data access. ❌ GA4 has faced GDPR bans in several EU countries due to data transfers to US-based servers. ✅ Plausible has simple goals ✅** Mixpanel session replay is limited to 5k sessions/month on free and 20k on paid. OpenPanel has no limit.

Stack

  • Nextjs - the dashboard
  • Fastify - event api
  • Postgres - storing basic information
  • Clickhouse - storing events
  • Redis - cache layer, pub/sub and queue
  • BullMQ - queue
  • GroupMQ - for grouped queue
  • Resend - email
  • Arctic - oauth
  • Oslo - auth
  • tRPC - api
  • Tailwind - styling
  • Shadcn - ui

Self-hosting

OpenPanel can be self-hosted and we have tried to make it as simple as possible.

You can find the how to here

Give us a star if you like it!

Star History Chart

Development

Prerequisites

  • Docker
  • Docker Compose
  • Node
  • pnpm

Start

pnpm install
cp .env.example .env
echo "API_URL=http://localhost:3333" > apps/start/.env

pnpm dock:up
pnpm codegen
pnpm migrate:deploy # once to setup the db
pnpm dev

You can now access the following:

  • Dashboard: https://localhost:3000
  • API: https://api.localhost:3333
  • Bullboard (queue): http://localhost:9999
  • pnpm dock:ch to access clickhouse terminal
  • pnpm dock:redis to access redis terminal

Extension points exported contracts — how you extend this code

ChatStateValue (Interface)
* Thin global context for chat identifiers. The active conversation * id and the drawer's open/closed state both live i
apps/start/src/components/chat/chat-context.tsx
ImportConfig (Interface)
(no doc)
packages/importer/src/types.ts
ModuleOptions (Interface)
(no doc)
packages/sdks/nuxt/src/types.d.ts
InsightMetricEntry (Interface)
(no doc)
packages/validation/src/types.insights.ts
EventsQueuePayloadIncomingEvent (Interface)
(no doc)
packages/queue/src/queues.ts
BreakdownComparison (Interface)
(no doc)
packages/ai/src/explain.ts
McpAuthContext (Interface)
(no doc)
packages/mcp/src/auth.ts
ISerieDataItem (Interface)
(no doc)
packages/common/src/group-by-labels.ts

Core symbols most depended-on inside this repo

map
called by 1302
apps/public/public/op1-replay.js
push
called by 513
apps/public/public/op1-replay.js
cn
called by 421
apps/start/src/utils/cn.ts
replace
called by 367
apps/public/public/op1-replay.js
join
called by 365
packages/db/src/clickhouse/query-builder.ts
where
called by 320
packages/db/src/clickhouse/query-builder.ts
log
called by 279
apps/public/public/op1.js
get
called by 260
apps/public/public/op1-replay.js

Shape

Function 3,277
Method 668
Interface 651
Class 99

Languages

TypeScript100%

Modules by API surface

apps/public/public/op1-replay.js536 symbols
packages/db/src/clickhouse/query-builder.ts62 symbols
apps/public/public/op1.js45 symbols
apps/api/src/controllers/insights.controller.ts42 symbols
packages/db/src/services/event.service.ts34 symbols
apps/start/src/routeTree.gen.ts33 symbols
packages/db/src/services/overview.service.ts28 symbols
apps/public/src/lib/compare.ts28 symbols
packages/sdks/sdk/src/index.ts27 symbols
packages/db/src/services/insights.service.ts25 symbols
apps/public/public/op.js25 symbols
packages/db/src/services/chart.service.ts24 symbols

Dependencies from manifests, versioned

@babel/parser7.26.0 · 1×
@better-agent/adapters0.1.0-beta.3 · 1×
@better-agent/client0.1.0-beta.3 · 1×
@better-agent/core0.1.0-beta.3 · 1×
@better-agent/providers0.1.0-beta.3 · 1×
@biomejs/biome2.3.15 · 1×
@bull-board/api6.14.0 · 1×
@bull-board/express6.14.0 · 1×
@clickhouse/client1.18.5 · 1×
@cloudflare/vite-plugin1.33.2 · 1×
@codemirror/commands6.7.0 · 1×
@codemirror/lang-javascript6.2.0 · 1×

Datastores touched

postgresDatabase · 1 repos

For agents

$ claude mcp add openpanel \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact