A modern, responsive image uploader built with Next.js 15, TypeScript, and ImageKit. Features drag-and-drop functionality, progress tracking, and dark mode support.
- 🖼️ Drag and drop image upload
- 📊 Real-time upload progress
- 🌙 Dark/Light mode support
- 📱 Responsive design
- ✅ File type and size validation
- 🎨 Modern UI with Tailwind CSS and shadcn/ui
- ☁️ ImageKit integration for optimized image delivery
- Node.js 18+
- npm, yarn, pnpm, or bun
- ImageKit account (Sign up here)
- Clone the repository:
git clone https://github.com/prithaxdev/uploady
cd uploady- Install dependencies:
npm install
# or
yarn install
# or
pnpm install- Set up environment variables:
cp .env.example .env- Configure ImageKit in your
.envfile:
IMAGEKIT_PUBLIC_KEY=your_imagekit_public_key_here
IMAGEKIT_PRIVATE_KEY=your_imagekit_private_key_here
IMAGEKIT_URL_ENDPOINT=https://ik.imagekit.io/your_imagekit_id/To get these values:
- Go to your ImageKit Dashboard
- Navigate to Developer Options
- Copy your Public Key, Private Key, and URL Endpoint
- Run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev- Open http://localhost:3000 in your browser.
- Upload Images: Drag and drop images onto the upload area or click "Browse files"
- View Progress: Watch the upload progress bar in real-time
- View Images: Successfully uploaded images are displayed with options to view in full size or remove
- Theme Toggle: The app automatically adapts to your system theme preference
- Supported formats: JPG, PNG, GIF, WebP, and other image formats
- Maximum file size: 10MB
- File type validation: Only image files are accepted
├── app/
│ ├── api/upload/ # Upload API endpoint
│ ├── globals.css # Global styles and Tailwind config
│ ├── layout.tsx # Root layout with theme provider
│ └── page.tsx # Home page
├── components/
│ ├── ui/ # shadcn/ui components
│ ├── image-uploader.tsx # Main upload component
│ └── theme-provider.tsx # Theme provider wrapper
├── lib/
│ ├── imagekit.ts # ImageKit configuration
│ └── utils.ts # Utility functions
└── public/ # Static assets
Uploads an image file to ImageKit.
Request: FormData with file field
Response: ImageKit upload response with image URL
Validation:
- File must be an image
- File size must be ≤ 10MB
- Filename is sanitized for security
This project is open source and available under the MIT License.
If you encounter any issues or have questions, please open an issue on GitHub.