AI-powered platform connecting influencers and brands with virtual try-on capabilities, intelligent ad generation, campaign management, and collaboration features.
- Virtual Try-On Generation: AI-powered virtual try-on with face preservation
- Ad Generation: Intelligent ad composition with quality rating
- Campaign Management: Create and manage marketing campaigns
- Collaboration System: Connect brands with influencers
- Product Management: Manage product catalogs
- AI Recommendations: Product recommendations based on influencer profiles
- Fashion Buddy: AI fashion assistant for styling advice
- Framework: Next.js 15 with App Router
- Database: PostgreSQL (Supabase)
- ORM: Prisma
- Authentication: Supabase Auth
- Storage: Supabase Storage
- AI Services: OpenAI, Nano Banana, Google Gemini
- UI: Tailwind CSS + shadcn/ui
- State Management: Zustand + TanStack Query
- Node.js 18+
- PostgreSQL database (or Supabase account)
- API keys for:
- OpenAI
- Nano Banana
- Google Gemini
- Clone the repository:
git clone <repository-url>
cd tria-production-pilot- Install dependencies:
npm install- Set up environment variables:
cp .env.example .env.localFill in your environment variables in .env.local.
- Set up the database:
npx prisma generate
npx prisma db push- Run the development server:
npm run devOpen http://localhost:3000 in your browser.
src/
├── app/ # Next.js App Router pages
│ ├── (auth)/ # Authentication pages
│ ├── (influencer)/ # Influencer dashboard pages
│ ├── (brand)/ # Brand dashboard pages
│ └── api/ # API routes
├── components/ # React components
│ ├── ui/ # shadcn/ui components
│ └── ... # Feature components
├── lib/ # Utility libraries
│ ├── openai.ts # OpenAI integration
│ ├── nanobanana.ts # Nano Banana integration
│ ├── gemini.ts # Gemini integration
│ ├── storage.ts # Supabase Storage utilities
│ ├── rate-limit.ts # Rate limiting
│ └── ...
└── prisma/ # Prisma schema and migrations
POST /api/auth/register- Register new userPOST /api/auth/login- Login user
POST /api/tryon- Generate virtual try-on
POST /api/ads/generate- Generate ad creativePOST /api/ads/rate- Rate ad qualityPOST /api/ads/improve- Get improvement suggestions
POST /api/campaigns- Create campaignGET /api/campaigns- List campaigns
POST /api/collaborations- Send collaboration requestGET /api/collaborations- List collaborationsPATCH /api/collaborations- Accept/decline collaboration
POST /api/products- Create productGET /api/products- List/search productsPATCH /api/products- Update productDELETE /api/products- Delete productGET /api/products/recommend- Get AI recommendations
POST /api/fashion-buddy/analyze- Analyze outfitPOST /api/fashion-buddy/chat- Chat with AI assistant
GET /api/analytics/influencer- Influencer analyticsGET /api/analytics/brand- Brand analytics
Required environment variables (add to .env.local):
DATABASE_URL: PostgreSQL connection string (Supabase Session Pooler URL)NEXT_PUBLIC_SUPABASE_URL: Supabase project URLNEXT_PUBLIC_SUPABASE_ANON_KEY: Supabase anonymous keySUPABASE_SERVICE_ROLE_KEY: Supabase service role key (for server-side operations)ADMIN_SIGNUP_CODE: Secret code for creating admin accounts (minimum 6 characters, required for admin registration)
OPENAI_API_KEY: OpenAI API key (for GPT-4o mini prompt generation and GPT-4o image analysis)GEMINI_API_KEY: Google Gemini API key (for image generation - Nano Banana / Gemini 3 Pro Image Preview)GEMINI_IMAGE_MODEL: (Optional) Default:gemini-3-pro-image-preview. Options:gemini-2.5-flash-image- Fast, 1024px, up to 3 imagesgemini-3-pro-image-preview- Professional, up to 4K, up to 14 images
The try-on system uses:
- GPT-4o mini: Intelligent prompt generation that analyzes images and creates optimized prompts
- Gemini 3 Pro Image Preview (Nano Banana Pro): High-quality image generation with up to 4K resolution
- Reference Prompts: Stored in
src/lib/prompts/reference-prompts.tsfor training the prompt generator
The database schema is defined in prisma/schema.prisma. Key models include:
User- User accountsInfluencerProfile- Influencer profilesBrandProfile- Brand profilesProduct- ProductsGenerationJob- Try-on generation jobsCampaign- Marketing campaignsAdCreative- Generated ad creativesCollaborationRequest- Collaboration requestsPortfolio- Portfolio itemsNotification- User notifications
- Push your code to GitHub
- Import project in Vercel
- Add environment variables
- Deploy
The app can be deployed to any platform that supports Next.js:
- Netlify
- Railway
- AWS Amplify
- etc.
MIT