Skip to content

jahid32/shortify

Repository files navigation

Project: RESTful API for a URL Shortener Service

This week, you'll build an interesting project: a RESTful API for a URL shortener service.

Project Features

Version 1 (v1):

  • User Registration
  • User Login: Returns an API key using Sanctum.
  • URL Shortening:
    • Using the API key, users can send a long URL and receive a shortened URL in response.
    • If the long URL already exists in the system, the service should return the previous shortened URL instead of creating a new one.
    • Only users with a valid API key can use this service.
  • Unique Short URLs:
    • Ensure all shortened URLs are unique to avoid collisions and unwanted bugs.
    • If a user submits the same long URL multiple times, they should receive the same shortened URL for that long URL.
  • List Registered URLs: Users can view a list of URLs they have registered via an endpoint.
  • URL Redirection: When a shortened URL is accessed in the browser, it should redirect to the original URL (using a simple redirect web route, not an API route).

Version 2 (v2):

  • Keep All v1 Functionalities
  • Visit Count: Track and display the visit count for each short URL.

Running the Project

Clone the repository

git clone https://github.com/jahid32/shortify.git

cd shortify

composer install

php artisan migrate

php artisan serve

Insomnia Export

Insomnia_2024-11-06.json

API Doc

http://localhost/docs/api

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages