Coder Social home page Coder Social logo

nestjs-starter's Introduction

ALADIA NestJs Starter Template

Getting Started

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 โœจ

Aladia Starter Template is based on NestJs v10.3^

Visit https://docs.nestjs.com/ to view the full documentation.

๐Ÿ  Structure

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
โ”‚   โ””โ”€โ”€ ...

๐Ÿ’Š Libraries inside the box

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 โœ…

๐Ÿ“ฆ Installation

Project requires Node.js v16.8+ to run.

  1. Make sure you have git, node, and npm installed.
  2. Clone this repository locally.
  3. Install NestJs CLI $ npm install -g @nestjs/cli
  4. Run $ gcloud auth login and then choose your Aladia google profile to retrieve user login info
  5. Run $ npm run login to interact with npm private repositories
  6. Run $ npm install to install all internal and external dependencies
  7. Run $ npm run start:dev to run live project
  8. Open localhost:3000 in your browser.
  9. Change .env.sample to .env
  10. Done โœ…

๐Ÿค– Development

# dev mode
$ npm run start:dev

# production mode
$ npm run start:prod

# before committing to git
$ npm run lint:fix

๐Ÿš€ Deployment

Deployment will be done by Aladia team.

๐Ÿฆพ Community

  1. Telegram
  2. Discord

nestjs-starter's People

Contributors

j-vitali avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.