A fashion recommendation web application built with Next.js 16 and React 19. The frontend provides personalized outfit recommendations, virtual fitting room functionality, user closet management, and an AI-powered styling assistant.
Swell is a full-stack fashion recommendation platform where users can:
- Browse personalized outfit recommendations with swipe interface
- Like/unlike outfits and save to favorites
- Set up preferences through a cold-start onboarding flow
- Use virtual fitting room to try outfits with photos
- Manage personal closet items
- Integrate with Google Gemini API for AI-powered outfit suggestions
Technology Stack:
- Framework: Next.js 16 with App Router
- UI Library: React 19
- Styling: Tailwind CSS v4 with PostCSS
- HTTP Client: Axios with automatic token injection
- Language: TypeScript
- Fonts: Google Fonts (Noto Sans KR for Korean, custom serif fonts)
- Node.js 18+
- npm/yarn/pnpm
- Backend API running at
http://localhost:8000/api
npm installnpm run devOpen http://localhost:3000 with your browser to see the application.
npm run build
npm startnpm run lintFE/
├── app/ # Next.js App Router pages
│ ├── page.tsx # Root landing page
│ ├── layout.tsx # Root layout with fonts and metadata
│ ├── start/ # Authentication flow (login/signup)
│ ├── main/ # Recommendation feed (main dashboard)
│ ├── onboarding/ # Cold-start preference setup
│ ├── favorites/ # Liked outfits collection
│ └── closet/ # Virtual fitting room & closet management
├── components/ # React components (structure exists)
│ ├── common/ # Shared reusable components
│ ├── features/ # Feature-specific components
│ └── layout/ # Layout components
├── lib/ # API client utilities and services
│ ├── api.ts # Axios instance with interceptors
│ ├── auth.ts # Authentication endpoints
│ ├── onboarding.ts # Onboarding endpoints
│ ├── outfits.ts # Outfit/recommendation endpoints
│ ├── profile.ts # User profile endpoints
│ ├── closet.ts # Closet management endpoints
│ ├── fitting.ts # Virtual fitting endpoints
│ ├── user.ts # Legacy user endpoints
│ └── favorites.ts # Legacy favorites endpoints
├── hooks/ # Custom React hooks
│ └── useAuth.ts # Authentication status hook
├── types/ # TypeScript type definitions
│ ├── index.ts # Domain types (User, Tag, Coordi, Item)
│ └── api.ts # API request/response types
├── public/ # Static assets
│ └── images/ # Image assets
├── styles/ # Global styles
│ └── globals.css # Tailwind CSS imports
├── package.json # Dependencies and scripts
├── tsconfig.json # TypeScript configuration
├── tailwind.config.ts # Tailwind CSS configuration
├── next.config.ts # Next.js configuration
├── postcss.config.mjs # PostCSS configuration
├── eslint.config.mjs # ESLint configuration
└── README.md # This file
- Simple landing page with welcome message
- Entry point for the application
- Login and signup form with toggleable UI
- Email, password, name, and gender fields
- Form validation with error messages
- 4-slide promotional guide carousel (Introduction → Swipe → Virtual Fitting → Call-to-action)
- Redirects to
/onboardingfor new users,/mainfor existing users with completed onboarding - Background image:
start_bg.png
- Main dashboard after login
- Split layout: 60% outfit card + 40% filters and product details
- Swipe-like card interface for browsing outfits
- Season filters: Spring, Summer, Fall, Winter
- Style filters: Casual, Minimal, Street, Sporty
- Like/unlike button (floating heart icon)
- Product list with brand, name, price
- "Add to closet" button for each product
- Outfit counter (current/total)
- Dropdown navigation menu (Profile, Favorites, Closet, Logout)
- 2-step cold-start preference setup
- Step 1: Select 3-10 preference tags
- Available tags: casual, minimal, street, sporty, vintage, modern, classic, unique, simple, colorful, comfortable, sophisticated, personal, trendy, basic
- Step 2: Select exactly 5 outfits (coordis)
- Progress indicator and validation
- Submits data to backend and redirects to
/main
- Grid layout (3 columns) of liked outfits
- Each outfit card shows image, style, season, description, and like date
- Unlike button on each card
- Empty state with emoji and link to browse more outfits
- Left panel (45%): Fitting interface
- Photo upload area with drag-and-drop UI
- 3 clothing slots: Top (상의), Bottom (하의), Outer (아우터)
- AI feedback message for fitted outfit
- "Change photo" and "Start fitting" buttons
- Right panel (55%): Closet browser
- Category filters: All, Top, Bottom, Outer
- Grid display (3 columns) of saved closet items
- Blue highlight with checkmark for selected items
- Items can only be added to matching category slots
The frontend communicates with the backend API at http://localhost:8000/api. All API calls are centralized in the lib/ directory:
signup(data)- POST/auth/signuplogin(data)- POST/auth/login(stores JWT in sessionStorage)logout()- POST/auth/logoutgetMe()- GET/auth/me- Utility:
isAuthenticated(),getToken(),clearToken()
getRecommendations(params)- GET/outfits/recommendationsgetOutfitDetail(outfitId)- GET/outfits/{outfitId}addFavorite(outfitId)- POST/outfits/{outfitId}/favoriteremoveFavorite(outfitId)- DELETE/outfits/{outfitId}/favoritegetFavorites(params)- GET/outfits/favorites
getTags()- GET/onboarding/tagsgetSampleCoordis(params)- GET/onboarding/sample-coordissubmitOnboarding(data)- POST/onboarding
getProfile()- GET/profileupdateProfile(data)- PUT/profileuploadProfilePhoto(photo)- POST/profile/photoupdatePreferredTags(tagIds)- PUT/profile/tags
getClosetItems(params)- GET/closetaddClosetItem(data)- POST/closetdeleteClosetItem(itemId)- DELETE/closet/{itemId}
startFitting(data)- POST/virtual-fittinggetFittingStatus(jobId)- GET/virtual-fitting/{jobId}/statusgetFittingHistory(params)- GET/virtual-fittingwaitForFitting(jobId, options)- Utility for polling with progress callback
Manages authentication state and user data:
const { user, loading, setUser } = useAuth({ requireAuth: true });- Checks sessionStorage for JWT token
- Fetches user info on mount
- Redirects to
/startif not authenticated (whenrequireAuthis true) - Returns:
{ user, loading, setUser }
- User - User profile with preferences and onboarding status
- Tag - Style preference tag
- Coordi - Outfit/coordination with style, season, items
- Item - Product with brand, price, category, image
- ApiSuccessResponse - Typed API response wrapper
- ApiErrorResponse - Error response with message
- Outfit - Complete outfit with items and LLM recommendation
- ClosetItem - Saved closet item with category and season
- FittingJob - Virtual fitting job status
- Gender - "male" | "female"
- Season - "spring" | "summer" | "fall" | "winter"
- Style - "캐주얼" | "스포티" | "스트릿" | "미니멀"
The project uses Tailwind CSS v4 with custom configuration:
- snippet - Custom serif font for branding/logo
- noto - Noto Sans KR for Korean text
- abyssinica - Abyssinica SIL for English text
- CSS custom properties:
--background,--foreground - Dark mode support via
prefers-color-schememedia query - Tailwind utilities: blue, pink, gray, white, black
- Tailwind CSS imports
- Custom font classes
- CSS variable definitions
- User logs in at
/start - JWT token stored in
sessionStorage(non-persistent) - Axios request interceptor automatically adds
Authorization: Bearer {token}header - 401 responses trigger redirect to
/start - New users redirected to
/onboarding, existing users to/main
- React hooks (useState, useRef, useEffect) for local component state
- No external state management library (Redux, Zustand, etc.)
- Mock data embedded in page components (temporary during development)
- Email regex validation
- Password minimum 8 characters
- Password confirmation matching
- Tag selection limits (3-10)
- Outfit selection requirement (exactly 5)
- New users must complete 2-step onboarding
- Step 1: Select 3-10 tags
- Step 2: Select exactly 5 outfits
- Data persisted to backend
- Users upload photo and select clothing items
- Items organized by category (Top, Bottom, Outer)
- Backend processes fitting and returns AI recommendation
- Results shown with feedback message
- Chrome/Edge 90+
- Firefox 88+
- Safari 14+
- Requires JavaScript enabled
No environment variables required for basic development. The API base URL is hardcoded in lib/api.ts:
baseURL: 'http://localhost:8000/api'To change the API URL, modify the api.ts file.
- Components folder structure exists but is unused - all UI currently in page files
- Session-based auth - Tokens not persisted across browser restart
- Korean language support - Full Korean text support via Noto Sans KR
- Responsive design - Layouts use percentage-based splits for responsiveness
- Mock data - Currently uses embedded mock data for demo (will be replaced with API calls)
- Next.js Documentation
- React Documentation
- Tailwind CSS Documentation
- TypeScript Documentation
- Axios Documentation
The frontend expects a running backend at http://localhost:8000/api. For backend setup, see the main README in the repository root or BE/README.md.