

Fast Project Start with NestJS Boilerplate
source link: https://dev.to/rodik/fast-project-start-with-nestjs-boilerplate-3992
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

NestJS boilerplate is a project that contains all necessary libraries and solutions like auth, mailing, etc. for fast-starting your project using a classic REST API approach.
Created in August 2020 it now has more than 700 stars on Github, and quite a big community around helping to develop it feature.
Motivation
I'm working for outsourcing company Brocoders, where we start new project from scratch quite often. NestJS is a popular framework for Node.js and we use it widely. However, setting up the project from scratch every time can be time-consuming, involving stuff such as configuring the database, migrations, seeding, mailing, sign-in, sign-up, translations, file uploading, etc.
To solve this problem, we created NestJS REST API Boilerplate with preconfigured basic features, for reducing app setup time from 1 month to just a few hours.
At the time we started our own boilerplate, there wasn't great production-ready alternative, so we decided to develop our own solution, that eventually became quite popular in other companies too.
Modules and features
We put the most popular modules always requested by our clients and put them together into a Boilerplate. So we finally have such a list of features included from the box:
- Database (PostgreSQL, TypeORM).
- Seeds (test data)
- Config Service (@nestjs/config).
- Mailing (nodemailer, u/nestjs-modules/mailer).
- Sign in and sign up via email
- Forgot password
- Social sign in (Apple, Facebook, Google, Twitter)
- Admin and User roles
- Serialization
- Translations I18N (nestjs-i18n)
- File uploads. Support local and Amazon S3 drivers
- Swagger for API documentation
- E2E and units tests
- Docker
- CI (Github Actions)
Quick start
In order to start a new project you just need to follow the basic instructions:
1. Clone repository
git clone --depth 1 https://github.com/brocoders/nestjs-boilerplate.git my-app
2. Go to folder, and copy env-example as .env
cd my-app/
cp env-example .env
3. Change DATABASE_HOST=postgres
to DATABASE_HOST=localhost
. Change MAIL_HOST=maildev
to MAIL_HOST=localhost
4. Run additional container:
docker compose up -d postgres adminer maildev redis
5. Install dependency
npm install
6. Run migrations
npm run migration:run
7. Run seeds
npm run seed:run
8. Run app in dev mode
npm run start:dev
9. Open http://localhost:3000
Summary
If you want start a project faster - you can try NestJS REST API boilerplate. It's quite simple, supported by our company, and well-written (I hope :-) )
The main in our plans currently is to improve documentation and keep all the dependencies up-to date. And if somebody have any other ideas or want to become a contributor - we always happy to meet new friends and accept pull requests.
Full Credits to the main developer: Vlad Shchepotin 🇺🇦
Recommend
-
44
Tower Web A web framework for Rust with a focus on removing boilerplate. API Documentation ...
-
36
NestJS Boilerplate A production :factory: ready NestJS boilerplate with batteries :battery: included. No Kidding!
-
4
Angular 13 + NestJS 8 starter project This is a Angular 13 (ngx-admin) + NestJS 8 boilerplate to easily start your own frontend + backend project. Features
-
15
Boilerplate Boilerplate to start-kit for any React Native Project. integrated following library. react-redux redux-thunk reduxsauce axios react-native-exception-handler react-native-restart moment react-na...
-
8
Buy VPS Search VPS or VDS in google https://www.google.com/search?q=vps+vds+server I choice this https://zt...
-
8
Boilerplate Start your new React-Native application with this React-Native boilerplate template Dec 28, 2022 2 min read
-
5
Fast byte searching with SIMD without a ton of boilerplate? TL;DR: I’m looking for a SIMD abstraction layer that will let me do some high-speed byte searching without having to worry about a dozen different...
-
8
NestJS REST API boilerplate Description NestJS REST API boilerplate for typical proj...
-
9
Fast Development With NodeJS: NestJS BoilerplateNotificationsHappy Weekend, enjoy these top stories from this week, Kaiseki, PIRATES, and more 💚Last Saturday at 6:00 PMHappy Weekend...
-
7
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK