Overview
The Analytics page aggregates data fromplatform_connections, scraped_media, and taxonomy_mapping to provide insights into content performance, fan engagement, and growth trends.
Page: dashboard/src/pages/Analytics/index.jsxCollections:
platform_connections, scraped_media, taxonomy_mapping, fan_profiles
Metrics Tracked
Top-Level Stats
| Metric | Source | Calculation |
|---|---|---|
| Total Likes | scraped_media.likes_count | Sum across all media |
| Total Comments | scraped_media.comments_count | Sum across all media |
| Total Followers | platform_connections.follower_count | Sum across all connected platforms |
| Monthly Revenue | platform_connections.monthly_revenue_est | Sum of subscription estimates |
dashboard/src/pages/Analytics/index.jsx:102-106
Platform Performance
Ranked bar chart showing:- Platform name (from
platform_connections.platform) - Follower count
- Average likes per post
- Engagement rate (
(likes + comments) / followers)
Top Content Tags
Source:taxonomy_mapping collection (links media to 6-concept taxonomy)Display: Bar chart of top 10 tags by frequency Example tags:
solo, lingerie, POV, outdoor, teasing
Top Content by Likes
List of top 8 posts ranked bylikes_count:
- Media type (image/video)
- Posted date
- Like count
Content Type Breakdown
Source:scraped_media.media_typeChart: Bar chart showing distribution (image, video, audio, unknown)
Data Loading
API Calls: Parallel fetch on mountUI Components
StatCard
Displays single metric with icon, value, and label. Props:icon— Phosphor icon componentlabel— Metric namevalue— Formatted number (e.g., “12.5K”, “$450”)color— Tailwind text color classloading— Boolean (shows skeleton)
Analytics/index.jsx:28-38
BarChart
Inline sparkline-style horizontal bars. Props:data— Array of objectslabelKey— Field for label (e.g.,"username")valueKey— Field for bar width (e.g.,"followers")color— Tailwind bg color class (e.g.,"bg-brand")
- Auto-scales to max value
- Smooth width transitions (500ms)
- Number formatting (12345 → “12.3K”)
Analytics/index.jsx:41-60
Plan Gating
Feature:analytics_basicRequired Tier:
creator ($49/mo)
Component: <UpgradeGate>Behavior: Shows upgrade prompt if user is on Starter plan
Number Formatting
Helper functions:fmt(12345)→"12.3K"fmt(1500000)→"1.5M"fmtUsd(450)→"$450"
Fan Insights
Page:dashboard/src/pages/FanInsights/index.jsx (separate from Analytics)Collection:
fan_profiles
Fan Profile Schema
| Field | Type | Description |
|---|---|---|
id | UUID | Primary key |
platform | String | Source platform |
username | String | Fan’s username |
display_name | String | Display name |
last_interaction | DateTime | Most recent message/comment |
total_spent | Decimal | Lifetime tips + purchases |
engagement_score | Integer | 0-100 (likes + comments frequency) |
tags | Array | Manual tags (VIP, high-spender, new) |
notes | Text | Creator notes |
Insights Tracked
- Top Spenders — Ranked by
total_spent - Most Engaged — Ranked by
engagement_score - Recent Interactions — Last 10 by
last_interaction - VIP List — Filtered by
tagscontains “VIP”
Taxonomy System
Collections:taxonomy_dimensions— 6 super-concepts (Intimacy, Aesthetic, Activity, Gaze, Location, Extras)taxonomy_mapping— 3,208 classified tags across 6 concepts
Nodes/Universe/taxonomy_graph.json (18 super-concepts, 3,205 nodes)
Revenue Estimation
Field:platform_connections.monthly_revenue_estCalculation:
subscription_price × follower_count × 0.05 (assumes 5% conversion)
Example:
- Platform: OnlyFans
- Followers: 10,000
- Subscription: $9.99/mo
- Estimated revenue:
10000 × 0.05 × 9.99 = $4,995/mo
Performance Optimization
Data Limits
scraped_media: 100 most recent (sorted bylikes_count)taxonomy_mapping: 500 most recentplatform_connections: 20 max
Caching Strategy
Current: No caching (live data on every load)Future: 5-minute cache in Redis for aggregates
Refresh Button
Component:<ArrowsClockwise> icon button (top-right)Behavior: Calls
load() → Re-fetches all data → Updates UI
Empty States
Trigger: No data in collections (e.g., new user, no scrapes yet) UI: Centered message with icon:- “No platform data — connect a platform first.”
- “No taxonomy tags yet — run a scrape and analysis.”
- “No scraped media yet.”
Related
- Platform Scraping — Data source for analytics
- Dashboard — Main navigation
- AI Agent — Query analytics via chat
