An AI-driven fashion discovery and creation platform where browsing feels like exploration, not shopping.
Thread.AI is a visual, Pinterest-like wall for fashion inspiration with a dedicated AI fitting lab where users upload images, generate outfits, edit, and share their creations.
- Google OAuth only (no passwords)
- Seamless login/signup experience
- Secure JWT-based sessions
- Personal creative space
- All AI-generated outfits
- User-uploaded images
- Private drafts
- Public posted items
- Quick access to AI Lab
- Infinite scroll visual discovery
- Pinterest-style masonry grid
- Minimal, clean header
- Optimized for curiosity and browsing
- Filter by style categories
- Upload your photo
- Select garments from product URLs
- AI generates outfit visualization
- Edit and refine results
- Save as private draft
- Share to public wall
- Consistent header across all pages
- Logo and navigation
- Search functionality
- Profile avatar dropdown
ai-fashion-wall/
βββ Backend/ # Python FastAPI + PostgreSQL
βββ Frontend/ # Next.js + TypeScript + Tailwind
βββ README.md # This file
βββ SETUP.md # Setup instructions
βββ start-*.sh/bat # Quick start scripts
Frontend:
- Next.js 14 (App Router)
- TypeScript
- Tailwind CSS
- NextAuth.js (Google OAuth)
- Zustand (State Management)
- Framer Motion (Animations)
Backend:
- Python 3.11+
- FastAPI
- PostgreSQL
- SQLAlchemy ORM
- Pydantic Schemas
This project follows strict clean code principles:
- 200 Line Limit - No file exceeds 200 lines
- Single Responsibility - One purpose per file
- Feature-Based Structure - Features own their code
- Routes Handle HTTP Only - No business logic in routes
- AI Logic in Backend - Never in frontend
- Types Live with Features - Co-located types
Backend/
βββ routes/ # HTTP layer only (Controller)
βββ services/ # Business logic (Service)
βββ models/ # Database ORM (Model)
βββ schemas/ # Request/Response validation (DTO)
Frontend/app/
βββ [feature]/
β βββ page.tsx # Route entry
β βββ components/ # Feature-specific
β βββ hooks/ (optional) # Feature-specific
- Node.js 18+
- Python 3.11+
- PostgreSQL 14+
Mac/Linux:
# Terminal 1 - Frontend
./start-frontend.sh
# Terminal 2 - Backend
./start-backend.shWindows:
# Terminal 1 - Frontend
start-frontend.bat
# Terminal 2 - Backend
start-backend.batFrontend:
cd Frontend
npm install
cp .env.example .env.local
# Edit .env.local with your credentials
npm run devBackend:
cd Backend
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
cp .env.example .env
# Edit .env with your database credentials
python init_db.py
python main.py- SETUP.md - Detailed setup instructions
- DEVELOPMENT.md - Development guidelines
- QUICKSTART.md - 5-minute quick start
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=your-secret-key
GOOGLE_CLIENT_ID=your-google-client-id
GOOGLE_CLIENT_SECRET=your-google-client-secret
NEXT_PUBLIC_API_URL=http://localhost:8000DATABASE_URL=postgresql://postgres:password@localhost:5432/aifashionwall
SECRET_KEY=your-secret-key
GOOGLE_CLIENT_ID=your-google-client-id
GOOGLE_CLIENT_SECRET=your-google-client-secret
FRONTEND_URL=http://localhost:3000Backend/
βββ core/ # Configuration & utilities
β βββ config.py # Environment settings
β βββ database.py # Database connection
β βββ security.py # JWT & password hashing
βββ models/ # SQLAlchemy ORM models
β βββ user.py
β βββ post.py
β βββ draft.py
βββ schemas/ # Pydantic validation schemas
β βββ user.py
β βββ post.py
β βββ draft.py
β βββ auth.py
β βββ ai.py
βββ routes/ # API endpoints (HTTP only)
β βββ auth.py
β βββ users.py
β βββ posts.py
β βββ drafts.py
β βββ ai.py
βββ services/ # Business logic
β βββ user_service.py
β βββ post_service.py
β βββ draft_service.py
β βββ ai_service.py
βββ main.py # FastAPI app entry point
βββ init_db.py # Database initialization
βββ requirements.txt # Python dependencies
Frontend/
βββ app/ # Next.js pages
β βββ login/ # Login page
β βββ signup/ # Signup page
β βββ wall/ # Main feed
β βββ profile/ # User profile
β βββ lab/ # AI fitting lab
β βββ layout.tsx # Root layout
βββ components/ # Shared components
β βββ Header.tsx
β βββ SearchBar.tsx
β βββ ProfileAvatar.tsx
β βββ FashionCard.tsx
βββ stores/ # Zustand state
β βββ useAuthStore.ts
β βββ useLabStore.ts
βββ types/ # TypeScript types
β βββ index.ts
βββ package.json
| Service | URL | Description |
|---|---|---|
| Frontend | http://localhost:3000 | Main application |
| Backend API | http://localhost:8000 | API server |
| API Docs | http://localhost:8000/docs | Interactive Swagger UI |
| ReDoc | http://localhost:8000/redoc | Alternative API docs |
- Google OAuth authentication flow
- User management (CRUD)
- Posts with pagination, like, save
- Drafts system (private creations)
- AI Lab interface (UI complete)
- Infinite scroll feed
- Profile with gallery
- State management (Zustand)
- Clean MVC architecture
- AI generation service (stub ready)
- File upload system
- Image storage (S3/Cloudinary)
- Real authentication middleware
- Production deployment
# Frontend (when added)
cd Frontend
npm test
# Backend (when added)
cd Backend
pytest- TypeScript strict mode
- ESLint for frontend
- Type hints for Python
- 200-line file limit enforced
MIT License - See LICENSE file for details
- Follow the clean code principles
- Keep files under 200 lines
- Add proper documentation
- Test your changes
- Create feature branches
cd Frontend
vercel- Configure environment variables
- Setup PostgreSQL database
- Update CORS settings
- Enable HTTPS
For issues and questions:
- Create an issue in the repository
- Check documentation files
- Review code comments
Built with β€οΈ by the Thread.AI team