Skip to content

v0.3 feat: portfolio analytics — cross-app user intelligence dashboard #18

@gitcoder89431

Description

@gitcoder89431

Feature — Portfolio Analytics (Founder Dashboard)

The idea

VibeAuth already sits at the center of every app you build — every sign-in, every session, every new user flows through it. That makes it the only tool in your stack that can see across your entire product portfolio.

Clerk, Auth0, Supabase Auth — none of them can do this because they're scoped per-project. VibeAuth's hub architecture makes cross-app analytics naturally possible.

What the dashboard would show

Portfolio Overview (top-level)

  • Total users across all connected apps
  • New signups this week / month (per app + combined)
  • Active sessions right now (per app)
  • Which app is growing fastest

User Intelligence

  • Cross-app users — same person using App A and App B (matched by vibeAuthId)
  • Churn signals — users who signed in 30+ days ago and haven't returned
  • New user funnel — signed up but never came back (< 1 session after first)
  • Top users by session count / activity

App Health

  • Daily/weekly active users per app (DAU/WAU)
  • Sign-in method breakdown (GitHub vs Google vs OTP) per app
  • Session duration trends
  • API key usage (which keys are active, which are stale)

How it works technically

All the data already exists in the DB:

  • session table has userId, createdAt, expiresAt, ipAddress, userAgent
  • user table has createdAt, updatedAt
  • apikey table has lastUsedAt
  • Trusted origins (connected apps) are already stored in config

No new data collection needed — just aggregate queries on existing tables.

Implementation approach

  • Add a new /admin/analytics route to the existing admin panel
  • Drizzle aggregate queries (COUNT, GROUP BY date, JOIN across tables)
  • Charts: use a lightweight lib like recharts or chart.js — already likely in deps via shadcn
  • No external analytics service needed — fully private, your data stays in your Neon DB

UI sketch

┌─────────────────────────────────────────────┐
│  Portfolio Overview          Last 30 days ▾ │
├──────────┬──────────┬──────────┬────────────┤
│ 847      │ +23      │ 12       │ 3          │
│ Total    │ New this │ Active   │ Connected  │
│ Users    │ week     │ now      │ Apps       │
├─────────────────────────────────────────────┤
│  Signups over time  [chart]                 │
├──────────────────────┬──────────────────────┤
│  By App              │  Sign-in methods     │
│  app-a.com  412 ████ │  GitHub  54%         │
│  app-b.com  289 ███  │  Google  31%         │
│  app-c.com  146 ██   │  OTP     15%         │
└──────────────────────┴──────────────────────┘

Scope for v0.3

  • /admin/analytics page with portfolio overview cards
  • Signup trend chart (last 30/90 days, per app toggle)
  • Connected apps breakdown table
  • Cross-app user count (users on 2+ apps)
  • Churn signal list (inactive 30+ days)

Out of scope (future)

  • Event tracking (pageviews, custom events) — that's a different tool
  • Email campaigns to churned users
  • Revenue analytics (needs Stripe integration first)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions