Croppy (Vite + React)
Croppy is a client-side social media image crop studio. Upload once, export multiple platform-specific sizes.
What Croppy Does
- Runs fully in-browser (no server image uploads)
- Supports major social/web presets (YouTube, Instagram, X, LinkedIn, Facebook, TikTok, Pinterest, Snapchat, Threads, Reddit, OG)
- Provides interactive crop controls with zoom and rotation
- Exports high-resolution JPG, PNG, and WEBP output
- Includes safe-zone overlays for relevant presets (for example YouTube banner visibility)
Scripts
npm run devstarts the Vite dev servernpm run buildruns TypeScript checks and creates a production buildnpm run previewserves the production build locallynpm run lintruns ESLint across the project
Local Development
- Install dependencies:
npm install
- Start the dev server:
npm run dev
- Open the app:
http://localhost:5173
Run From Repo Root
If your terminal is at the repository root (Croppy/) instead of Croppy/client/, use:
npm --prefix /Users/adilhusain/Downloads/Croppy/client run dev
Tech Stack
- React 19
- Vite 7
- TypeScript
- Tailwind CSS v4 utilities (via
@import "tailwindcss") react-easy-cropfor crop interactions
Project Layout
src/App.tsx: main Croppy UIsrc/styles.css: theme and utility stylinglib/presets.ts: platform and dimension presetslib/crop-image.ts: canvas export pipelinepublic/: static assets (favicon)