A comprehensive role-based modeling agency website built with Next.js, TypeScript, Tailwind CSS, ShadCN, and PostgreSQL.
- Models: Portfolio management, booking system, analytics
- Clients: Model discovery, project posting, direct booking
- Agencies: Team management, white-label options, advanced tools
- Admins: Full platform management and analytics
- Free: Basic profile, 5 photos, community access
- Professional ($29/month): Unlimited photos, priority search, booking system, analytics
- Enterprise ($99/month): API access, white-label, team management, dedicated support
- β Modern responsive design with Tailwind CSS
- β Component library with ShadCN/UI
- β Advanced search and filtering
- β Real-time messaging system
- β Secure payment processing (Stripe)
- β Portfolio builder with image management
- β Booking and project management
- β Review and rating system
- β Advanced analytics dashboard
- β Mobile-optimized interface
- Frontend: Next.js 15, React 19, TypeScript
- Styling: Tailwind CSS 4, ShadCN/UI
- Database: PostgreSQL with Prisma ORM
- Authentication: NextAuth.js
- Payment: Stripe
- File Upload: Cloudinary/AWS S3
- Deployment: Vercel (recommended)
- Node.js 18+
- PostgreSQL database
- npm or yarn
git clone <your-repo>
cd modeling
npm installCopy the example environment file:
cp .env.example .env.localUpdate .env.local with your configuration:
# Database
DATABASE_URL="postgresql://username:password@localhost:5432/modeling_agency?schema=public"
# NextAuth.js
NEXTAUTH_URL="http://localhost:3000"
NEXTAUTH_SECRET="your-super-secret-nextauth-secret-here"
# Optional: OAuth Providers
GOOGLE_CLIENT_ID=""
GOOGLE_CLIENT_SECRET=""
# File Upload (choose one)
CLOUDINARY_CLOUD_NAME=""
CLOUDINARY_API_KEY=""
CLOUDINARY_API_SECRET=""
# Payment Processing
STRIPE_PUBLISHABLE_KEY=""
STRIPE_SECRET_KEY=""
STRIPE_WEBHOOK_SECRET=""Initialize Prisma and run migrations:
npx prisma generate
npx prisma migrate dev --name initOptional: Seed the database with sample data:
npx prisma db seednpm run devVisit http://localhost:3000 to see your application.
modeling/
βββ app/ # Next.js app router
β βββ (auth)/ # Authentication pages
β βββ (dashboard)/ # Protected dashboard pages
β βββ api/ # API routes
β βββ globals.css # Global styles
β βββ layout.tsx # Root layout
β βββ page.tsx # Home page
βββ components/ # Reusable UI components
β βββ ui/ # ShadCN components
β βββ layout/ # Layout components
β βββ forms/ # Form components
βββ lib/ # Utility functions
βββ types/ # TypeScript type definitions
βββ prisma/ # Database schema and migrations
βββ public/ # Static assets
- Primary: Purple gradient (#8B5CF6 β #EC4899)
- Secondary: Neutral grays for text and backgrounds
- Accent: Pink (#EC4899) for highlights and CTAs
- Font: Inter (Google Fonts)
- Headings: Bold, tracking-tight
- Body: Regular weight, good contrast
All UI components are built with ShadCN/UI and are fully customizable.
// Implement role-based access control
const requireAuth = (roles: UserRole[]) => {
// Check user role and permissions
}// Use Cloudinary for image optimization
const uploadImage = async (file: File) => {
// Auto-resize, optimize, and generate thumbnails
}// Implement advanced search with faceted filters
const searchModels = (filters: ModelSearchFilters) => {
// Location, skills, rates, availability
}// Stripe for subscription management
const createSubscription = (tier: MembershipTier) => {
// Handle tier upgrades/downgrades
}// WebSocket for live messaging
const sendMessage = (messageData: Message) => {
// Real-time chat between users
}- Multi-role system (Admin, Model, Client, Agency)
- Flexible profile system with role-specific fields
- Membership tier management
- Unlimited image storage for Pro/Enterprise
- Image optimization and thumbnail generation
- Portfolio categorization and tagging
- Project-based booking workflow
- Status tracking (Pending, Confirmed, Completed)
- Integration with payment system
- Connect your GitHub repository to Vercel
- Add environment variables in Vercel dashboard
- Deploy automatically on push to main branch
DATABASE_URL="your-production-postgres-url"
NEXTAUTH_URL="https://your-domain.com"
NEXTAUTH_SECRET="production-secret"
# ... other production variables- β Input validation with Zod
- β CSRF protection
- β Rate limiting
- β Secure file uploads
- β SQL injection prevention (Prisma)
- β XSS protection
- β Image optimization with Next.js
- β Code splitting and lazy loading
- β CDN for static assets
- β Database query optimization
- β Caching strategies
# Run unit tests
npm run test
# Run integration tests
npm run test:integration
# Run e2e tests
npm run test:e2eThe platform is fully responsive and optimized for mobile devices:
- Touch-friendly interface
- Progressive Web App (PWA) capabilities
- Offline functionality for basic features
GET /api/models- Search and filter modelsPOST /api/models- Create model profilePUT /api/models/:id- Update model profile
GET /api/bookings- Get user bookingsPOST /api/bookings- Create new bookingPUT /api/bookings/:id/status- Update booking status
POST /api/payments/create-checkout- Create Stripe checkoutPOST /api/payments/webhook- Handle Stripe webhooks
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Submit a pull request
MIT License - see LICENSE file for details.
- π§ Email:
- π¬ Discord:
- π Documentation:
ModelHub - Connecting talent with opportunity in the modeling industry. β¨