A modern URL shortener built with Next.js 14 using the App Router.
- ✅ Shorten any URL: Convert long URLs into easy-to-share short links
- ✅ Custom aliases: Create personalized short URLs with custom aliases
- ✅ Fast redirects: Optimized for quick redirection to destination pages
- ✅ SEO Friendly: This uses Next JS built-in SEO setup
- ✅ Modern UI: Clean interface built with Tailwind CSS and Daisy UI
- ✅ Personalized linter and formatter: Using Biome as the main linter and formatter
- ✅ Base Typography Setup: It uses Tailwind CSS official Typography lib
- Visit the homepage
- Enter the long URL you want to shorten in the input field
- (Optional) Enter a custom alias if you want a specific shortcode
- Click "Shorten" button
- Copy your new short URL to share
Simply visit shortin.yehezgun.com/[shortcode]
and you'll be automatically redirected to the original URL if you've made the shorten url before here.
- Frontend: Next.js 14 (App Router), Tailwind CSS, Daisy UI
- Linting/Formatting: Biome
- SEO: Next.js built-in SEO optimization
- Typography: Tailwind CSS Typography plugin
-
Clone the repository
git clone https://github.com/yehezkielgunawan/shortin-v2.git cd shortin-v2
-
Install dependencies
npm install
-
Create a
.env.local
file with your environment variablesNEXT_PUBLIC_API_URL=your_api_url_here
-
Run the development server
npm run dev
-
Open http://localhost:3000 in your browser
The project includes API routes to handle URL shortening and redirection:
POST /api/shorten
: Creates a new shortened URLGET /api/[shortcode]
: Retrieves the original URL for redirection
Follow standard Next.js deployment procedures using your preferred hosting service like Vercel, Netlify, or a custom server.
MIT
Built with ❤️ by Yehezkiel Gunawan