This project is a web application built using the MERN stack (MongoDB, Express, React, Node.js) and Vite, designed to remove the background from your images. It allows users to upload an image, remove the background, and download the result with a transparent background.
- Upload Images: Users can upload images in supported formats.
- Background Removal: Automatic and precise background removal using advanced algorithms.
- Download Images: Download processed images with a transparent background.
- Responsive UI: Fully responsive design for seamless experience across devices.
- User Authentication: Secure login and signup functionalities.
- Transaction History: Keep track of image processing transactions.
- React.js (UI Framework)
- Vite (Frontend tooling)
- Tailwind CSS (Styling)
- Node.js (Runtime Environment)
- Express.js (Backend Framework)
- MongoDB (Database)
- Multer (File Upload Middleware)
- JWT (Authentication)
- Cloud Services: Deployed on Vercel (Frontend) and backend API hosted online.
client/
βββ node_modules/
βββ public/
βββ src/
β βββ assets/
β β βββ assets.js
β βββ components/
β β βββ BgSlider.jsx
β β βββ Footer.jsx
β β βββ Header.jsx
β β βββ Navbar.jsx
β β βββ Steps.jsx
β β βββ Testimonial.jsx
β β βββ Upload.jsx
β βββ context/
β βββ pages/
β β βββ BuyCredit.jsx
β β βββ Home.jsx
β β βββ Result.jsx
β β βββ App.jsx
β βββ index.css
β βββ main.jsx
βββ .env
server/
βββ config/
β βββ mongodb.js
βββ controllers/
β βββ imageController.js
β βββ userController.js
βββ middlewares/
β βββ auth.js
β βββ multer.js
βββ models/
β βββ transactionModel.js
β βββ userModel.js
βββ routes/
βββ node_modules/
βββ .env
βββ package.json
βββ package-lock.json
βββ server.js
βββ vercel.json
Ensure you have the following installed:
- Node.js
- MongoDB
- Vite (Optional)
- Clone the Repository
git clone https://github.com/Gyanthakur/ClearBg.git cd repository-name
-
Navigate to the
server/directory. -
Create a
.envfile and add the required environment variables:MONGO_URI=your-mongodb-connection-string JWT_SECRET=your-secret-key CLERK_WEBHOOK_SECRET = YOUR_CLERK_WEBHOOK_SECRET CLIPDROP_API = YOUR_CLIPDROP_API RAZORPAY_KEY_ID = YOUR_RAZORPAY_KEY_ID RAZORPAY_KEY_SECRET = YOUR_RAZORPAY_KEY_SECRET CURRENCY = 'INR' -
Install dependencies and start the server:
npm install npm start
-
Navigate to the
client/directory. -
Create a
.envfile if needed. -
Install dependencies and start the client:
npm install npm run dev
- Open your browser and navigate to
http://localhost:5173for the client. - The server API will run on
http://localhost:4000.
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch.
- Commit your changes.
- Push the branch and create a pull request.
π§ Contact
For any queries or suggestions, reach out at: gps.96169@gmail.com.
π§ Contact
For any queries or suggestions, reach out at: