India's fashion discovery engine for Instagram-native D2C brands
A production-ready platform that aggregates 250+ digital-first fashion brands, enables advanced filtering, and redirects traffic to original brand websites.
🚫 NOT a marketplace - Discovery + Filtering + Redirection only
- ✅ Advanced Filtering - Filter by category, price band, aesthetic, fit, fabric, and more
- ✅ Smart Ranking - Algorithm-based brand scoring using signals (IG native, Meta ads, drops, etc.)
- ✅ Redirect Tracking - Analytics on clicks, referrers, and UTM parameters
- ✅ Responsive Design - Beautiful, modern UI built with Next.js and Tailwind CSS
- 🤖 Meta Ads Discovery - Find brands advertising on Meta platforms
- 🛍️ Shopify Detection - Identify D2C Shopify stores
- 📱 Instagram Integration - Discover Instagram-native brands
- 🏪 Marketplace Mining - Extract brands from Furrl, LBB, Shiprocket Discover
- ⚡ Auto-Approval - Brands with score ≥7 auto-approved weekly
- Frontend: Next.js 14 (App Router), React, TypeScript, Tailwind CSS
- Backend: Next.js API Routes
- Database: PostgreSQL 15 (via Homebrew)
- Icons: Lucide React
- Deployment: Vercel (recommended)
brew install postgresql@15
brew services start postgresql@15/opt/homebrew/opt/postgresql@15/bin/createdb fashion_discoverycd /path/to/clothing
npm installCreate .env.local (optional - defaults work for local PostgreSQL):
DB_HOST=localhost
DB_PORT=5432
DB_NAME=fashion_discovery
DB_USER= # Leave empty to use current user
DB_PASSWORD=/opt/homebrew/opt/postgresql@15/bin/psql -d fashion_discovery -f supabase/migrations/001_initial_schema.sql
/opt/homebrew/opt/postgresql@15/bin/psql -d fashion_discovery -f supabase/migrations/002_seed_data.sql
/opt/homebrew/opt/postgresql@15/bin/psql -d fashion_discovery -f supabase/migrations/003_increment_function.sqlnpm run db:seedThis will add 10 sample brands with tags.
npm run devclothing/
├── src/
│ ├── app/
│ │ ├── api/
│ │ │ ├── brands/route.ts # Brand search & filter API
│ │ │ └── r/[slug]/route.ts # Redirect tracking API
│ │ ├── page.tsx # Main page
│ │ └── layout.tsx
│ ├── components/
│ │ ├── BrandCard.tsx # Brand display card
│ │ └── FilterPanel.tsx # Filter sidebar
│ ├── lib/
│ │ ├── db.ts # PostgreSQL client
│ │ └── utils.ts # Ranking & utilities
│ └── types/
│ └── database.ts # TypeScript types
├── scripts/
│ ├── seed-brands.ts # Brand seeding script
│ └── weekly-discovery.ts # Discovery automation
├── supabase/
│ └── migrations/ # Database migrations
└── package.json
- brands - Main brand data with signals and metadata
- categories - Brand categories (Streetwear, Formals, etc.)
- tags - Filterable tags (fit, aesthetic, fabric, etc.)
- brand_tags - Many-to-many relationship
- redirects - Click tracking and analytics
- discovery_queue - Automated brand discovery queue
- Category, price band, slug, active status
- Tag categories and applicability
- Redirect timestamps for analytics
Search and filter brands.
Query Parameters:
category- Comma-separated category slugsprice- Comma-separated price bands (₹, ₹₹, ₹₹₹, ₹₹₹₹)tags- Comma-separated tag slugssearch- Brand name searchsort-relevance|popular|newlimit- Results per page (default: 50)offset- Pagination offset
Response:
{
"brands": [...],
"total": 250,
"filters": {
"categories": [...],
"priceBands": [...],
"availableTags": [...]
}
}Redirect to brand website with tracking.
Query Parameters (optional):
utm_source,utm_medium,utm_campaign
Response: 302 redirect to brand website
npm run discovery:runThis will:
- Search Meta Ads Library for fashion brands
- Crawl Shopify stores
- Mine marketplaces (Furrl, LBB, etc.)
- Score and add brands to discovery queue
- Auto-approve brands with score ≥7
| Signal | Points |
|---|---|
| Meta Ads Active | +3 |
| Shopify-backed | +2 |
| Limited Drop Language | +2 |
| Instagram Native | +2 |
| No Offline Stores | +1 |
Auto-approval threshold: 7+ points
# Development
npm run dev # Start dev server (port 3000)
# Database
npm run db:seed # Seed sample brands
# Discovery
npm run discovery:run # Run brand discovery
# Production
npm run build # Build for production
npm start # Start production server# Start
brew services start postgresql@15
# Stop
brew services stop postgresql@15
# Restart
brew services restart postgresql@15/opt/homebrew/opt/postgresql@15/bin/psql -d fashion_discovery-- Count brands
SELECT COUNT(*) FROM brands;
-- View all categories
SELECT * FROM categories ORDER BY display_order;
-- Top brands by clicks
SELECT name, total_clicks FROM brands ORDER BY total_clicks DESC LIMIT 10;
-- Discovery queue status
SELECT status, COUNT(*) FROM discovery_queue GROUP BY status;- Set up a PostgreSQL database (Railway, Supabase, Neon, etc.)
- Push to GitHub
- Import project in Vercel
- Add environment variables:
DB_HOSTDB_PORTDB_NAMEDB_USERDB_PASSWORD
- Run migrations on remote database
- Deploy
The system is designed to scale:
- Database Indexes - Optimized for fast filtering
- Connection Pooling - 20 max connections
- Pagination - Built-in limit/offset
- Discovery Automation - Weekly brand ingestion
- CDN - Vercel Edge for static assets
- Search/filter queries: <200ms
- Redirect tracking: <100ms
- Discovery run: <5 minutes
brew services restart postgresql@15Check if PostgreSQL is running:
brew services list | grep postgresql/opt/homebrew/opt/postgresql@15/bin/dropdb fashion_discovery
/opt/homebrew/opt/postgresql@15/bin/createdb fashion_discovery
# Then re-run migrations- Add brand data to
scripts/seed-brands.ts - Run
npm run db:seed
- Add to
supabase/migrations/002_seed_data.sql - Re-run migration
- Update
FilterPanel.tsxif needed
MIT
For issues or questions, open a GitHub issue.
Built with ❤️ for India's fashion ecosystem