Skip to content

Nayef06/MALABIS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

53 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

MALABIS - Smart Wardrobe Organizer & Outfit Generator

MALABIS is a full-stack web application that revolutionizes wardrobe management through intelligent outfit generation. Upload your clothes, organize them systematically, and discover new outfit combinations that elevate your personal style.

πŸš€ Features

Core Functionality

  • Smart Wardrobe Management – Upload, categorize, and organize your clothing items with automatic background removal
  • Intelligent Outfit Generator – Get smart outfit suggestions based on your wardrobe
  • Advanced Item Locking – Lock specific items in outfit generation for personalized combinations
  • Favorites System – Mark and organize your favorite clothing items
  • Responsive Design – Seamless experience across desktop and mobile devices

User Experience

  • Modern UI/UX – Beautiful, intuitive interface with smooth animations
  • Mobile-First Design – Optimized for mobile devices with responsive layouts
  • Drag & Drop Upload – Easy file upload with visual feedback
  • Smart Categorization – Automatic clothing type detection and organization
  • Color Management – Track and filter items by color

πŸ› οΈ Tech Stack

Frontend

  • React 18 – Modern React with hooks and functional components
  • React Router DOM v6 – Client-side routing with nested routes
  • Vite – Lightning-fast build tool and development server
  • CSS3 – Custom styling with responsive design and animations

Backend

  • Node.js + Express – RESTful API server with middleware
  • MongoDB + Mongoose – NoSQL database with ODM
  • Passport.js – Authentication middleware with local strategy
  • Cloudinary – Cloud image storage and transformation
  • Multer – File upload handling
  • Sharp – Image processing and optimization
  • bcrypt – Secure password hashing
  • Express Session – Session management with MongoDB store
  • Express Validator – Input validation and sanitization

Deployment

  • Vercel – Frontend and backend deployment
  • MongoDB Atlas – Cloud database hosting
  • Cloudinary – Cloud image hosting and CDN

πŸ“ Project Structure

MALABIS/
β”œβ”€β”€ client/                 # React frontend
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/     # Reusable UI components
β”‚   β”‚   β”‚   └── Navbar.jsx  # Navigation component
β”‚   β”‚   β”œβ”€β”€ pages/          # Main application pages
β”‚   β”‚   β”‚   β”œβ”€β”€ Auth.css    # Authentication styles
β”‚   β”‚   β”‚   β”œβ”€β”€ LoginPage.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ SignupPage.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ DashboardPage.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ ClothesPage.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ OutfitsPage.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ GeneratorPage.jsx
β”‚   β”‚   β”‚   └── AccountPage.jsx
β”‚   β”‚   β”œβ”€β”€ assets/         # Images and static files
β”‚   β”‚   β”œβ”€β”€ api.js          # API client configuration
β”‚   β”‚   β”œβ”€β”€ App.jsx         # Root component with routing
β”‚   β”‚   β”œβ”€β”€ LandingPage.jsx # Landing page component
β”‚   β”‚   └── main.jsx        # Application entry point
β”‚   β”œβ”€β”€ public/             # Static assets
β”‚   β”œβ”€β”€ package.json        # Frontend dependencies
β”‚   └── vercel.json         # Vercel deployment config
β”œβ”€β”€ server/                 # Express backend
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ models/         # Database models
β”‚   β”‚   β”‚   β”œβ”€β”€ user.mjs
β”‚   β”‚   β”‚   β”œβ”€β”€ clothingItem.mjs
β”‚   β”‚   β”‚   └── outfit.mjs
β”‚   β”‚   β”œβ”€β”€ routes/         # API route handlers
β”‚   β”‚   β”‚   β”œβ”€β”€ auth.mjs
β”‚   β”‚   β”‚   β”œβ”€β”€ clothing.mjs
β”‚   β”‚   β”‚   β”œβ”€β”€ outfits.mjs
β”‚   β”‚   β”‚   └── generator.mjs
β”‚   β”‚   β”œβ”€β”€ strategies/     # Passport authentication
β”‚   β”‚   β”‚   └── local-strategy.mjs
β”‚   β”‚   β”œβ”€β”€ utils/          # Helper functions
β”‚   β”‚   β”‚   β”œβ”€β”€ cloudinary.mjs
β”‚   β”‚   β”‚   β”œβ”€β”€ removeBackground.mjs
β”‚   β”‚   β”‚   β”œβ”€β”€ defaultClothing.mjs
β”‚   β”‚   β”‚   β”œβ”€β”€ validationSchemas.mjs
β”‚   β”‚   β”‚   └── helpers.mjs
β”‚   β”‚   └── index.mjs       # Server entry point
β”‚   β”œβ”€β”€ api/                # Vercel serverless functions
β”‚   β”‚   β”œβ”€β”€ handler.mjs     # Main API handler
β”‚   β”‚   └── index.mjs       # Route aggregation
β”‚   β”œβ”€β”€ package.json        # Backend dependencies
β”‚   └── vercel.json         # Vercel deployment config
└── README.md

