Skip to content

Gyanthakur/ClearBg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

35 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

logo_BG

Demo

image

image

Background Removal Tool

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.

Features

  • 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.

Tech Stack

Frontend

  • React.js (UI Framework)
  • Vite (Frontend tooling)
  • Tailwind CSS (Styling)

Backend

  • Node.js (Runtime Environment)
  • Express.js (Backend Framework)
  • MongoDB (Database)

Additional Tools

  • Multer (File Upload Middleware)
  • JWT (Authentication)
  • Cloud Services: Deployed on Vercel (Frontend) and backend API hosted online.

File Structure

Client

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

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

How to Run Locally

Prerequisites

Ensure you have the following installed:

  • Node.js
  • MongoDB
  • Vite (Optional)

Steps

  1. Clone the Repository
    git clone https://github.com/Gyanthakur/ClearBg.git
    cd repository-name

Project Setup

Set Up the Server

  1. Navigate to the server/ directory.

  2. Create a .env file 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'
    
  3. Install dependencies and start the server:

    npm install
    npm start

Set Up the Client

  1. Navigate to the client/ directory.

  2. Create a .env file if needed.

  3. Install dependencies and start the client:

    npm install
    npm run dev

Access the Application

  • Open your browser and navigate to http://localhost:5173 for the client.
  • The server API will run on http://localhost:4000.

Demo

image

image

image

Responsive

image

image

Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository.
  2. Create a new branch.
  3. Commit your changes.
  4. 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: WhatsApp

image

About

✨ Clear Background A tool for removing image backgrounds seamlessly πŸ–ΌοΈ. Features include quick processing ⚑, high-quality results 🎯, and an easy-to-use interface πŸ–±οΈ. Ideal for creating professional visuals and enhancing graphic design projects effortlessly!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors