Welcome to The Thrift Project! This is a web application designed to provide users with a platform to buy and sell thrifted clothing and accessories. The application features user authentication, product recommendations, a shopping cart, and an admin dashboard for managing products.
- Table of Contents
- Usage
- Contribution
- License
- Features
- Technologies Used
- Getting Started
- API Endpoints
- Create an account or log in to access the features.
- Browse through the products and add items to your cart.
- Proceed to checkout to complete your purchase.
- Admin users can manage products through the admin dashboard.
Contributions are welcome! Please feel free to submit a pull request or open an issue to discuss improvements or bugs. You can read the complete Contributing Guide here - file
- User Authentication: Users can register, log in, and log out.
- Product Listings: Browse and search through a variety of thrifted products.
- Shopping Cart: Add products to a cart and proceed to checkout.
- Product Recommendations: Personalized product recommendations based on user behavior.
- Admin Dashboard: Admins can add, edit, and delete products from the inventory.
- Frontend: React, React Router, Axios, CSS
- Backend: Go (Fiber framework), MongoDB/PostgreSQL
- Machine Learning: Python (Pandas, Scikit-learn) for product recommendations
- Deployment: Docker, Jenkins and Cloudflare
To get a local copy of the project up and running, follow these steps:
Ensure the following tools are installed:
- Node.js and npm (for frontend)
- Go (for backend)
- MongoDB or PostgreSQL (for database)
- Python (for recommendation system)
- Docker (optional, for containerization)
-
Clone the repository:
git clone https://github.com/yourusername/thrift-store.git cd thrift-store
-
Set up the backend:
-
Navigate to the backend directory and install dependencies:
cd backend go mod tidy
-
Set up your database and update the .env file with your database credentials.
- Set up the frontend:
-
Navigate to the frontend directory and install dependencies:
cd frontend npm install
- Set up ML model:
-
Navigate to the model/Recomender folder and setup virtual environment:
cd model/Recomender source venv/bin/activate pip install -r requirements.txt
- Run the applications:
-
Start the backend server:
go run main.go
-
Start the frontend server:
npm start
-
Start the ML Model server:
python main.py
- Access the application:
Open your browser and navigate to
http://localhost:3000
POST /login: Log in a user.
POST /register: Register a new user.
POST /logout: Log out a user.
GET /products: Retrieve all products.
GET /products/:id: Retrieve a product by ID.
POST /products/add: Add a new product.
PUT /products/:id: Update a product by ID.
DELETE /products/:id: Delete a product by ID.
POST /cart/add: Add an item to the cart.
DELETE /cart/delete/:id: Remove an item from the cart.
GET /cart/items: Get all items in the cart.
GET /cart/total: Get the total price of items in the cart.
DELETE /cart/clear: Clear all items in the cart.