NestJs v10.x Boilerplate. Repository Design Pattern. MongoDB (Mongoose). Containerization.
MIT License
This repo will representative of authentication service and authorization service
[ACK NestJs][ack] is a Http NestJs v10.x boilerplate. Best uses for backend service.
You can request feature or report bug with following this link
Very limited documentation
replication set
for database transactions
.Google SSO
. You must have google cloud console account, then create your own Credential to get the clientId
and clientSecret
.Apple SSO
. You must have clientId
and signInClientId
.APP_ENV
to production
, that will trigger.
src/configs/middleware.config.ts
.disable
./api
.sentry.io
, and only send 500
or internal server error
.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.
Describes which version.
Name | Version |
---|---|
NestJs | v10.x |
NestJs Swagger | v7.x |
NodeJs | v20.x |
Typescript | v5.x |
Mongoose | v10.x |
MongoDB | v7.x |
Yarn | v1.x |
NPM | v10.x |
Docker | v24.x |
Docker Compose | v2.x |
Access Token
, Refresh Token
, API Key
, Google SSO
, Apple SSO
)decorator
i18n
, can controllable with request header x-custom-lang
class-validation
1
Before start, we need to install some packages and tools. The recommended version is the LTS version for every tool and package.
Make sure to check that the tools have been installed successfully.
Clone the project with git.
git clone https://github.com/andrechristikan/ack-nestjs-boilerplate.git
This project needs some dependencies. Let's go install it.
yarn install
Make your own environment file with a copy of env.example
and adjust values to suit your own environment.
cp .env.example .env
By default the options of AutoCreate
and AutoIndex
will be false
. Thats means the schema in MongoDb will not change with the latest.
So to update the schema we need to run
yarn migrate
After migrate the schema, also we need to run data seed
yarn seed
Optional
The email will automatically create email template through AWS SES if we set the value at .env
file
For migrate
yarn migrate:email
Finally, Cheers !!! you passed all steps.
Now you can run the project.
yarn start:dev
For docker installation, we need more tools to be installed.
Make your own environment file with a copy of env.example
and adjust values to suit your own environment.
cp .env.example .env
then run
docker-compose up -d
The project only provide unit testing
.
yarn test
You can check The Swagger after running this project. Url localhost:3000/docs
and don't for get to put x-api-key
on header.
api key: v8VB0yY887lMpTA2VJMV
api key secret: zeZbtGTugBTn3Qd5UXtSZBwt7gn3bg
[email protected]
aaAA@123
[email protected]
aaAA@123
[email protected]
aaAA@123
[email protected]
aaAA@123
This available with docker installation
You can check and monitor your queue. Url localhost:3010
admin
admin123
This available with docker installation
You can check redis data using redis-commander
. Url localhost:3011
This available with docker installation
You can check mongodb data using mongo-express
. Url localhost:3012
admin
admin123
Distributed under MIT licensed.
How to contribute in this repo
git checkout -b my-branch
If your code behind commit with the original/main branch
, please update your code and resolve the conflict.