MERN URL Shortener

(post deleted by author)

Hey Ethan,

happy to give you some feedback. I have a lot of suggestions here, but please don’t take that the wrong way - overall this looks really nice and works well. I just wanted to give you some ideas for what to consider.

The interface looks great - clean & fairly consistent design, responsive - nice work. I’m nitpicking at this point:

  • maybe re-use the orange from the main button as an accent color somewhere else to bring the design together a bit more
  • perhaps work a bit more on the menu bar or get rid of it, it looks bland compared to the rest
  • I would increase the font size of the input placeholder a touch

Overall, it works nicely. A few thoughts on areas of improvement:

  • it’s quite easy to look at links other people have shortened by just going down the list of URLs… It’s fine for a demo, but could be a privacy concern. Maybe use a random ID instead.
  • your api can be accessed from any origin, that could also be risky. You can restrict it to the domain where your frontend is hosted
  • you’re polling for new data very frequently - I would tone that down (a lot)

Code organisation:
I took a quick look at the repo and it’s a bit hard to tell what’s what. Here are a few suggestions:

  • Organize stuff into folders a bit more
  • Break down your components more - Home.js for example does way too much. For instance you could separate components that contain application logic (smart components) from components that contain content / html (dumb components)
  • add the build folder to the gitignore file
  • remove all that commented out code

Happy coding!

1 Like

(post deleted by author)

(post deleted by author)

There are many tools to shorten website links

(post deleted by author)

(post deleted by author)