So Many Projects
At any given time, I have at least 3-5 personal development projects going on at once. It’s hard for me to stick to a single project because I always have new ideas that excite me and that I want to try out. I have been doing this continuously for the past two decades.
My first projects were in ASP, then ASP.NET when .NET was first released. I then transitioned to PHP and eventually to Java. Now my language of choice in TypeScript.
Since I am constantly starting a new project, I got tired of always having to set up each web application from scratch with the basic functionality I needed. Therefore, I decided to create a couple of boilerplate applications that I can just copy and already have the basis for the new project without any additional effort.
Both are based on Express.js and contain the following frameworks:
- TypeScript (for the TypeScript version)
- Express Enrouten
- compile-sass (based on node-sass)
- Marked (for Markdown)
- Highlight.js (for code highlighting)
- Matomo (for tracking with Matomo)
Since then I have maintained both on GitHub updating the packages and making sure they always run with the latest versions of Node.js and TypeScript.
An important part of the boilerplate apps for me is the features. Most of my projects need a certain set of features to get started which is why I made sure these boilerplate apps have them.
Here are the features I have included in them:
- Automatically configured controllers based on Express Enrouten
- SASS files compiled on page load when
- For all other environments, SASS files are automatically compiled and saved into CSS files in the public folder on the hard drive on application start.
- Support for websites in multiple languages
- Markdown rendering in Nunjucks templates or controllers
- Including support for code syntax highlighting
- Server-side page tracking with Matomo
- Configurable redirects
- Ability to create proxy routes (i.e. for frameworks like jQuery which appear in the
node_modulesfolder) so that they have an URL accessible from the browser such as
- Automatic TypeScript compilation and server restart when developing
- Pre-made Dockerfile
Before creating the boilerplate apps, I had to set all of that up each and every time for every project. It took a lot of time and I often lost interest in the project before I could even actually start with the project idea itself.
The boilerplate apps have formed the basis for business-critical applications at my various jobs as well as for my own personal websites. I continually update them with bug fixes and code changes as I learn new ways of solving old problems or have new feature ideas.
Of course, it was a no-brainer to me that the boilerplate apps should be open source, so they are available on GitHub here:
This article originally appeared on Alex’s Notebook.