Skip to content

Repository files navigation

URL Shortener

URL Shortener is a scalable and efficient link-shortening service built with Rust (Actix Web) for the backend, Next.js for the frontend, and Supabase (PostgreSQL) as the database.

🚀 Live Demo

The system is currently deployed at: https://url-shortener-steel-ten.vercel.app/

⚠️ Important Note

Due to the long URL generated by Vercel, the system does not work as expected. To make it fully functional, a shorter custom domain would be required.


🛠️ Installation & Usage

To run this project locally, follow these steps:

1️⃣ Clone the Repository

 git clone https://github.com/arrudagba/URL-Shortener.git
 cd URL-Shortener

2️⃣ Backend Setup (Rust + Actix Web)

Install Rust (if not installed):

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Install Dependencies:

cd rust
cargo build

Create a .env file in the backend directory:

touch .env

Then, add the following environment variables:

DATABASE_URL=<your_supabase_postgres_api>
BASE_URL=http://127.0.0.1:8080
PORT=8080

Run the Backend:

cargo run

3️⃣ Frontend Setup (Next.js)

Install Dependencies:

cd ..
npm install

Create a .env.local file in the frontend directory:

touch .env.local

Then, add the following:

NEXT_PUBLIC_API_URL=http://127.0.0.1:8080

Run the Frontend:

npm run dev

The application will be available at http://localhost:3000


📌 Features

  • Shorten long URLs into unique, short links
  • Store shortened URLs in Supabase (PostgreSQL)
  • Simple and minimal UI with Next.js

📜 License

This project is open-source and available under the MIT License.


🤝 Contributing

Feel free to open issues and submit pull requests to improve this project!


📧 Contact

For questions or suggestions, please open an issue in the repository.


About

URL Shortener made with Actix Web and Next.js

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages