These days I've favored going entirely with JavaScript for my full stack, MEAN-ish if you will. I choose to organize my project as a monorepo to encapsulate all of the subsystems in the stack. I use Lerna to manage the monorepo. No boilerplate at this level yet except for my previous projects. Some day I'll compile my pattern together with Yeoman.
NOTE: Yeoman is a really great tool to use for scaffolding and boilerplate code. Check out their project generators here.
I create an NPM package for each subsystem, all organized as subprojects of the monorepo. I create a frontend package, a backend package, a shared code package, an Nginx package, and a database package, if necessary. Each package, except for the shared package, also gets a Dockerfile so that each project is containerized. I use docker-compose to orchestrate all of the subsystems together. Conveniently this pattern is also deployable to Amazon ECS if I want to deploy my project externally.
TypeScript is a must for me. Everything JS I implement with TypeScript.
I mostly use NPM scripts for automation. However, for more complicated tasks, I'll use Gulp and custom Node scripts using commander. Shell scripts are too esoteric most of the time.
For cloud-deployed projects, I use Terraform for codifying infrastructure definition.
I've also been investigating using Vault for secrets management.
I prefer Angular 5 as my choice for frontend framework. So the Angular CLI is the scaffolding tool for me. The CLI will automatically bring in Angular, TypeScript, a CSS preprocessor of your choice (I use Sass), and Webpack. I usually add Angular Material for UI components as well and maybe Bootstrap 4.
My boilerplate code on the backend is currently just homegrown. But I'm excited to try out NestJS for the my next project.
I use Express solely as an API server since I'm leveraging Angular for single page application capabilities. However, I will use Angular Universal if the project calls for server-side rendering.
I also include Inversify for dependency injection and inversify-express-utils to improve how the Express code is structured. If I'm using a database, I'll include Sequelize or Mongoose (well actually their TypeScript counterparts sequelize-typescript and Typegoose).
I usually prefer using a relational database over NoSQL. Postgres has been my DB of choice lately. If I go NoSQL, I'll use Mongo. Either way I use Sequelize or Mongoose as ORMs.
I apologize if all of that was information overload, but I figured that I would be thorough.
jalpesh vadgama
Co-Founder, FutureStack Solution, Full Stack developer having more than 13+ years of experience in web technologies.