https://github.com/timooo-thy/url-shortener
URL Shortener
https://github.com/timooo-thy/url-shortener
hono nextjs postgresql prisma redis shadcn-ui tailwindcss typescript
Last synced: 4 months ago
JSON representation
URL Shortener
- Host: GitHub
- URL: https://github.com/timooo-thy/url-shortener
- Owner: timooo-thy
- License: mit
- Created: 2024-11-03T07:16:46.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-18T04:31:19.000Z (over 1 year ago)
- Last Synced: 2025-02-14T05:42:30.507Z (over 1 year ago)
- Topics: hono, nextjs, postgresql, prisma, redis, shadcn-ui, tailwindcss, typescript
- Language: TypeScript
- Homepage: https://shoooort.vercel.app/
- Size: 344 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Modern URL Shortener
A high-performance URL shortening service built with Next.js, TypeScript, Hono, Redis, and PostgreSQL.
## 🚀 Features
- Fast URL shortening [x]
- High-performance redirects using Redis caching [x]
- RESTful API built with Hono middleware [x]
- Automatic URL expiration [x]
- Built-in rate limiting [x]
- TypeScript for type safety [x]
- Responsive web interface [x]
## 🏗️ Architecture
- **Frontend**: Next.js with TypeScript and shadcn/ui
- **API Layer**: Hono middleware for efficient routing (RPC)
- **Caching**: Redis for high-speed lookups
- **Database**: PostgreSQL for permanent storage
- **ORM**: Prisma for type-safe database operations
## 🔧 Technical Highlights
- Redis pipelining for atomic operations
- Efficient caching with automatic TTL refresh
- Database connection pooling
- Edge-ready with Vercel deployment
- Rate limiting using Redis
- Type-safe API endpoints
## 📦 Installation
```bash
# Clone the repository
git clone https://github.com/timooo-thy/url-shortener.git
# Install dependencies
npm install
# Set up environment variables
cp .env.example .env.local
# Push database changes
npx primsa db push
# Start development server
npm run dev
```