Brush & Prompt is an AI-powered image editing tool that allows users to upload images, make selections using a brush tool, and transform selected areas using AI-powered prompts. This project is built using Vite, React, TypeScript, ShadCN, and TailwindCSS.
- Image Uploading: Users can upload images via drag-and-drop or file selection.
- Brush Selection Tool: Select an area of the image for AI transformation.
- AI-Powered Image Transformation: Uses AI to modify selected areas based on user prompts.
- Undo/Redo Functionality: Keeps track of history for easier editing.
- Side-by-Side Comparison: Allows users to compare the original and AI-generated image.
- Download Feature: Save the generated images locally.
- React 18 with TypeScript
- Vite for fast development and builds
- TailwindCSS & ShadCN for styling
- Lucide-react for icons
- React Hook Form & Zod for form validation
- Axios for API requests
- Sonner for toast notifications
- Radix UI components for accessible UI elements
- Recharts for data visualization
Ensure you have Node.js installed. Then, clone the repository and install dependencies:
# Clone the repository
git clone https://github.com/Ayushsunny/brush-and-prompt
cd your-repo
# Install dependencies
npm install
To start the development server:
npm run dev
To build the project:
npm run build
To preview the built project:
npm run preview
- Upload an Image: Drag and drop an image or select one from your device.
- Select an Area: Use the brush tool to highlight areas for transformation.
- Enter a Prompt: Describe how you want the selected area to change.
- Generate & Download: AI processes the image and produces a transformed version. Download the image to save it locally.
To deploy, you can use Vercel, Netlify, or any static site hosting:
npm run build
# Deploy the contents of the dist/ folder
- Fork the repository
- Create a new branch (
git checkout -b feature-branch
) - Commit your changes (
git commit -m 'Add new feature'
) - Push to the branch (
git push origin feature-branch
) - Open a Pull Request
MIT License