Minimal URL shortener with a React dashboard, categories, analytics, and QR codes.
- Create, edit, and delete short links
- Categories and basic analytics
- QR code generation
- Token-protected API
- SQLite storage via Drizzle ORM
- Frontend: Vite + React + Tailwind
- Backend: Hono + Drizzle + SQLite
- Tooling: pnpm, Biome
backend/ Hono API + SQLite/Drizzle
frontend/ React dashboard (Vite)
pnpm install
cp .env.demo .env
pnpm devThe frontend runs on Vite and the backend on port 3000 by default.
Copy .env.demo to .env and adjust as needed.
| Name | Description | Example |
|---|---|---|
DB_FILE_NAME |
SQLite database path (libsql format) | file:local.db |
BACKEND_PORT |
Backend port | 3000 |
VITE_BACKEND_TOKEN |
Bearer token for protected routes | supersecrettoken |
VITE_BACKEND_API_URL |
Public API base URL | https://mydomain.com |
docker compose up -d --buildIf you use Traefik, point VITE_BACKEND_API_URL to your API domain and keep
VITE_BACKEND_PORT empty so the frontend doesn’t append :3000.
All protected routes require a Bearer token.
Authorization: Bearer <VITE_BACKEND_TOKEN>
pnpm dev # run frontend + backend
pnpm dev:backend # backend only
pnpm dev:frontend # frontend only
pnpm db # generate + push drizzle migrations
pnpm check # biome check