Best uses for Restful API, Microservice, or SaaS Project
ack-nestjs-boilerplate-mongoose is a NestJs Boilerplate with Mongoose and MongoDB as Database.
Made with following
- nodejs-best-practice
- The Twelve-Factor App
- NestJs Habit.
You can Request Feature or Report Bug with following this link
ack-nestjs-boilerplate-mongoose still on trial and error phase and the test will base on real projects or cases. So there will be (always) have new update and new features.
If you change env value of APP_MODE
to secure
that will trigger more Middleware
and Guard
.
TimestampMiddleware
, tolerant 5 minutes of request.UserAgentMiddleware
, whitelist of user agent.ApiKeyGuard
, check api key based on database.CorsMiddleware
, check cors based on configs.
You can see our e2e testing file
or read the documentation on section environment.
Describes which version .
Name | Version |
---|---|
NestJs | v9.x |
NodeJs | v18.x |
Typescript | v4.x |
Mongoose | v6.x |
MongoDB | v5.x |
Yarn | v1.x |
NPM | v8.x |
Docker | v20.x |
Docker Compose | v2.x |
ack-nestjs-boilerplate-mongoose have some objective.
- Simple, scalable and secure
- Avoid spaghetti code
- Component based
- Reusable component
- Easy to maintenance
- Support for all microservice patterns
- NestJs v9.x 🥳
- Production Ready 🔥
- Typescript 🚀
- Authentication and Authorization (JWT, OAuth2, API Key, Basic Auth, Role Management) 💪
- User Agent Check
- MongoDB Integrate by Using Mongoose Package 🎉
- Database Migration (NestJs-Command)
- Storage with AWS (S3)
- Server Side Pagination (3 Types)
- Url Versioning
- Request Validation Pipe with Custom Message 🛑
- Custom Error Status Code 🤫
- Logger (Morgan) and Debugger (Winston) 📝
- Centralize Configuration 🤖
- Centralize Exception Filter, and Custom Error Structure
- Multi-language (i18n) 🗣
- Timezone Awareness, and Custom Timezone
- Request Timeout, and Request Custom Timeout (Override) ⌛️
- Dynamic Setting from Database 🗿
- Maintenance Mode on / off 🐤
- Server Side Pagination
- Cache Manager Implementation
- Support Docker Installation
- Support CI/CD with Github Action or Jenkins
- Husky GitHook For Check Source Code, and Run Test Before Commit 🐶
- Linter with EsLint for Typescript
We assume that everyone who comes here is programmer with intermediate knowledge
and we also need to understand more before we begin in order to reduce the knowledge gap.
- Understand NestJs Fundamental, Main Framework. NodeJs Framework with support fully TypeScript.
- UnderstandTypescript Fundamental, Programming Language. It will help us to write and read the code.
- Understand ExpressJs Fundamental, NodeJs Base Framework. It will help us in understanding how the NestJs Framework works.
- Understand what NoSql is and how it works as a database, especially MongoDB.
- Optional, Understand Microservice Architecture and the design pattern.
- Optional,The Twelve Factor Apps
- Optional, Understand Docker that can help you to run the project
Next development
- Import data form excel
- Utils unit test
- Update Documentation
- Timezone in serialization and dto
- Versioning Serialization
- Docker Compose File Mongodb Replication Set (Low Priority)
- Swagger (Low Priority)
ack-nestjs-boilerplate-mongoose has advance example. Feel free to check it by yourself.
Let's go into deep ! 🚀
Import endpoints.json into postman or see our e2e testing
Support pub/sub design pattern
Nestjs microservice or Kafka integration will put in separate repo ack-microservice-nestjs-boilerplate-mongoose.
Distributed under MIT licensed.
Thanks goes to these wonderful people
PSheon |
aallithioo |
Tiaamoo |