Skip to content

Built a URL shortener with reactjs(tsx), axios, vite and tailwindcss, leveraging on rebrandly API. It also has copy-to-clipboard functionality.

Notifications You must be signed in to change notification settings

Signor1/URLShortenerWithRebrandly

Repository files navigation

URL Shortener with React.js and Rebrandly API

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.

Features

  • 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.

Demo

You can access a live demo of the URL shortener here: Live Demo

Installation

To run this project locally, follow these steps:

  1. Clone the repository:

    git clone https://github.com/yourusername/url-shortener.git
  2. Navigate to the project directory:

    cd url-shortener
  3. Install dependencies:

    npm install
  4. 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
  5. Start the development server:

    npm run dev
  6. Open your browser and visit http://localhost:5173 to use the URL shortener.

Usage

  1. Enter the long URL you want to shorten in the input field.
  2. Click the "Shorten" button.
  3. The shortened URL will be displayed below.
  4. Click the "Copy to Clipboard" button to copy the shortened URL.

Contributing

Contributions are welcome! If you'd like to contribute to this project, please follow these steps:

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix:
    git checkout -b feature/your-feature-name
  3. Make your changes and commit them:
    git commit -m "Add your commit message here"
  4. Push your changes to your fork:
    git push origin feature/your-feature-name
  5. Create a pull request to the main branch of the original repository.

Acknowledgments

Contact

If you have any questions or feedback, feel free to reach out to me.

About

Built a URL shortener with reactjs(tsx), axios, vite and tailwindcss, leveraging on rebrandly API. It also has copy-to-clipboard functionality.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published