VH7 is an all-in-one URL shortener, file sharing, and pastebin service. It provides a simple and efficient way to create short links, share files, and host code snippets or text pastes.
The production instance is available at vh7.uk.
- URL Shortener: Create short, easy-to-share links.
- File Sharing: Upload and share files with ease.
- Pastebin: Share code snippets and text with syntax highlighting.
- Advanced Controls: Set expiration dates and custom slugs for your shares.
- Developer Friendly: Built with a modern tech stack and a clean API.
VH7 is built entirely on the Cloudflare ecosystem for maximum performance and scalability:
- Frontend: React with Mantine for UI components, Vite for building, and Redux Toolkit for state management.
- Backend: Cloudflare Workers using the Hono framework.
- Database: Cloudflare D1 (SQLite-based serverless database) managed with Drizzle ORM.
- Object Storage: Cloudflare R2 for storing uploaded files.
- Tooling: Biome for linting and formatting, pnpm for package management.
The repository is organized into a monorepo with two main directories:
/app: The frontend React application./worker: The backend API and scheduled cleanup tasks.
- pnpm installed.
- Cloudflare Wrangler CLI installed (optional, but recommended).
-
Clone the repository:
git clone https://github.com/jakew/vh7.git cd vh7 -
Install dependencies:
pnpm install
-
Initialize the local database: In the
workerdirectory, run migrations to set up your local D1 instance:cd worker pnpm migrate:up cd ..
To run VH7 locally, you need to start both the backend and the frontend.
-
Start the Backend (Worker):
cd worker pnpm devThe API will be available at
http://localhost:8787. -
Start the Frontend (App): In a new terminal window:
cd app pnpm devThe application will be available at the URL provided by Vite (usually
http://localhost:5173).
Deployment is handled via Cloudflare. Ensure you have your wrangler.jsonc configured with the correct environment variables and bindings.
# Deploy the worker and assets
wrangler deployThis project is licensed under the MIT License - see the LICENSE file for details.