The first is raise requisites to make the feature.
Raised requistes:
Should be able to create a shortned
Should not able to create a shortned url of a nonexistent url(empty url)
Should the created shortned url have a expiration time of 30 days.
Should be able to set the shortned url as a alias given by user
Should not be able save a shortened url with blank spaces chars in alias given by user, replace the blank spaces in the middle of alias by hyphen instead, and blank spaces on start or end should be trimed.
Should not be able save a shortned url by user alias that exists
Should not be able to save a random generated url(generated by hashing) that already exists, regenerated until the generated url is unique
Should not be able to save an shortned url with an alias bigger than 20 characters
📍Goal: The regular should be able to create a shortned url from a original link, and the genereated url should have a default 30 days time to expires.
✅Tasks: