This is a URL shortener web application built using React.js, Axios, Vite, and Tailwind CSS. It leverages the Rebrandly API for URL shortening functionality and includes a convenient "Copy to Clipboard" feature.
- Shorten long URLs with a single click.
- Copy shortened URLs to the clipboard.
- Click on shortened URLs to open the original link in a new tab.
You can access a live demo of the URL shortener here: Live Demo
To run this project locally, follow these steps:
-
Clone the repository:
git clone https://github.com/yourusername/url-shortener.git
-
Navigate to the project directory:
cd url-shortener
-
Install dependencies:
npm install
-
Configure your Rebrandly API key:
-
Create an account on Rebrandly if you don't have one.
-
Obtain your Rebrandly API key.
-
Create a
.env
file in the project root and add your API key:REBRANDLY_API_KEY=your_api_key_here
-
-
Start the development server:
npm run dev
-
Open your browser and visit
http://localhost:5173
to use the URL shortener.
- Enter the long URL you want to shorten in the input field.
- Click the "Shorten" button.
- The shortened URL will be displayed below.
- Click the "Copy to Clipboard" button to copy the shortened URL.
Contributions are welcome! If you'd like to contribute to this project, please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bug fix:
git checkout -b feature/your-feature-name
- Make your changes and commit them:
git commit -m "Add your commit message here"
- Push your changes to your fork:
git push origin feature/your-feature-name
- Create a pull request to the
main
branch of the original repository.
- Thanks to Rebrandly for providing the URL shortening API.
- This project was built with React.js, Axios, Vite, and Tailwind CSS.
If you have any questions or feedback, feel free to reach out to me.