🧰 Getting Started

Prerequisites

  • Node.js (v18+ recommended)
  • MongoDB Atlas account or local MongoDB instance
  • Cloudinary account for image hosting
  • Vercel for deployment (optional)

Local Development Setup

  1. Clone the repository

    git clone <repository-url>
    cd MALABIS
  2. Install dependencies

    # Frontend dependencies
    cd client && npm install
    
    # Backend dependencies
    cd ../server && npm install
  3. Environment Configuration

    Create a .env file in the /server directory:

    # Database
    MONGODB_URI=your_mongodb_connection_string
    
    # Session Management
    SESSION_SECRET=your_session_secret_key
    COOKIE_SECRET=your_cookie_secret_key
    
    # Cloudinary Configuration
    CLOUDINARY_CLOUD_NAME=your_cloudinary_cloud_name
    CLOUDINARY_API_KEY=your_cloudinary_api_key
    CLOUDINARY_API_SECRET=your_cloudinary_api_secret
    
    # Server Configuration
    PORT=3000
    NODE_ENV=development
  4. Start the development servers

    # Start backend server
    cd server
    npm run dev
    
    # Start frontend development server (in new terminal)
    cd client
    npm run dev
  5. Access the application

πŸ“± Application Pages

Public Pages

  • / – Landing page with signup/login options
  • /login – User authentication
  • /signup – New user registration

Protected Pages (Requires Authentication)

  • /dashboard – Main dashboard overview
  • /clothes – Wardrobe management and item upload
  • /outfits – Saved outfit collections
  • /generator – Smart outfit generation
  • /account – User profile and settings

πŸ”Œ API Endpoints

Authentication

  • POST /api/auth/signup – User registration
  • POST /api/auth/login – User login
  • POST /api/auth/logout – User logout
  • GET /api/auth/status – Check authentication status

Clothing Management

  • GET /api/clothing – Retrieve user's clothing items
  • POST /api/clothing – Upload new clothing item
  • DELETE /api/clothing/:id – Remove clothing item
  • PUT /api/clothing/:id/favorite – Toggle favorite status

Outfit Management

  • GET /api/outfits – Get user's saved outfits
  • POST /api/outfits – Save new outfit
  • DELETE /api/outfits/:id – Remove saved outfit

Outfit Generation

  • POST /api/generator – Generate outfit suggestions
  • GET /api/generator/inventory – Get user's clothing inventory

πŸš€ Deployment

Frontend Deployment (Vercel)

  1. Connect your GitHub repository to Vercel
  2. Set build command: npm run build
  3. Set output directory: dist
  4. Configure environment variables in Vercel dashboard

Backend Deployment (Vercel)

  1. Deploy the server directory as a separate Vercel project
  2. Configure environment variables in Vercel dashboard
  3. Set the main function to api/handler.mjs

Environment Variables for Production

MONGODB_URI=your_production_mongodb_uri
SESSION_SECRET=your_production_session_secret
COOKIE_SECRET=your_production_cookie_secret
CLOUDINARY_CLOUD_NAME=your_cloudinary_cloud_name
CLOUDINARY_API_KEY=your_cloudinary_api_key
CLOUDINARY_API_SECRET=your_cloudinary_api_secret
NODE_ENV=production

🎨 Key Features in Detail

Smart Wardrobe Management

  • Automatic Background Removal: Upload clothing items with automatic background removal for clean, professional-looking images
  • Smart Categorization: Items are automatically categorized by type (shirts, pants, shoes, etc.)
  • Color Tracking: Each item's color is tracked and can be used for outfit generation
  • Favorites System: Mark items as favorites for quick access and special consideration in outfit generation

Smart Outfit Generator

  • Item Locking: Lock specific items in place while generating variations for other pieces
  • Type Filtering: Generate outfits based on specific clothing types
  • Accessory Management: Control the number of accessories in generated outfits
  • Real-time Generation: Instant outfit suggestions with smooth animations

User Experience

  • Responsive Design: Optimized for all device sizes with mobile-first approach
  • Smooth Animations: Polished UI with smooth transitions and loading states
  • Error Handling: Comprehensive error handling with user-friendly messages

πŸ”§ Development

Available Scripts

Frontend (client/)

npm run dev      # Start development server
npm run build    # Build for production
npm run preview  # Preview production build
npm run lint     # Run ESLint

Backend (server/)

npm run dev      # Start development server with nodemon
npm start        # Start production server

πŸ“„ License

MIT

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature)
  3. Commit your changes (git commit -m 'Add feature')
  4. Push to the branch (git push origin feature)
  5. Open a Pull Request

πŸ› Known Issues

  1. None that I know of

Future Updates

  1. A fit' of the day system/calendar
  2. Custom clothing catagories

Current Limitations

  1. Outfit Creator UI goes off screen for very few devices

About

A full-stack wardrobe organizer and outfit generator. Upload your clothes, organize your wardrobe, and get outfit suggestions. Built with React, Node.js, MongoDB, and Cloudinary.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors