A secure, private web application for voluntary photo rating. Users submit their own photos and receive ratings from authenticated community members.
- Private & Secure: No guest access, no public endpoints
- Voluntary Only: Users must upload their own photo and consent to participation
- Smart Voting: One vote per user per profile, never show duplicates
- Photo Safety: File validation, size limits, and MIME type checking
- Admin Controls: Delete inappropriate content and ban users
- Rate Limiting: Protection against abuse
- Modern UI: Smooth, intuitive interface with Tailwind CSS
- Node.js 18+
- Supabase account (free)
- Vercel account (for deployment, optional)
-
Install dependencies:
npm install
-
Create
.env.local:NEXT_PUBLIC_SUPABASE_URL=your_url NEXT_PUBLIC_SUPABASE_ANON_KEY=your_key NEXT_PUBLIC_ADMIN_EMAIL=your@email.com
-
Run development server:
npm run dev
-
Open browser: http://localhost:3000
See SETUP_GUIDE.md for:
- Complete Supabase configuration
- Database schema setup
- Google OAuth configuration
- Vercel deployment instructions
- Troubleshooting guide
/auth/login- Sign up / login/feed- Rate profiles (Smash or Pass)/upload- Upload your own photo/profile- View your profile and stats/admin- Admin dashboard (admin only)
POST /api/votes- Record a voteGET /api/profiles- Fetch unrated profilesPOST /api/upload- Upload photoGET /api/user-profile- Get user statsPOST /api/reports- Report inappropriate profileGET/DELETE /api/admin/profiles- Admin profile managementPOST /api/admin/ban-user- Ban user
- β Email & Google OAuth authentication via Supabase
- β All routes require authentication
- β Image MIME type validation
- β File size limits (10MB)
- β Dimension limits (2000x2000px max)
- β Rate limiting on API endpoints
- β Required consent checkbox
- β Input sanitization
- β No search engine indexing
- β SQL injection prevention (parameterized queries)
- β Row-level security (RLS) in database
- Frontend: Next.js 14, React, Tailwind CSS
- Backend: Next.js API Routes
- Auth: Supabase Auth
- Database: PostgreSQL (Supabase)
- Storage: Supabase Storage
- Deployment: Vercel
- ProtectedRoute - Authentication guard wrapper
- Navigation - Header with nav links and logout
- FeedCard - Profile swiping interface
- PhotoUploader - File upload with preview
- ProfileCard - User stats display
- AdminPanel - Content moderation interface
id- UUID primary keyuser_id- References auth.usersphoto_url- Storage URLconsent_given- Boolean (always true)created_at- Timestamp
id- UUID primary keyvoter_id- References auth.userstarget_profile_id- References profilesvote_type- 'smash' or 'pass'created_at- Timestamp
id- UUID primary keyprofile_id- References profilesreporter_id- References auth.usersreason- Report explanationcreated_at- Timestamp
Deploy to Vercel:
- Push code to GitHub
- Import repository in Vercel
- Add environment variables:
NEXT_PUBLIC_SUPABASE_URLNEXT_PUBLIC_SUPABASE_ANON_KEYNEXT_PUBLIC_ADMIN_EMAIL
- Deploy
- Update Supabase auth redirect URLs
npm run build
npm run startnpm run lint| Variable | Required | Description |
|---|---|---|
NEXT_PUBLIC_SUPABASE_URL |
Yes | Your Supabase project URL |
NEXT_PUBLIC_SUPABASE_ANON_KEY |
Yes | Supabase anonymous public key |
NEXT_PUBLIC_ADMIN_EMAIL |
No | Email for admin panel access |
- File size: 10MB max
- Dimensions: 2000x2000px max
- Rate: 3 uploads per 24 hours
- Formats: JPEG, PNG, WebP
- General: 30 requests per minute per IP
- One vote per user per profile
- Vote types: 'smash' or 'pass'
- No vote changes allowed
Can't login?
- Verify credentials in Supabase Auth
- Check email confirmation
Photos not uploading?
- Check file size and format
- Verify storage bucket exists in Supabase
Admin panel not accessible?
- Verify
NEXT_PUBLIC_ADMIN_EMAILmatches your email - Restart dev server after env changes
Votes not working?
- Check browser console for errors
- Verify database tables exist
MIT License - See LICENSE file
This is a private application. For customization, modify the code directly.
Refer to:
- SETUP_GUIDE.md for detailed instructions
- Supabase Docs
- Next.js Docs
Built with β€οΈ for safe, consensual community rating