A modern, elegant file upload center built with Next.js and Vercel Blob storage. VBU provides a seamless interface for uploading, managing, and sharing files through Vercel's Blob storage service.
VBU (Vercel Blob Upload) is a full-featured file upload center that leverages Vercel Blob storage for reliable and scalable file hosting. The application provides an intuitive interface for uploading files, viewing uploaded files, and generating code snippets for embedding files in various formats.
The project features a modern, responsive UI with a dark Nord theme, custom icons, and a clean, user-friendly interface.
- Drag-and-drop file uploads with progress tracking
- File management with easy deletion
- Copy URL functionality for quick sharing
- Code snippet generation for HTML, Markdown, and Next.js
- Responsive design that works on mobile and desktop
- Dark theme with Nord color palette
- Custom iconography throughout the interface
- Toast notifications for user feedback
- Help documentation for user guidance
- Frontend: Next.js 14, React, TypeScript
- Styling: Tailwind CSS, shadcn/ui components
- Storage: Vercel Blob
- Fonts: Google Fonts (Inter, Permanent Marker)
- Icons: Custom SVG icons
- Deployment: Vercel
- Node.js 18.x or later
- npm or yarn
- Vercel account with Blob storage enabled
- Vercel CLI (optional, for local development)
- Clone the repository:
git clone https://github.com/amhousa/VBU.git
cd VBU
- Install dependencies:
npm install
# or
yarn install
- Set up environment variables (see next section)
- Run the development server:
npm run dev
# or
yarn dev
- Open http://localhost:3000 in your browser to see the application.
Create a .env.local
file in the root directory with the following variables:
BLOB_READ_WRITE_TOKEN=your_vercel_blob_token
You can obtain a Blob token from the Vercel dashboard under Project Settings > Storage.
- Navigate to the main page of the application
- Drag and drop a file into the upload area, or click "Browse Files" to select a file
- Once a file is selected, click "Upload File" to start the upload process
- A progress bar will show the upload status
- Upon successful upload, you'll receive a confirmation notification
-
All uploaded files appear in the "Your Files" section
-
For each file, you can:
-
Copy the file URL to clipboard
-
Open/download the file
-
Delete the file
When you upload a file, the "Usage Examples" section will appear with code snippets for:
- HTML:
<img>
tag for embedding images - Markdown: Image syntax for markdown documents
- Next.js:
Image
component implementation
VBU exposes several API endpoints for file operations:
Endpoint: /api/upload
Method: POST
Query Parameters:
filename
: Name of the file to be uploaded
Request Body: File content as binary data
Response:
{
"url": "https://vercel-blob.com/...",
"pathname": "...",
"contentType": "image/jpeg",
"size": 12345
}
Endpoint: /api/list
Method: GET
Response:
{
"files": [
{
"url": "https://vercel-blob.com/...",
"pathname": "...",
"filename": "example.jpg",
"contentType": "image/jpeg",
"size": 12345,
"uploadedAt": "2023-01-01T00:00:00.000Z"
}
]
}
Endpoint: /api/delete
Method: DELETE
Query Parameters:
url
: URL of the file to delete
Response:
{
"success": true
}
The application uses a custom Nord theme with Tailwind CSS. You can modify the theme by editing:
tailwind.config.ts
: Contains theme colors and extensionsapp/globals.css
: Contains CSS variables and global styles
All icons are custom SVG components located in the components/
directory. You can replace these with your own SVG icons by editing the respective component files.
VBU/
├── app/ # Next.js App Router
│ ├── api/ # API routes
│ │ ├── delete/ # Delete file API
│ │ ├── list/ # List files API
│ │ └── upload/ # Upload file API
│ ├── favicon.svg # Favicon
│ ├── globals.css # Global styles
│ ├── icon.tsx # App icon
│ ├── layout.tsx # Root layout
│ └── page.tsx # Main page
├── components/ # React components
│ ├── ui/ # UI components (shadcn/ui)
│ ├── *-icon.tsx # Custom icon components
│ ├── code-terminal.tsx # Code snippet display
│ ├── copy-button.tsx # Copy to clipboard button
│ ├── file-list.tsx # File listing component
│ ├── file-upload.tsx # File upload component
│ ├── header.tsx # App header
│ └── help-popup.tsx # Help documentation popup
├── lib/ # Utility functions
├── public/ # Static assets
│ └── images/ # Image assets
├── .env.local # Environment variables (create this)
├── next.config.js # Next.js configuration
├── package.json # Project dependencies
├── tailwind.config.ts # Tailwind CSS configuration
└── tsconfig.json # TypeScript configuration
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Amirhossin Salmani - amirsalmani.com
Project Link: https://github.com/amhousa/VBU
Built with ❤️ by <a href="https://github.com/amhousa">
amhousa</a>