A modern, minimal URL shortener built with Next.js 15, Supabase, and Tailwind CSS.
- 🔗 Shorten long URLs instantly
- 📊 Click tracking
- 🎨 Beautiful, minimal UI with floating navbar and footer
- 📱 Fully responsive design
- ⚡ Fast and reliable with Supabase backend
- 🔒 Secure with Row Level Security
- Framework: Next.js 15 with App Router
- Database: Supabase (PostgreSQL)
- Styling: Tailwind CSS
- Icons: Lucide React
- ID Generation: nanoid
- Language: TypeScript
- Go to Supabase and create a new project
- In the SQL Editor, run the commands from
database-schema.sqlto create the required table - Copy your project URL and anon key from Settings > API
Create a .env.local file in the root directory:
NEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_keynpm installnpm run devOpen http://localhost:3000 in your browser.
- Enter a long URL in the input field
- Click "Shorten URL"
- Copy the generated short URL
- Share your short URL - it will redirect to the original URL and track clicks
src/
├── app/
│ ├── components/ # React components
│ │ ├── Navbar.tsx # Floating navigation bar
│ │ ├── Footer.tsx # Minimal footer with social links
│ │ └── UrlShortenerForm.tsx # Main URL shortening form
│ ├── [shortCode]/ # Dynamic route for redirects
│ │ └── page.tsx
│ └── api/
│ └── [shortCode]/ # API route for redirects
│ └── route.ts
└── lib/
└── supabase.ts # Supabase client configuration
MIT License - feel free to use this project for your own purposes.