Short N Sweet
About the Project
Short N Sweet is a lightning-fast URL shortener service built for simplicity, speed, and insight. It allows users to create, manage, and share shortened links while tracking detailed click analytics. Designed for individuals, businesses, and developers who want quick, reliable link management without bloat.
Tech Stack
- Frontend: React, TypeScript, Vite
- UI Library: shadcn/ui
- Backend & Routing: Hono (Cloudflare Workers & Durable Objects)
- Database: Cloudflare D1 (for storing URLs, click counts, metadata)
- Caching & Edge Delivery: Cloudflare KV & Workers Cache API
- State Management: React Context, hooks
- Notifications: Toasts for user feedback
- Other: QR code generation, copy-to-clipboard
Development Timeline
- Total Time: ~2 month
- Last Update: 2025-08-15
Key Features
- Shorten long URLs with a clean, minimal UI
- Track clicks, referrers, and geolocation analytics
- Custom link aliases and expiration dates
- QR code generation for any shortened URL
- Secure API routes using Hono middleware
- Cached redirects for ultra-low latency
- Copy-to-clipboard and share buttons with toasts
Challenges Faced
- Optimizing Redirect Speed: Leveraging Cloudflare KV and cache for near-instant resolution.
- Analytics at the Edge: Capturing click metadata without adding latency.
- Database Schema Design: Efficiently storing URLs, custom aliases, and analytics data in D1.
- Handling Abuse: Adding basic rate-limiting and spam protection via Hono middleware & Cloudflare.
- Cross-Device UX: Making the service equally usable on mobile and desktop.
What I Learned
- Edge-first development patterns with Cloudflare Workers, D1, and KV.
- Practical use of Hono for routing, middleware, and API handling.
- Balancing performance and analytics without hurting latency.
- Building fast, responsive dashboards with shadcn/ui.
- Importance of security in public-facing APIs.