A modern web application for organizing, cataloging, and managing your personal clothing collection. Built with Next.js 14, React 18, TypeScript, and Supabase.
- Clothing Catalog: Add, edit, view, and delete clothing items with detailed metadata
- Image Upload: Drag-and-drop photo upload with automatic resizing and Supabase Storage integration
- Tagging System: Categorize items with customizable tags (color, season, occasion, style, etc.)
- Dashboard: Overview with statistics, category breakdown, and recent items
- Statistics Page: View wardrobe analytics including total value, most worn items, and category distribution
- Responsive Design: Mobile-friendly interface with sidebar navigation
- Favorites: Mark and filter favorite items
- Search & Browse: Grid view of all wardrobe items with hover actions
- Outfit creation and management
- Tag management page
- Settings page
- User authentication
- Frontend: Next.js 14 (App Router), React 18, TypeScript
- Styling: Tailwind CSS with custom theme
- Forms: React Hook Form + Zod validation
- Database: Supabase (PostgreSQL)
- Storage: Supabase Storage for images
- UI Components: Lucide React icons, Framer Motion, React Hot Toast
- Node.js 18+
- npm or yarn
- Supabase account (free tier works)
git clone <repository-url>
cd wardrobeAI
npm install- Go to supabase.com and create a new project
- Wait for the project to be provisioned
- In your Supabase dashboard, go to SQL Editor
- Copy the contents of
database/schema.sqland run it - This creates the required tables:
clothing_items,tags,item_tags,outfits,outfit_items,outfit_tags
- In Supabase, go to Storage
- Create a new bucket called
wardrobe-images - Make the bucket public (for image URLs to work)
- Add RLS policies for the bucket:
-- Allow public read access
CREATE POLICY "Public Access" ON storage.objects
FOR SELECT USING (bucket_id = 'wardrobe-images');
-- Allow authenticated inserts
CREATE POLICY "Allow Uploads" ON storage.objects
FOR INSERT WITH CHECK (bucket_id = 'wardrobe-images');
-- Allow authenticated deletes
CREATE POLICY "Allow Deletes" ON storage.objects
FOR DELETE USING (bucket_id = 'wardrobe-images');Create a .env.local file in the project root:
NEXT_PUBLIC_SUPABASE_URL=https://your-project-id.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-key-hereFind these values in your Supabase dashboard under Settings > API.
npm run devOpen http://localhost:3000 in your browser.
- Click Add Item from the navigation or dashboard
- Upload photos by dragging and dropping or clicking the upload area
- Fill in the item details (name and category are required)
- Add tags from suggestions or create custom tags
- Click Add Item to save
- View all items: Navigate to the Wardrobe page
- View item details: Click on any item or hover and click the eye icon
- Edit an item: Hover over an item and click the edit icon, or click Edit from the detail page
- Delete an item: Hover over an item and click the trash icon
- Favorite an item: Click the heart icon on any item
The dashboard shows:
- Total items in your wardrobe
- Total wardrobe value
- Most worn items
- Recently added items
- Category breakdown chart
- Quick action buttons
wardrobeAI/
├── app/ # Next.js App Router pages
│ ├── page.tsx # Dashboard
│ ├── add-item/ # Add new item form
│ ├── wardrobe/ # Wardrobe grid and item detail pages
│ ├── outfits/ # Outfits page (placeholder)
│ ├── tags/ # Tags page (placeholder)
│ ├── stats/ # Statistics page
│ └── settings/ # Settings page (placeholder)
├── components/ # Reusable React components
├── contexts/ # React Context providers
├── lib/ # Utility functions and database operations
├── types/ # TypeScript type definitions
├── database/ # SQL schema files
└── public/ # Static assets
npm run dev # Start development server
npm run build # Build for production
npm run start # Start production server
npm run lint # Run ESLint
npm run type-check # Run TypeScript type checkingnext.config.js- Next.js configurationtailwind.config.js- Tailwind CSS theme customizationtsconfig.json- TypeScript configuration
- Verify your Supabase Storage bucket exists and is named
wardrobe-images - Check that the bucket is public
- Verify RLS policies are configured correctly
- Check browser console for specific error messages
- Ensure the schema has been applied in Supabase SQL Editor
- Check that your
.env.localfile has the correct Supabase URL and key - The app will fall back to mock data if Supabase is not configured
- Check browser console for error messages
- Verify Supabase connection in the Network tab
- Ensure RLS policies allow inserts for the
clothing_itemstable
- The app uses a mock user ID (
00000000-0000-0000-0000-000000000000) since authentication is not yet implemented - Mock data is used when Supabase is not configured, allowing local development without a database
- Images are automatically resized to max 1200x1200 before upload to reduce storage usage
MIT