TradeHub is an e-commerce platform that allows users to buy and sell products. It is developed as a part of the Design and Analysis of Software Systems course at IIIT Hyderabad. The platform is built using MERN stack.
-
Frontend:
- React: JavaScript library for building user interfaces.
- Zustand: State management library.
- Axios: Promise based HTTP client for the browser and Node.js
- React Router: Declarative routing for React.
- Filepond: A JavaScript library that can upload anything you throw at it, optimizes images for faster uploads, and offers a great, accessible, silky smooth user experience.
- React-hot-toast: A super easy toast library for React applications.
- React-icons: Popular icons for React projects.
- Motion: Animation library for React.
- Tailwind CSS: A utility-first CSS framework for rapidly building custom designs.
- React-Helmet: A document head manager for React.
- Google-generative-ai: A library for powering the chatbot using Google's generative AI models,
Gemini 1.5 Flashin this case.
-
Backend:
- Express: Fast, unopinionated, minimalist web framework for Node.js.
- Mongoose: MongoDB object modeling tool designed to work in an asynchronous environment.
- Multer: Node.js middleware for handling
multipart/form-data. - JWT: JSON Web Token is a compact, URL-safe means of representing claims to be transferred between two parties.
- Bcrypt: A library to help you hash passwords.
- Cors: A package for providing a Connect/Express middleware that can be used to enable CORS with various options.
- Dotenv: A zero-dependency module that loads environment variables from a
.envfile intoprocess.env. - Cloudinary: Cloudinary is a cloud service that offers a solution to a web application's entire image management pipeline.
- Clone the repository
- Run
npm installin theroot,frontendandbackenddirectories - Create a
.envfile in thebackenddirectory and add the following environment variables:MONGO_URI: MongoDB connection stringJWT_SECRET: Secret key for JWTCLOUDINARY_CLOUD_NAME: Cloudinary cloud nameCLOUDINARY_API_KEY: Cloudinary API keyCLOUDINARY_API_SECRET: Cloudinary API secret
- Create a
.envfile in thefrontenddirectory and add the following environment variables:VITE_BACKEND_URL: Backend API URLVITE_GEMINI_API_KEY: Gemini API key for chat support
- Run
npm run startin the root directory. - Open
http://localhost:5173in your browser