Skip to content

huyinf/DeepFashion

Repository files navigation

DeepFashion - E-commerce Platform with AI Recommendations

Project Overview

DeepFashion is a full-stack e-commerce web application specializing in fashion retail. The platform features a complete shopping experience with user authentication, product catalog, shopping cart, order management, and an AI-powered recommendation system that provides personalized product suggestions based on user behavior.

Technology Stack

Frontend

  • React.js - User interface framework
  • Material-UI - UI component library
  • React Router - Client-side routing
  • React Context API - State management

Backend

  • Node.js - Runtime environment
  • Express.js - Web application framework
  • MongoDB - NoSQL database
  • Mongoose - MongoDB object modeling
  • JWT - Authentication
  • Imgur API - Image hosting

AI/ML

  • Python - Machine learning implementation
  • Implicit - Collaborative filtering library (ALS algorithm)
  • Pandas - Data processing
  • NumPy - Numerical computations

Admin Panel

  • React.js - Admin interface
  • Vite - Build tool

Project Structure

DeepFashion/
├── frontend/          # React.js client application
├── backend/           # Node.js/Express API server
├── admin/             # Admin panel for product management
├── AI/                # Machine learning recommendation system
├── data/              # Product and comment data
├── new-data/          # Additional data resources
└── utils/             # Data processing utilities

Installation & Setup

Prerequisites

  • Node.js (v14 or higher)
  • Python 3.8+
  • MongoDB (local or Atlas cloud)
  • npm or yarn

Backend Setup

cd backend
npm install
# Create .env file with:
# MONGO_URI=your_mongodb_connection_string
# IMGUR_CLIENT_ID=your_imgur_client_id
npm start

Frontend Setup

cd frontend
npm install
npm start
# Runs on http://localhost:3000

Admin Panel Setup

cd admin
npm install
npm run dev
# Runs on http://localhost:5173

AI Recommendation System

cd AI
pip install pymongo implicit pandas numpy scipy schedule
python main.py
# Continuously runs recommendation pipeline

Features

User Features

  • User registration and authentication
  • Product browsing by category (Men, Women, Kids)
  • Product search functionality
  • Shopping cart management
  • Order placement and tracking
  • Product reviews and ratings
  • Personalized product recommendations
  • User profile management

Admin Features

  • Product management (add, edit, delete)
  • User management
  • Order management
  • Dashboard with statistics

AI Features

  • Collaborative filtering recommendation system
  • Real-time recommendation generation
  • User behavior analysis
  • Product recommendation API

API Endpoints

Products

  • GET /product/allproducts - Get all products
  • GET /product/:id - Get product by ID
  • POST /product/addproduct - Add new product (admin)
  • GET /product/category/:category - Get products by category

Users

  • POST /user/signup - User registration
  • POST /user/login - User login
  • GET /user/:id - Get user information

Cart

  • GET /cart/:userId - Get user's cart
  • POST /cart/addtocart - Add item to cart
  • DELETE /cart/removefromcart - Remove item from cart

Orders

  • POST /order/addorder - Place new order
  • GET /order/allorders - Get all orders (admin)
  • GET /order/:userId - Get user's orders

Recommendations

  • POST /recommendation/getrecommendations - Get personalized recommendations
  • GET /recommendation/allrecommendations - Get all recommendations (admin)

Development Notes

Data Processing

The utils/ folder contains scripts for:

  • Data preprocessing and normalization
  • Product data upload
  • Comment data generation
  • Transaction extraction
  • Image downloading

AI Model

The recommendation system uses Alternating Least Squares (ALS) collaborative filtering:

  • Trained on user transaction history
  • Generates top-N recommendations per user
  • Updates periodically via scheduled pipeline
  • Stores recommendations in MongoDB

Deployment

The application is designed to run on localhost. For production deployment:

  1. Set up environment variables
  2. Configure MongoDB Atlas connection
  3. Set up image hosting (Imgur or alternative)
  4. Build frontend: npm run build
  5. Deploy backend to cloud service (Heroku, AWS, etc.)

Project History

This project was originally developed as a group project for a Software Engineering course (SE4AI) completed in June 2024. The project has been moved to this personal repository to serve as a portfolio piece. Future improvements are planned but not yet implemented.


Acknowledgments

Original Collaboration (Course Project - Completed June 2024)

This project was initially developed as a collaborative effort with the following team members:

Team Members:

  • Huy (myself) - Backend architecture, AI recommendation system, frontend components (Cart, Order, Product pages, Comments, Recommendations), payment system, data processing
  • Cường - Database design, Admin panel development, backend optimizations, UI improvements
  • Trí - Frontend development, UI/UX design, Header/Footer components
  • Hân - UI/UX design, frontend components, testing
  • Toàn - AI model research, data preparation, frontend components

Key Collaborative Contributions:

  • Database schema design and implementation (Cường)
  • Initial frontend structure and routing (Trí, Hân)
  • UI/UX design and Figma mockups (Hân, Trí)
  • Admin panel core functionality (Cường)
  • AI model selection and initial implementation (Toàn, Hân)
  • Code cleanup and optimization (Cường, Hân)

Project Timeline:

  • Course start: March 2024
  • Final presentation: June 28, 2024
  • Course completion: June 29, 2024

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published