Architecture

.github/workflows

Here you can create and store yml files for each github action.

lint.yml

Github action to run and show linter errors on each Pull request, by default it scans every pull request and push to main, develop or master branches.

.husky

Folder which stores github hooks, by default it contains pre-commit hook which prevents push without fixing linter errors.

.vscode

Settings and extensions specific to this project, for Visual Studio Code. See the editors doc for more.

docs

You found me! 😉

.vuepress

Documentation config and destination folder See VuePress docopen in new window for more

src

Where we keep all our source files.

common

Where we keep common typescript files, e.g. constants and DTOs.

database

Folder to store files which are connected only to database.

migrations

Folder to store application migrations which will be generated by typeorm.

factories

Factories are used to create entities which will be used in seeds.

seeds

Folder to store application seeds, it adds necessary data for the development.

decorators

This folder contains all global decoratorsopen in new window.

filters

In this folder you can find app level filtersopen in new window.

guards

You can store all guards here.

i18n

Internalization JSON files are storied here.

interceptors

Where we are keep interceptorsopen in new window.

interfaces

This folder contains typescript interfacesopen in new window

providers

These are utility functions you may want to share between many files in your application. They will always be pure and never have side effects, meaning if you provide a function the same arguments, it will always return the same result.

shared

Shared module with global singleton services.

modules

Where all our NestJS modules lives. See NestJS modules documentationopen in new window for more.

app.module.ts

The root application module.

boilerplate.polyfill.ts

We extend built in classes so you can use helper function anywhere.

const users: UserEntity[] = ...;

const userDtos = users.toDtos();
1
2
3

snake-naming.strategy.ts

We are using snake naming strategy for typeorm, so when you will generate migration it automatically will set snake_case column name from entity fields.

tests

Folder where we keep all our e2e test files.

.dockerignore

List a files which will be ignored during the docker build.

.env

Environment variables which will load before app start and will be stored in process.env, (*) is a env name (development, test, staging, production)

.eslintrc.js

Eslint configuration file, See the eslint docopen in new window for more.

docker-compose.yml

Docker compose configuration file, See the docker docsopen in new window for more.

Dockerfile

basic Dockerfile configuration to build the app, See the docker docsopen in new window for more.

ormconfig.ts

Typeorm configuration file which is used for migrations and seeds.

Last Updated:
Contributors: Narek, narek