A URL shortener web application built with Next.js, Redis Upstash for database storage, and Shadcn for UI components.
This web application allows users to shorten URLs, making them more manageable and easier to share. It provides a simple interface for users to input a long URL and receive a shortened version that redirects to the original URL.
- Shorten long URLs to more manageable links
- Store shortened URLs in a Redis Upstash database
- Simple and user-friendly interface
- Built with modern web technologies for optimal performance
- Next.js - React framework for server-side rendering and static site generation
- Redis Upstash - Redis cloud service for database storage
- Shadcn - UI component library for styling and user interface design
- Tailwind CSS - Utility-first CSS framework for styling
-
Clone the repository:
git clone https://github.com/your-username/url-shortener.git
-
Install dependencies:
cd url-shortener npm install
-
Configure environment variables:
Create a
.env.local
file in the root directory and add the following environment variables:NEXT_PUBLIC_REDIS_URL=your-redis-upstash-url
Replace
your-redis-upstash-url
with your Redis Upstash connection URL. -
Run the development server:
npm run dev
-
Open your browser and navigate to http://localhost:3000 to view the application.
- Enter a long URL into the input field.
- Click the "Shorten" button to generate a shortened URL.
- Copy the shortened URL and share it as needed.
Contributions are welcome! Feel free to open issues or submit pull requests to contribute to this project.
This project is licensed under the MIT License.