Aladia comes with a starter template for all internal microservices.
Here are some rules we want you to follow:
- Write clean code
- Respect folders architecture
- Have a strong organization of files & folders
- All extra required plugins/libraries will be discussed in team
- โจ Magic โจ
Visit https://docs.nestjs.com/ to view the full documentation.
Folder & Files structure
โโโ data Dummy JSON data for avoiding database stored data
โโโ src
โ โโโ config Config folder containing all config files
โ โโโ common Common code and interfaces
โ โ โโโ enums Common ENUMS
โ โ โโโ utils Common Ultils functions, like date transformer...
โ โโโ users Example Module (All modules must be root path based)
โ โโโ ... Other Module here...
โ โโโ ... Other Module here...
โ โโโ core App modules & core files, schemas, etc.
โ โ โโโ casl CASL ability
โ โ โโโ cache Cache module
โ โ โโโ decorators Data transfer objects for input/output validation
โ โ โโโ external Interfaces related to the user module
โ โ โโโ interfaces Services to handle business logic
โ โ โโโ interceptors Services to handle business logic
โ โ โโโ locales Locales for internationalization
โ โ โโโ middlewares Middlewares folder
โ โโโ ...
Starter template comes with the following libraries:
Name | Link | Installed | Internal by Aladia |
---|---|---|---|
NestJs v10.3^ | https://docs.nestjs.com | โ | |
All required NestJs libraries | https://docs.nestjs.com | โ | |
PubSub | https://docs.nestjs.com | โ | โ |
gRPC | https://www.npmjs.com/package/@grpc/grpc-js | โ | โ |
Mongoose | https://mongoosejs.com | โ | |
Date & Time formats | https://day.js.org | โ | |
Lodash | https://lodash.com | โ |
Project requires Node.js v16.8+ to run.
- Make sure you have git, node, and npm installed.
- Clone this repository locally.
- Install NestJs CLI
$ npm install -g @nestjs/cli
- Run
$ gcloud auth login
and then chooseyour Aladia google profile
to retrieve user login info - Run
$ npm run login
to interact with npm private repositories - Run
$ npm install
to install all internal and external dependencies - Run
$ npm run start:dev
to run live project - Open
localhost:3000
in your browser. - Change
.env.sample
to.env
- Done โ
# dev mode
$ npm run start:dev
# production mode
$ npm run start:prod
# before committing to git
$ npm run lint:fix
Deployment will be done by Aladia team.
- Telegram
- Discord