Transform your photos into stunning cartoon art with AI
Paperbag is a powerful web application that transforms ordinary photos into various cartoon styles using AI. With support for multiple cartoon styles including Simpsons, Anime, and Disney, Paperbag provides a seamless user experience with its modern interface and efficient processing capabilities.
- Transform your photos into various cartoon styles
- Real-time processing with AI-powered technology
- High-quality output with preserved details
- Simpsons: Convert images to the iconic yellow cartoon style
- Anime: Transform photos into Japanese anime style
- Disney: Create Disney-inspired character transformations
- Before & After Showcases: Interactive comparison between original and transformed images
- Responsive Design: Optimized for desktop and mobile devices
- Intuitive Interface: Simple drag-and-drop functionality
- Fast Processing: Quick transformations with immediate results
- Framework: React 19
- Styling: Tailwind CSS 4
- Routing: TanStack Router
- UI Components: Radix UI
- Icons: Lucide React
- Database & Functions: Convex
- Authentication: Clerk
- Analytics: Vercel Analytics
- Image Processing: OpenAI
- Node.js (v18 or newer)
- pnpm (v8 or newer)
- Convex account (for database)
- Clerk account (for authentication)
- OpenAI API key (for image processing)
-
Clone the repository:
git clone https://github.com/yourusername/paperbag.git cd paperbag
-
Install dependencies:
pnpm install
-
Set up environment variables:
cp .env.example .env.local
-
Update the
.env.local
file with your API keys:CLERK_PUBLISHABLE_KEY=your_clerk_publishable_key CLERK_SECRET_KEY=your_clerk_secret_key OPENAI_API_KEY=your_openai_api_key
-
Initialize Convex:
npx convex dev
-
Start the development server:
pnpm run dev
The application will be available at
http://localhost:5173
-
Build for production:
pnpm run build
-
Preview the production build:
pnpm run preview
- Lint the codebase:
pnpm run lint
paperbag/
├── convex/ # Convex backend functions
│ ├── files.ts # File handling
│ ├── image.ts # Image processing
│ └── transactions.ts # Transaction management
├── public/ # Static assets
├── src/
│ ├── assets/ # Frontend assets
│ ├── components/ # React components
│ ├── lib/ # Utility functions
│ ├── routes/ # Application routes
│ └── styles/ # CSS styles
└── types/ # TypeScript type definitions
- Users upload their photos to the application
- The system processes the images using AI models
- Users can select from various cartoon styles
- The transformed images are displayed with before/after comparison
- Users can download or share their cartoonified images
Contributions make the open-source community an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
- API Connection Errors: Make sure your API keys are correctly set in the
.env.local
file - Convex Development Server: If you encounter errors with Convex, try running
npx convex dev
in a separate terminal - Image Processing Failures: Check your OpenAI API usage limits and key validity
Distributed under the MIT License. See LICENSE
for more information.
- OpenAI for providing powerful image processing capabilities
- Convex for the backend infrastructure
- All the contributors who have helped make this project better