Project Name: StreamScope Type: Full-stack web application (Frontend + Backend) Core Functionality: A CTV viewing companion that generates detailed viewing reports and provides cross-platform recommendations by analyzing user's entire streaming history across Netflix, HBO Max, Hulu, Disney+, and Amazon Prime. Target Users: CTV subscribers who want data-driven insights into their viewing habits and smarter recommendations.
- Technology: Single-page HTML/CSS/JS (deployable to GitHub Pages)
- Design: Apple-inspired light theme with clean, professional aesthetic
- Features: Interactive dashboard, animated charts, clickable recommendations
- Technology: Python + FastAPI
- Database: SQLite (simple, file-based, no setup required)
- API: RESTful JSON endpoints
- Deployment: GitHub Actions + Container
- Background:
#ffffff,#f5f5f7 - Surface:
#ffffff - Primary:
#0071e3(Apple Blue) - Secondary:
#34c759(Success Green) - Accent:
#ff9500(Orange) - Text Primary:
#1d1d1f - Text Secondary:
#86868b
- Font Family: SF Pro Display, SF Pro Text (system fonts)
- Headings: SF Pro Display, bold
- Body: SF Pro Text, regular
- Data/Metrics: SF Mono (monospace)
┌─────────────────────────────────────────────────────────┐
│ SIDEBAR: Logo + User + Connected Services + Stats │
├─────────────────────────────────────────────────────────┤
│ HEADER: Navigation Tabs + Last Synced │
├─────────────────────────────────────────────────────────┤
│ │
│ MAIN CONTENT AREA │
│ - Dashboard View (default) │
│ - Reports View │
│ - Discover View (clickable recommendations) │
│ │
└─────────────────────────────────────────────────────────┘
- Dashboard - Overview metrics
- Reports - Detailed viewing reports
- Discover - Cross-platform recommendations with direct links
- Total Watch Time: Large metric card with hours/minutes
- Connected Platforms: Sidebar showing synced streaming services
- Top Categories: Donut chart with percentages
- Weekly Trend: Bar chart showing last 7 days viewing
- Platform Breakdown: Horizontal bars per platform
- Top Actors: Ranked list with watch hours
- Time Period Selector: Weekly / Monthly / All Time
- Category Breakdown: Animated progress bars
- Actor Analysis: Top actors with watch time
- Director Insights: Top directors
- Peak Viewing Times: Heat map of hours vs days
- Algorithm: Content-based filtering hybrid
- Input: Combined viewing history from all platforms
- Output: Ranked list of shows/movies with match percentage
- Clickable Links: Direct URLs to streaming platform pages
- Reason Cards: "Because you watched X", "Your favorite actor Y is in this"
- Platform Badges: Which platforms have the recommended content
- Similarity Score: 0-100% match indicator
- Watch CTA: "Watch on [Platform]" button linking to real URLs
{
"id": "user_001",
"name": "Chloe",
"platforms": ["netflix", "hbo_max", "hulu", "disney_plus", "prime"],
"created_at": "2024-01-15T00:00:00Z"
}{
"id": "view_001",
"user_id": "user_001",
"title": "Stranger Things",
"platform": "netflix",
"category": "Sci-Fi",
"actors": ["Millie Bobby Brown", "Finn Wolfhard"],
"director": "The Duffer Brothers",
"watch_duration_minutes": 720,
"completed": true,
"watched_at": "2024-03-15T20:00:00Z"
}{
"user_id": "user_001",
"period": "monthly",
"start_date": "2024-03-01",
"end_date": "2024-03-31",
"total_watch_time_minutes": 4320,
"total_episodes": 45,
"top_categories": [{"name": "Sci-Fi", "percentage": 35, "watch_time_minutes": 1512}],
"top_actors": [{"name": "Millie Bobby Brown", "hours": 12, "appearances": 3}],
"top_directors": [{"name": "The Duffer Brothers", "hours": 24}],
"platform_breakdown": [{"platform": "netflix", "percentage": 45, "watch_time_minutes": 1944}],
"peak_hours": {"21:00": 45, "22:00": 38},
"binge_sessions": 8
}{
"title": "Dark",
"platform": "netflix",
"match_score": 87,
"reason": "Because you love Stranger Things and Sci-Fi content",
"category": "Sci-Fi",
"actors": ["Louis Hofmann", "Johannes Krischan"],
"director": "Baran bo Odar",
"year": 2017,
"description": "A missing child, a hidden time machine...",
"url": "https://www.netflix.com/title/80238110"
}GET /api/user/{user_id}- Get user profilePOST /api/user- Create userPUT /api/user/{user_id}/platforms- Update subscribed platforms
GET /api/user/{user_id}/history- Get viewing historyPOST /api/user/{user_id}/history- Add viewing entryDELETE /api/user/{user_id}/history/{entry_id}- Remove entry
GET /api/user/{user_id}/reports?period=weekly|monthly|all- Generate report
GET /api/user/{user_id}/recommendations?limit=10- Get recommendationsPOST /api/user/{user_id}/recommendations/refresh- Force refresh
GET /api/health- Health check
Pre-populated with realistic viewing data:
- 35+ viewing entries across Netflix, HBO Max, Hulu, Disney+, Prime Video
- 10 categories (Sci-Fi, Drama, Comedy, Action, Thriller, Documentary, etc.)
- 20+ actors
- 30 days of history
Recommendations include real platform URLs for direct linking.
streamscope/
├── frontend/
│ ├── index.html # Main SPA
│ ├── css/
│ │ └── styles.css # Apple-inspired styles
│ └── js/
│ ├── app.js # Main application logic
│ ├── api.js # API client + mock fallback
│ ├── charts.js # SVG chart rendering
│ └── data.js # Mock data + platform URLs
├── backend/
│ ├── main.py # FastAPI application
│ ├── models.py # Pydantic models
│ ├── database.py # SQLite operations
│ ├── recommendation.py # Recommendation engine
│ ├── seed_data.py # Demo data seeder
│ └── requirements.txt # Python dependencies
├── docker-compose.yml # Container orchestration
├── Dockerfile # Backend container
├── .github/
│ └── workflows/
│ ├── deploy.yml # CI/CD pipeline
│ └── pages.yml # GitHub Pages deployment
├── SPEC.md # This specification
└── README.md # Project documentation
- Dashboard: Shows overview with animated charts and metrics
- Reports: Generates weekly/monthly reports with category/actor analysis
- Recommendations: Cross-platform suggestions with clickable URLs
- UI: Fully functional HTML demo with Apple-inspired light theme
- Backend: FastAPI server with SQLite database
- Deployment: GitHub-ready with Docker and Actions
The application simulates streaming platform integration with:
- Mock viewing history from 5 platforms
- Real recommendation URLs for Netflix, HBO Max, Hulu, Disney+, Prime Video
- Sync simulation (in production, would use OAuth + platform APIs)
- Netflix: Netflix Data API (partner program)
- HBO Max: Warner Bros. Discovery API
- Hulu: Disney Streaming Partner API
- Disney+: Disney Streaming Partner API
- Prime Video: Amazon Associate API