https://github.com/vaibhav135/url-shortner
A Simple url shortner with next.js
https://github.com/vaibhav135/url-shortner
nextjs13 postgresql tailwindcss typescript url-shortener
Last synced: 4 months ago
JSON representation
A Simple url shortner with next.js
- Host: GitHub
- URL: https://github.com/vaibhav135/url-shortner
- Owner: vaibhav135
- License: mit
- Created: 2023-09-29T12:39:39.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-19T19:26:04.000Z (almost 2 years ago)
- Last Synced: 2025-05-05T01:08:44.361Z (about 1 year ago)
- Topics: nextjs13, postgresql, tailwindcss, typescript, url-shortener
- Language: TypeScript
- Homepage: https://shorty-url.vaibhav135.com
- Size: 8.65 MB
- Stars: 7
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# url-shortner
A simple URL shortener built with Next.js, TypeScript, PostgreSQL, and Tailwind CSS.
## Features
- **Shorten URLs**: Create short links for long URLs.
- **Redirection**: Redirect to the original URL when accessing the short link.
- **API**: REST API for shortening URLs programmatically.
- **QR Code Generation**: Instantly generate a QR code for each short link, allowing for quick access on mobile devices.
## Installation
1. Clone the repository:
```bash
git clone https://github.com/vaibhav135/url-shortner.git
cd url-shortner
```
2. Install dependencies:
```bash
npm install
```
3. Set up environment variables:
Create a .env file in the root directory and configure the required environment variables (e.g., database connection, API keys).
4. Run database migrations:
```bash
npx prisma migrate dev
```
5. Start the development server:
```bash
npm run dev
```
## Usage
Access the application in your browser at http://localhost:3000.
Use the form to shorten your URL.
Use the generated short link to be redirected to the original URL.
## Technologies Used
- **Next.js**: Framework for building server-side rendered React applications.
- **TypeScript**: Typed superset of JavaScript for better code quality.
- **PostgreSQL**: Database for storing URLs and their short versions.
- **Tailwind CSS**: Utility-first CSS framework for styling.
## Contributing
Contributions are welcome! Please fork the repository and submit a pull request.
License
This project is licensed under the MIT License.