I created my own personal url shortener.

What is a relatively simple project that can be built in a short time? That’s right! A custom url shortener. So I built my own shortener in Typescript using the Next.js framework and Redis as the database. Building this with Redis was definitely a new experience, but all the more interesting to work with because it was very easy to store an actual key and reference the original url with that key. There weren’t many problems, but there were problems related to the fact that I didn’t know anything about it at the beginning. I can definitely see using this in future projects where storing such small elements is required. With Next.js I have a bit more experience and there is nothing more to say, I really like this framework because it is so easy to use and offers many solutions from the beginning.

The shortener uses a base10 to base62 encoding and returns the shortened url once. After that, the generated url is no longer displayed and a new one must be created. The shortened url does not redirect directly, but you have to confirm that you want to enter the page. I did this because it could redirect to a malicious link and I wanted the person clicking on the link to have to confirm that they trust the link. For now, that’s all I’ve done and there are no new features planned because it’s not supposed to offer much more. Maybe in the future I will add something new, but for now I have finished this little project.

Website: surl.pskll.dev