A production-ready full-stack influencer intelligence and campaign audit platform built with Next.js, FastAPI, and YouTube Data API integration.
- Frontend Dashboard: CreatorScope AI
- Backend API: Render Backend
- API Health Check: Health Endpoint
- Demo Walkthrough: Watch Demo
- Screenshots: Screenshot Folder
- Creator Search & Discovery: Search creators across YouTube, Instagram, TikTok with real-time filtering
- Campaign Readiness Scoring: AI-driven assessment of creator campaign suitability
- Analytics Dashboard: Real-time stats on tracked creators, engagement metrics, and campaign performance
- Creator Audits: Deep analysis of upload consistency, engagement trends, and risk flags
- Data Export: Download creator analytics in CSV, JSON, or PDF formats
- Live Console: Real-time processing logs via WebSocket streaming
- Fallback Integration: Automatic yt-dlp scraping when YouTube API quota exceeded
- Type-Safe: Full TypeScript implementation with Pydantic validation
- Next.js 16.2.6 with React 19
- TypeScript 5.7.3
- Tailwind CSS v4
- Framer Motion for animations
- Radix UI components (shadcn/ui)
- Custom React hooks for API integration
- FastAPI 0.104.1
- Python 3.12
- YouTube Data API v3
- yt-dlp (fallback scraper)
- Uvicorn ASGI server
- Pydantic v2 validation
- Docker containerization
- Render.com for backend
- Vercel for frontend
- Environment-based configuration
backend/
βββ core/ # Configuration, exceptions, logging
βββ api/routes/ # API endpoints
βββ services/ # Business logic
βββ models/ # Pydantic schemas
βββ utils/ # Rate limiter, cache, formatters
βββ main.py # FastAPI app
βββ requirements.txt
components/dashboard/ # Dashboard components
hooks/ # Custom React hooks
lib/
βββ api.ts # API client
βββ types.ts # TypeScript types
- Node.js 18+ / pnpm
- Python 3.12 / pip
- YouTube Data API key (get from Google Cloud Console)
- Git
- Create virtual environment
cd backend
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate- Install dependencies
pip install -r requirements.txt- Configure environment
cp .env.example .envEdit .env with your YouTube API key:
YOUTUBE_API_KEY=your_api_key_here
ENVIRONMENT=development
DEBUG=true
ALLOWED_ORIGINS=http://localhost:3000- Start backend server
uvicorn main:app --reload --port 8000Backend API: http://localhost:8000
API Docs: http://localhost:8000/docs
- Install dependencies
pnpm install- Configure environment
cat > .env.local << EOF
NEXT_PUBLIC_API_URL=http://localhost:8000
EOF- Start development server
pnpm devFrontend: http://localhost:3000
- Create Render account and new Web Service
- Connect GitHub repository
- Set build command:
pip install -r requirements.txt - Set start command:
uvicorn main:app --host 0.0.0.0 --port 8000 - Add environment variables:
YOUTUBE_API_KEY: Your API keyENVIRONMENT: productionDEBUG: false
- Deploy - auto-deploys on git push
- Create Vercel account
- Import GitHub repository
- Set
NEXT_PUBLIC_API_URLenvironment variable to your Render backend URL - Deploy - auto-deploys on git push
docker build -t creatorscope-api .
docker run -p 8000:8000 \
-e YOUTUBE_API_KEY=your_key \
-e ENVIRONMENT=production \
creatorscope-apiGET /api/health- Service status
GET /api/creators/search- Search creatorsGET /api/creators/{id}- Get creator detailsGET /api/creators/{id}/audit- Run audit
GET /api/analytics/stats- Dashboard stats
POST /api/export/{format}- Create export (csv|json|pdf)GET /api/export/{export_id}/download- Download file
WS /ws/console- Real-time logs
YOUTUBE_API_KEY=your_api_key_here
ENVIRONMENT=development
DEBUG=true
LOG_LEVEL=DEBUG
RATE_LIMIT_DELAY_SECONDS=2
CACHE_TTL_SECONDS=3600
ALLOWED_ORIGINS=http://localhost:3000
NEXT_PUBLIC_API_URL=http://localhost:8000
The backend is hosted on Render's free tier. Free instances spin down after 15 minutes of inactivity.
When the evaluator or first user hits the API after a period of inactivity, the backend will take 30β60 seconds to wake up. This is expected behaviour β not a bug.
What you'll see: The frontend may show a loading spinner or "connectingβ¦" for up to a minute on first load. Subsequent requests are fast.
To pre-warm the backend before a demo, visit:
https://creatorscope-ai.onrender.com/api/health
Wait for {"status": "ok"} before opening the frontend.
Set YOUTUBE_API_KEY in your backend .env. All standard public channel data is accessible without additional authentication.
The yt-dlp fallback supports browser cookie injection for restricted videos:
- Export your YouTube cookies from your browser using the Get cookies.txt extension.
- Save the file as
backend/cookies.txt. - Set the env var:
YT_DLP_COOKIES_PATH=cookies.txt - The yt-dlp service will automatically pass
--cookies cookies.txtwhen this env var is present.
Note: Never commit
cookies.txtto the repository β it is already in.gitignore.
Results are returned as a list of dictionaries and are exportable to CSV or JSON via the /api/export/{format} endpoint.
| Field | Description | Fallback value |
|---|---|---|
channel_id |
Unique YT channel identifier | β |
channel_name |
Display name | β |
subscribers |
Total subscriber count | "Metric restricted" |
total_views |
Lifetime view count | "Metric restricted" |
recent_post_1..5 |
Upload dates (YYYY-MM-DD) of 5 most recent videos | "Date not found" |
engagement_rate |
Calculated engagement % | "Metric restricted" |
campaign_ready |
Boolean audit flag | false |
A pre-generated sample output (5 creators) is in sample_output.csv.
# Health check
curl http://localhost:8000/api/health
# Search creators
curl "http://localhost:8000/api/creators/search?q=mkbhd&platform=youtube&limit=10"
# Get stats
curl http://localhost:8000/api/analytics/stats- Open http://localhost:3000
- Search for creators
- Check WebSocket console logs
- Test export functionality
- Verify stats auto-refresh
- 2-second mandatory delay between YouTube API calls
- Prevents API abuse and quota exhaustion
- 1-hour TTL on creator search results
- Reduces API calls and improves response times
- Automatically switches to yt-dlp when YouTube API quota exceeded
- Maintains service availability during quota limits
System automatically falls back to yt-dlp scraping. Check UI for fallback indicator.
Verify ALLOWED_ORIGINS in backend .env includes your frontend URL.
- Ensure backend is running on port 8000
- Check
NEXT_PUBLIC_API_URLin frontend.env.local
- Backend must be running
- Check network tab in browser DevTools
- Backend changes: Edit in
backend/, server auto-reloads with--reload - Frontend changes: Edit components, Next.js auto-refreshes
- API contract changes: Update both
backend/models/schemas.pyandlib/types.ts - Hook changes: Test hook with component to verify integration
- YouTube API key configured
- Backend running on production server
- Frontend deployed to Vercel
- NEXT_PUBLIC_API_URL set to production backend URL
- ALLOWED_ORIGINS updated with production domain
- DEBUG=false in production backend
- Monitor backend logs for errors
- Set up alerts for API failures
- Test all features on production
- TypeScript strict mode enabled
- Security headers configured
- No browser source maps in production
- Content Security Policy ready
- XSS protection enabled
- Image optimization with AVIF/WebP format support
- Package import optimization
- Experimental optimizePackageImports enabled
- Response compression enabled
- Minified output
MIT