Please judge me - URL Shortener Project

Hello there.

I tried my hand at the URL Shortener project a few months ago and got some pretty good results (here’s the original feedback post which is still live). Since then, I’ve been wanting to improve it and actually launch it as a website rather than a project page on a hosting platform. So… I did just that! Here’s the link to the website:

PuniUrl.com

Now, by improved, I mean to say I mostly improved the backend. I’ve left the frontend relatively the same since I like the extreme minimalism that it has. The biggest issue with the backend on the previous version was that it only retained the shortened links for 30 minutes after the last server instance was active. This is because I used Heroku to run the server and NeDB for the “database” to house all the links. Heroku goes to sleep after 30 minutes of inactivity and NeDB is a not-so-persistent database, so not the greatest combo in the world. As a proof of concept, this worked wonderfully but doesn’t really work as one would expect in production :upside_down_face:

The other big issue was technically from a security standpoint. That is to say, there was none. Not a single bit of protection.

To address these issues, I ended up going with Firebase since it has a very generous free tier database and is relatively simple to get started for intermediate developers, and I used Helmet JS for some basic level security.

All in all, I think it came out well, aside from some domain routing headaches that took a few hours to solve :sweat_smile:

Now for the tech stuff:

Link to the Github code

Stack:

  • Express JS (for the server)
  • Firebase (for the database)
  • Helmet JS (for the security)
  • Heroku (to run and host the server)
  • Pug (for the FE if anyone cares :stuck_out_tongue:)

Let me know what you guys would improve, would’ve done differently for the UI/UX/Backend, or heck, link to your version of the project if you’ve already gone through it.

Thanks for reading!

1 Like

Good job! I think you forgot one crucial element in your stack - testing :slight_smile: