Built for DAHACKS 4.0 Hackathon
A modern platform connecting brands with content creators through AI-powered bounty campaigns. Businesses create bounties for user-generated content (UGC), and creators submit videos from YouTube, TikTok, and Instagram to earn rewards based on view performance.
UGC Platform revolutionizes the way brands collaborate with content creators. Instead of traditional fixed-rate partnerships, brands can create dynamic bounties with view-based pricing, ensuring they only pay for actual engagement. Our AI-powered validation system ensures quality content that truly represents the brand.
- π€ AI-Powered Content Validation: Uses Google Gemini AI to automatically validate submissions against bounty requirements
- π Real-Time View Tracking: Integrates with YouTube Data API and Peekalink for TikTok to track live view counts
- π° Dynamic Payout System: Automatic calculation of earnings based on views (rate per 1k views)
- π₯ Dual-Role Platform: Separate experiences for creators and businesses
- π― Multi-Platform Support: YouTube, TikTok, and Instagram integration
- π Progress Tracking: Real-time dashboard showing bounty progress, submissions, and earnings
- π Secure Authentication: Powered by Clerk for enterprise-grade user management
- π¨ Modern UI/UX: Beautiful, responsive design with dark/light mode support
- Next.js 16 (App Router) - React framework with server-side rendering
- React 19 - Latest React with improved performance
- TypeScript - Type-safe development
- Tailwind CSS 4 - Utility-first CSS framework
- Framer Motion - Smooth animations and transitions
- Shadcn/ui - Beautiful, accessible component library
- Supabase - PostgreSQL database with real-time capabilities
- Clerk - Authentication and user management
- Google Gemini AI - Content validation and moderation
- YouTube Data API v3 - Video metadata and view tracking
- Peekalink API - TikTok video data extraction
- LinkPreview.net API - Link metadata extraction
- Vercel - Hosting and deployment
- Supabase Storage - File uploads (logos, assets)
- Create Bounties: Set up campaigns with custom requirements, budgets, and rates
- Upload Brand Assets: Add company logos and branding
- Monitor Progress: Track submission counts, view totals, and budget usage
- Approve/Reject Submissions: Review and manage creator submissions
- Billing Dashboard: Manage funds and track spending
- Browse Feed: Discover available bounties with search and filtering
- Submit Content: Upload videos from YouTube, TikTok, or Instagram
- Track Earnings: Monitor submission status, views, and earned amounts
- Profile Management: Build your creator portfolio
- Payout System: Request and manage earnings
Businesses create bounties specifying:
- Campaign name and description
- Requirements (e.g., "Show our product in use")
- Total budget
- Rate per 1,000 views
- Company branding
Creators browse the feed and submit videos by:
- Providing a video URL (YouTube/TikTok/Instagram)
- Platform automatically extracts metadata
- System validates URL format and platform
Our AI system validates submissions by:
- Analyzing video content against bounty requirements
- Checking for requirement fulfillment (product placement, mentions, etc.)
- Providing feedback for rejected submissions
Automatic view tracking:
- Real-time synchronization with platform APIs
- Calculates earnings:
(views / 1000) Γ rate_per_1k_views - Updates progress and payout amounts
- Creators earn based on approved submission views
- Bounties complete when budget is fully utilized
- Real-time progress tracking and notifications
- Node.js 18+ and npm/yarn/pnpm
- Supabase account
- Clerk account
- Google Gemini API key
- YouTube Data API key
- LinkPreview.net API key
- Peekalink API key (optional, for TikTok)
Create a .env.local file in the ugc-platform directory:
# Clerk Authentication
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=your_clerk_publishable_key
CLERK_SECRET_KEY=your_clerk_secret_key
# Supabase
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key
# AI & APIs
GEMINI_API_KEY=your_gemini_api_key
YOUTUBE_API_KEY=your_youtube_api_key
LINKPREVIEW_API_KEY=your_linkpreview_api_key
PEEKALINK_API_KEY=your_peekalink_api_key
# Clerk Webhook (for production)
CLERK_WEBHOOK_SECRET=your_webhook_secret
# Stripe Payment Processing
STRIPE_SECRET_KEY=sk_test_your_stripe_secret_key
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_your_stripe_publishable_key
STRIPE_WEBHOOK_SECRET=whsec_your_webhook_signing_secret-
Navigate to the platform directory:
cd ugc-platform -
Install dependencies:
npm install # or yarn install # or pnpm install
-
Set up Supabase:
- Run migrations from
supabase/migrations/in your Supabase project - Enable Row Level Security (RLS) policies
- Create storage buckets for assets
- Run migrations from
-
Configure Clerk:
- Set up Clerk application
- Configure webhook endpoint:
/api/webhooks/clerk - Add environment variables
-
Run the development server:
npm run dev # or yarn dev # or pnpm dev
-
Open your browser: Navigate to http://localhost:3000
ugc-platform/
βββ src/
β βββ app/ # Next.js App Router pages
β β βββ api/ # API routes
β β βββ dashboard/ # User dashboard
β β βββ feed/ # Bounty feed
β β βββ profile/ # User profiles
β β βββ creator/ # Creator-specific pages
β β βββ business/ # Business-specific pages
β β βββ onboarding/ # Role selection
β βββ components/ # React components
β βββ lib/ # Utilities and helpers
β β βββ supabase-server.ts # Server-side Supabase client
β β βββ supabase-utils.ts # Database utilities
β β βββ bounties.ts # Bounty management
β βββ types/ # TypeScript definitions
βββ supabase/
β βββ migrations/ # Database migrations
βββ public/ # Static assets
GET /api/bounties- List all bountiesPOST /api/bounties- Create a new bountyGET /api/bounties/[id]- Get bounty detailsGET /api/bounties/[id]/submissions- Get submissions for a bounty
GET /api/submissions- Get user's submissionsPOST /api/submit-bounty-item- Submit content to a bountyPUT /api/submissions/[id]- Update submission status
POST /api/validate-bounty- Validate video against requirements (AI-powered)
GET /api/youtube-views?url=...- Get YouTube video viewsGET /api/tiktok-views?url=...- Get TikTok video views
POST /api/payments/create-intent- Create Stripe payment intent for adding fundsGET /api/wallet/balance- Get current wallet balanceGET /api/transactions- Get transaction historyPOST /api/payouts/create- Create payout request (creators)GET /api/payouts- Get payout historyPOST /api/webhooks/stripe- Stripe webhook handler for payment events
- Responsive Design: Mobile-first approach, works seamlessly on all devices
- Dark/Light Mode: System preference detection with manual toggle
- Smooth Animations: Framer Motion for polished interactions
- Accessibility: WCAG compliant components from Shadcn/ui
- Real-time Updates: Live data synchronization across platform
- Loading States: Comprehensive loading and error handling
- Authentication: Clerk-powered secure authentication
- Authorization: Role-based access control (Creator/Business)
- Row Level Security: Supabase RLS policies for data protection
- Service Role Isolation: Server-side operations use service role key
- Input Validation: Comprehensive validation for all user inputs
- CORS Protection: Secure API endpoint configuration
- Push your code to GitHub
- Import project in Vercel
- Add environment variables
- Deploy!
The platform is optimized for Vercel's edge network and serverless functions.
Run Supabase migrations in your production database:
# Using Supabase CLI
supabase db pushKey tables:
bounties- Campaign informationsubmissions- Creator content submissionsuser_profiles- User account dataplatform_views- View tracking cache
All tables use UUID primary keys and include timestamps for audit trails.
This project was built for DAHACKS 4.0. For questions or improvements:
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
This project was created for DAHACKS 4.0 Hackathon.
Built with β€οΈ for DAHACKS 4.0
- TikTok and Instagram direct API integration - Full API integration with TikTok (Direct API, Research API, Peekalink fallback) and Instagram (Graph API, oEmbed fallback)
- Advanced analytics dashboard - Comprehensive analytics with time series charts, platform breakdowns, earnings tracking, and trend analysis for both creators and businesses
- Payment gateway integration (Clerk) - UI components ready, needs full payment processing implementation
- Email notifications - Automated emails for submission approvals/rejections, bounty completions, and earnings updates
- Creator reputation system - Rating and review system based on submission quality, approval rates, and performance metrics
- Bounty recommendation engine - AI-powered matching system to suggest relevant bounties to creators based on their content style and past performance
- Real-time chat system - Direct messaging between creators and businesses for collaboration and feedback
- Mobile app (React Native) - Native mobile application for iOS and Android
- Advanced search and filtering - Enhanced bounty discovery with tags, categories, and smart filters
- Bulk submission management - Tools for creators to submit multiple videos at once
- Content scheduling - Schedule submissions for optimal timing
- Performance insights - Detailed analytics on video performance, engagement rates, and ROI
- Multi-language support - Internationalization for global user base
- API for third-party integrations - Public API for external tools and integrations
- Webhook system - Real-time webhooks for submission status changes and bounty updates
- Advanced moderation tools - Enhanced AI validation with custom rules and thresholds
- Creator portfolio showcase - Public profiles showcasing creator's best work and statistics
- Bounty templates - Pre-built templates for common campaign types
- TikTok API requires Peekalink subscription for full functionality
- Instagram API access is limited (using LinkPreview as fallback)
- Real-time view updates may have slight delays depending on platform APIs
For hackathon-related questions or issues, please refer to the project documentation or contact the team.
Built with Next.js, Supabase, Clerk, and Google Gemini AI
Making UGC campaigns smarter, fairer, and more efficient π