A comprehensive influencer marketplace platform that connects brands with content creators for user-generated content campaigns.
- Multi-Role System: Brands, Influencers, and Admin roles with specialized dashboards
- Advanced Authentication: OAuth (Google, LinkedIn, Instagram) + email/password
- Role-Based Access Control: Secure permissions and workflow management
- Campaign Management: Create and manage UGC campaigns
- Influencer Discovery: Search and filter influencers by niche, metrics, and demographics
- Contract Management: Automated contract generation and digital signatures
- Payment Processing: Escrow-based payment system with Stripe integration
- Analytics Dashboard: Campaign performance tracking and ROI analysis
- Profile Builder: Comprehensive portfolio and metrics display
- Campaign Discovery: Browse and apply to relevant campaigns
- Content Submission: Upload and manage content deliverables
- Application Tracking: Monitor application status and communication
- Earnings Dashboard: Track payments and financial analytics
- Frontend: Next.js 14 with TypeScript and Tailwind CSS
- Backend: Next.js API Routes with Prisma ORM
- Database: PostgreSQL with comprehensive schema
- Authentication: NextAuth.js with multiple OAuth providers
- Payments: Stripe Connect for escrow and marketplace payments
- UI Components: Radix UI with custom Tailwind styling
crystal/
βββ src/
β βββ app/ # Next.js app router
β β βββ (auth)/ # Authentication pages
β β βββ dashboard/ # User dashboards
β β βββ api/ # API routes
β β βββ globals.css # Global styles
β βββ components/ # Reusable components
β β βββ ui/ # Base UI components
β β βββ forms/ # Form components
β β βββ layouts/ # Layout components
β β βββ providers/ # Context providers
β βββ lib/ # Utilities and configurations
β β βββ auth.ts # NextAuth config
β β βββ db.ts # Prisma client
β β βββ utils.ts # Helper functions
β βββ types/ # TypeScript type definitions
β βββ prisma/ # Database schema and migrations
βββ public/ # Static assets
βββ docs/ # Project documentation
- Node.js 18+
- PostgreSQL database
- npm or yarn
-
Clone and setup
git clone <repository-url> cd crystal npm install
-
Environment setup
cp .env.example .env.local # Configure your environment variables -
Database setup
npm run db:generate npm run db:push
-
Start development
npm run dev
Visit http://localhost:3000 to see the application.
Key environment variables to configure in .env.local:
# Database
DATABASE_URL="postgresql://username:password@localhost:5432/crystal_db"
# NextAuth.js
NEXTAUTH_SECRET="your-secret-key"
NEXTAUTH_URL="http://localhost:3000"
# OAuth Providers
GOOGLE_CLIENT_ID="your-google-client-id"
GOOGLE_CLIENT_SECRET="your-google-client-secret"
LINKEDIN_CLIENT_ID="your-linkedin-client-id"
LINKEDIN_CLIENT_SECRET="your-linkedin-client-secret"
# Stripe
STRIPE_PUBLISHABLE_KEY="pk_test_your-key"
STRIPE_SECRET_KEY="sk_test_your-key"The platform uses a comprehensive PostgreSQL schema with:
- Users & Profiles: Multi-role user system with specialized profiles
- Campaigns: Campaign management with requirements and deliverables
- Applications: Application workflow with status tracking
- Contracts: Smart contract management with payment schedules
- Payments: Escrow-based payment processing
- Reviews: Multi-dimensional rating system
- Messages: In-app communication system
# Development
npm run dev # Start development server
npm run build # Build for production
npm run start # Start production server
# Database
npm run db:generate # Generate Prisma client
npm run db:push # Push schema to database
npm run db:migrate # Run migrations
npm run db:studio # Open Prisma Studio
# Code Quality
npm run lint # Run ESLint
npm run type-check # TypeScript type checkingPhase 1 Foundation - β Complete
- β Next.js 14 + TypeScript setup
- β Tailwind CSS UI framework
- β Prisma + PostgreSQL configuration
- β NextAuth.js authentication system
- β Role-based user management
- β Basic UI components library
- β Authentication pages (login/signup)
- β Dashboard layouts for brands and influencers
Phase 2 Core Features - β Complete
- β Brand profile management with company details
- β Influencer profile management with portfolio
- β Campaign creation and management system
- β Campaign browsing and discovery for influencers
- β Application workflow and management
- β Contract generation and status tracking
- β Stripe payment processing integration
- β Content submission and review workflow
- β Real-time messaging system
- β Search and filtering capabilities
Platform Statistics
- π 15+ complete user interfaces
- π 20+ API endpoints
- ποΈ Comprehensive database schema (15+ tables)
- π Secure authentication with OAuth
- π³ Payment processing with Stripe
- π± Responsive design for all devices
Phase 3 Advanced Features - β Complete
- β Multi-dimensional review and rating system with trust scores
- β Analytics and reporting dashboard for brands and influencers
- β Admin dashboard with platform management tools
- β Testing infrastructure setup with Jest and React Testing Library
- β Production-ready deployment configuration
Phase 4 Enterprise Features - β COMPLETE
- AI-Powered Content Moderation: Real-time content analysis with keyword detection and visual analysis
- Brand Safety Rules: Customizable compliance rules with severity-based actions and automatic rejection
- Legal Requirement Validation: Comprehensive checking for disclosures, age restrictions, and regulations
- Compliance Dashboard: Complete management interface for rules, violations, and manual review workflows
- Automated Workflows: Smart escalation system with human review for flagged content
- Multi-Dimensional Scoring Algorithm: 10 metrics including performance, engagement, quality, consistency, growth, trust, and professionalism
- 5-Tier Progression System: Bronze β Silver β Gold β Platinum β Diamond levels with visual progression
- Achievement Badges: 5 categories of badges (Performance, Engagement, Quality, Consistency, Growth)
- Global & Niche Rankings: Comprehensive leaderboards with trend tracking and historical performance
- Gamification Elements: Competitive features driving platform engagement and retention
- Statistical Significance Testing: Proper p-value calculations with confidence intervals
- Multi-Variant Experiments: Support for creative, copy, offer, and targeting tests
- Real-Time Conversion Tracking: Automatic metric calculation with live results
- AI-Powered Recommendations: Intelligent insights based on test performance and data patterns
- Comprehensive Reporting: Winner declaration, uplift calculations, and performance optimization
- Multi-Platform Support: Instagram, TikTok, YouTube, Twitter, LinkedIn, Facebook integration
- Auto-Posting Capabilities: Scheduled publishing with content validation and optimization
- Cross-Platform Analytics: Unified analytics with demographic insights and performance metrics
- Account Management: OAuth authentication with secure token refresh and permission management
- Rate Limiting Compliance: Platform-specific rate limiting and content guidelines enforcement
- Custom Dashboard Builder: Drag-and-drop interface with configurable widgets and filters
- Real-Time Data Visualization: Multiple chart types (line, bar, pie, area, scatter, heatmap)
- Predictive Analytics: AI-powered trend forecasting with anomaly detection and opportunity identification
- Custom Report Generation: Automated report creation with scheduling and distribution options
- Performance Optimization: AI recommendations for content strategy and campaign improvements
- Multi-Format Content Creation: Captions, hashtags, scripts, emails, and social media posts
- Platform-Specific Optimization: Tailored content for each social media platform with optimal formats
- Quality Analysis: Engagement prediction, compliance checking, and content quality scoring
- Content Templates: Reusable templates with variable substitution and performance tracking
- Intelligent Optimization: AI-powered content improvement suggestions and A/B testing recommendations
- Multi-User Account Management: Role-based permissions with granular access control
- Campaign Collaboration: Seamless workflow between brands, influencers, and team members
- Real-Time Notifications: Server-Sent Events for instant updates and communication
- Workflow Management: Content approval processes with multi-stage review and feedback systems
Platform Statistics
- π 40+ complete user interfaces
- π 50+ API endpoints with full CRUD operations
- ποΈ Comprehensive database schema (20+ tables)
- π Secure authentication with OAuth + role-based access
- π³ Full Stripe payment processing with escrow
- π± Responsive design with mobile optimization
- π§ͺ Testing infrastructure with 95%+ coverage goal
- π Advanced analytics and reporting
- π Complete admin panel for platform oversight
- π€ AI-powered content generation and analysis
- π Gamification and ranking systems
- π± Social media integrations for 6+ platforms
- π§ͺ A/B testing platform for campaign optimization
- π‘οΈ Enterprise-grade content compliance system
Technology Stack Summary
- Frontend: Next.js 14, TypeScript, Tailwind CSS, Radix UI
- Backend: Next.js API Routes, Prisma ORM, PostgreSQL
- Authentication: NextAuth.js with OAuth providers
- Payments: Stripe Connect with escrow system
- Database: PostgreSQL with comprehensive relational schema
- Testing: Jest, React Testing Library, custom mocks
- Infrastructure: Production-ready with environment configs
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the ISC License - see the package.json file for details.
For questions or support:
- Create an issue in the repository
- Check the documentation in
/docs - Review the database schema in
/prisma/schema.prisma