Boilerplate for Hobby Projects

Visakh Vijayan
2 min readMar 16, 2024

As software engineers, we all have that eureka moment once in a while when we come up with a solution and just want to get into coding. But the blockage is setting up the project. A majority of us give up in the initial stages due to the silly errors that come up every time we try to set up a new project.

Well, this time when one of our team members had a unique solution to a problem we thought let us stop and make a boilerplate of the project first.

A boilerplate will have all the necessary stuff in built, so that you can focus on the solution directly instead of setting up the trivial things.

Imagine if it is a todo application that you are trying to build, it will already have —

  1. A robust framework that allows you to focus on the solution and not the architecture. We used NestJs for this.
  2. The database services are inbuilt — you will just have to plugin the database connectivity string and the database provider type.
  3. The configuration module is set so that managing secrets is simple
  4. The accounts module — No significant product can be without accounts. The boilerplate will come inbuilt with CRUD endpoints for account management.
  5. The authentication setup — Any project that needs an account, needs an authentication mechanism as well. This is taken care of by JWTs.
  6. Middleware to check authorizations. We did this via Interceptors.
  7. Linters, prettiers, ORMs, and data validators in built.
  8. Last but not least, the CI/CD and quality checkers via GitHub Actions

Keep Simplifying It

It is a continuously evolving thing as we find more and more ways to minimize the initial hiccups. Our aim is one day, it will be a one-click setup for any new product. So that you can dive right into the solution and not the setup.

And here is what we have so far — https://github.com/visakhvjn/api-boilerplate-nestjs

Feel free to raise PRs against it and use it at your convenience. Happy coding!

--

--

Visakh Vijayan

Techie from Kerala, India. Days are for coding, nights for weaving tales of tech, travel, and finance. Join me in exploring this multifaceted journey