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 loginand then chooseyour Aladia google profileto retrieve user login info - Run
$ npm run loginto interact with npm private repositories - Run
$ npm installto install all internal and external dependencies - Run
$ npm run start:devto run live project - Open
localhost:3000in your browser. - Change
.env.sampleto.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