|
1 | 1 | # Architecture
|
2 | 2 |
|
| 3 | +This document describes the architecture of the project. |
| 4 | + |
| 5 | +- [Architecture](#architecture) |
| 6 | + - [`.github/workflows`](#githubworkflows) |
| 7 | + - [`check-semantic-prs.yml`](#check-semantic-prsyml) |
| 8 | + - [`ci.yml`](#ciyml) |
| 9 | + - [`deploy-docs.yml`](#deploy-docsyml) |
| 10 | + - [`.husky`](#husky) |
| 11 | + - [`docs`](#docs) |
| 12 | + - [`.vuepress`](#vuepress) |
| 13 | + - [`src`](#src) |
| 14 | + - [`api`](#api) |
| 15 | + - [`background`](#background) |
| 16 | + - [`common`](#common) |
| 17 | + - [`dto`](#dto) |
| 18 | + - [`interfaces`](#interfaces) |
| 19 | + - [`types`](#types) |
| 20 | + - [`config`](#config) |
| 21 | + - [`constants`](#constants) |
| 22 | + - [`database`](#database) |
| 23 | + - [`config` (for database)](#config-for-database) |
| 24 | + - [`decorators` (for database)](#decorators-for-database) |
| 25 | + - [`entities`](#entities) |
| 26 | + - [`migrations`](#migrations) |
| 27 | + - [`seeds`](#seeds) |
| 28 | + - [`data-source.ts`](#data-sourcets) |
| 29 | + - [`decorators`](#decorators) |
| 30 | + - [`exceptions`](#exceptions) |
| 31 | + - [`filters`](#filters) |
| 32 | + - [`generated`](#generated) |
| 33 | + - [`guards`](#guards) |
| 34 | + - [`i18n`](#i18n) |
| 35 | + - [`interceptors`](#interceptors) |
| 36 | + - [`libs`](#libs) |
| 37 | + - [`shared`](#shared) |
| 38 | + - [`utils`](#utils) |
| 39 | + - [`app.module.ts`](#appmodulets) |
| 40 | + - [`main.ts`](#maints) |
| 41 | + - [`test`](#test) |
| 42 | + - [`.env`](#env) |
| 43 | + - [`.gitignore`](#gitignore) |
| 44 | + - [`.prettierrc`](#prettierrc) |
| 45 | + - [`commitlint.config.mjs`](#commitlintconfigmjs) |
| 46 | + - [`docker-compose.yml`](#docker-composeyml) |
| 47 | + - [`Dockerfile`](#dockerfile) |
| 48 | + - [`eslint.config.mjs`](#eslintconfigmjs) |
| 49 | + - [`jest.config.json`](#jestconfigjson) |
| 50 | + - [`lint-staged.config.mjs`](#lint-stagedconfigmjs) |
| 51 | + - [`nest-cli.json`](#nest-clijson) |
| 52 | + - [`package.json`](#packagejson) |
| 53 | + - [`pnpm-lock.yaml`](#pnpm-lockyaml) |
| 54 | + - [`README.md`](#readmemd) |
| 55 | + - [`renovate.json`](#renovatejson) |
| 56 | + - [`setup-jest.mjs`](#setup-jestmjs) |
| 57 | + - [`tsconfig.build.json`](#tsconfigbuildjson) |
| 58 | + - [`tsconfig.json`](#tsconfigjson) |
| 59 | + |
| 60 | +## `.github/workflows` |
| 61 | + |
| 62 | +Here you can create and store yml files for each github action. |
| 63 | + |
| 64 | +### `check-semantic-prs.yml` |
| 65 | + |
| 66 | +Github action to check if the PR title is following the semantic commit message. |
| 67 | + |
| 68 | +### `ci.yml` |
| 69 | + |
| 70 | +Github action to run the test and build the project. |
| 71 | + |
| 72 | +### `deploy-docs.yml` |
| 73 | + |
| 74 | +Github action to deploy the documentation to the `gh-pages` branch. |
| 75 | + |
| 76 | +## `.husky` |
| 77 | + |
| 78 | +Husky is a tool to prevent bad git commit, git push, and more. See [the husky doc](https://typicode.github.io/husky/) for more. |
| 79 | + |
| 80 | +## `docs` |
| 81 | + |
| 82 | +Folder where we keep all our documentation files. |
| 83 | + |
| 84 | +### `.vuepress` |
| 85 | + |
| 86 | +Folder where we keep all our vuepress configuration files. See [the vuepress doc](https://vuepress.vuejs.org/) for more. |
| 87 | + |
| 88 | +## `src` |
| 89 | + |
| 90 | +Where we keep all our source files. |
| 91 | + |
| 92 | +### `api` |
| 93 | + |
| 94 | +### `background` |
| 95 | + |
| 96 | +### `common` |
| 97 | + |
| 98 | +Where we keep common typescript files, e.g. DTOs, interfaces, types. |
| 99 | + |
| 100 | +#### `dto` |
| 101 | + |
| 102 | +Where we keep all our DTOs. |
| 103 | + |
| 104 | +#### `interfaces` |
| 105 | + |
| 106 | +Where we keep all typescript [interfaces](https://www.typescriptlang.org/docs/handbook/interfaces.html). |
| 107 | + |
| 108 | +#### `types` |
| 109 | + |
| 110 | +Where we keep all typescript [types](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html). |
| 111 | + |
| 112 | +### `config` |
| 113 | + |
| 114 | +Where we keep application configuration files. |
| 115 | + |
| 116 | +### `constants` |
| 117 | + |
| 118 | +Where we keep all our constants. |
| 119 | + |
| 120 | +### `database` |
| 121 | + |
| 122 | +Folder to store files which are connected only to database. |
| 123 | + |
| 124 | +#### `config` (for database) |
| 125 | + |
| 126 | +Folder to store database configuration files. |
| 127 | + |
| 128 | +#### `decorators` (for database) |
| 129 | + |
| 130 | +Folder to store database decorators. |
| 131 | + |
| 132 | +#### `entities` |
| 133 | + |
| 134 | +Folder to store application common entities |
| 135 | + |
| 136 | +#### `migrations` |
| 137 | + |
| 138 | +Folder to store application migrations which will be generated by typeorm. |
| 139 | + |
| 140 | +#### `seeds` |
| 141 | + |
| 142 | +Folder to store application seeds, it adds necessary data for the development. |
| 143 | + |
| 144 | +#### `data-source.ts` |
| 145 | + |
| 146 | +File to store the data source configuration for migrations. |
| 147 | + |
| 148 | +### `decorators` |
| 149 | + |
| 150 | +This folder contains all global [decorators](https://www.typescriptlang.org/docs/handbook/decorators.html). |
| 151 | + |
| 152 | +### `exceptions` |
| 153 | + |
| 154 | +This folder contains all global exception classes. |
| 155 | + |
| 156 | +### `filters` |
| 157 | + |
| 158 | +In this folder you can find app level [filters](https://docs.nestjs.com/exception-filters). |
| 159 | + |
| 160 | +### `generated` |
| 161 | + |
| 162 | +Typescript files generated by the code generator. E.g. i18n.generated.ts file generated by [the nestjs-i18n](https://www.npmjs.com/package/nestjs-i18n) package. |
| 163 | + |
| 164 | +### `guards` |
| 165 | + |
| 166 | +You can store all guards here. |
| 167 | + |
| 168 | +### `i18n` |
| 169 | + |
| 170 | +Internalization JSON files are storied here. |
| 171 | + |
| 172 | +### `interceptors` |
| 173 | + |
| 174 | +Where we are keep [interceptors](https://docs.nestjs.com/interceptors). |
| 175 | + |
| 176 | +### `libs` |
| 177 | + |
| 178 | +Where we keep all common modules. See [NestJS modules documentation](https://docs.nestjs.com/modules) for more. |
| 179 | + |
| 180 | +### `shared` |
| 181 | + |
| 182 | +Shared module with global singleton services. |
| 183 | + |
| 184 | +### `utils` |
| 185 | + |
| 186 | +Where we keep all our utility functions. |
| 187 | + |
| 188 | +### `app.module.ts` |
| 189 | + |
| 190 | +The root application module. |
| 191 | + |
| 192 | +### `main.ts` |
| 193 | + |
| 194 | +## `test` |
| 195 | + |
| 196 | +Folder where we keep all our e2e test files. |
| 197 | + |
| 198 | +## `.env` |
| 199 | + |
| 200 | +Environment variables which will load before app start and will be stored in `process.env`, (*) is a env name (local, development, test, staging, production) |
| 201 | + |
| 202 | +## `.gitignore` |
| 203 | + |
| 204 | +Here you can store the files and folders that you want to ignore in the git repository. |
| 205 | + |
| 206 | +## `.prettierrc` |
| 207 | + |
| 208 | +Prettier configuration file, see [the prettier doc](https://prettier.io/) for more. |
| 209 | + |
| 210 | +## `commitlint.config.mjs` |
| 211 | + |
| 212 | +Commitlint configuration file, see [the commitlint doc](https://commitlint.js.org/) for more. |
| 213 | + |
| 214 | +## `docker-compose.yml` |
| 215 | + |
| 216 | +Docker compose configuration file, see [the docker docs](https://docs.docker.com/compose/compose-file/) for more. |
| 217 | + |
| 218 | +## `Dockerfile` |
| 219 | + |
| 220 | +The basic Dockerfile configuration to build the app, see [the docker docs](https://docs.docker.com/engine/reference/builder/) for more. |
| 221 | + |
| 222 | +## `eslint.config.mjs` |
| 223 | + |
| 224 | +Eslint configuration file, see [the eslint doc](https://eslint.org/) & [typescript-eslint](https://typescript-eslint.io/) for more. |
| 225 | + |
| 226 | +## `jest.config.json` |
| 227 | + |
| 228 | +Jest configuration file, see [the jest doc](https://jestjs.io/) for more. |
| 229 | + |
| 230 | +## `lint-staged.config.mjs` |
| 231 | + |
| 232 | +The configuration of the lint-staged, see [the lint-staged doc](https://github.com/lint-staged/lint-staged) for more. |
| 233 | + |
| 234 | +## `nest-cli.json` |
| 235 | + |
| 236 | +Nestjs cli configuration file, see [the nestjs doc](https://docs.nestjs.com/) for more. |
| 237 | + |
| 238 | +## `package.json` |
| 239 | + |
| 240 | +Here you can store the configuration of the project. |
| 241 | + |
| 242 | +## `pnpm-lock.yaml` |
| 243 | + |
| 244 | +pnpm lock file generated by pnpm. |
| 245 | + |
| 246 | +## `README.md` |
| 247 | + |
| 248 | +Here you can store the description of the project. |
| 249 | + |
| 250 | +## `renovate.json` |
| 251 | + |
| 252 | +Renovate configuration file, see [the renovate doc](https://docs.renovatebot.com/) for more. |
| 253 | + |
| 254 | +## `setup-jest.mjs` |
| 255 | + |
| 256 | +Setup file for jest. |
| 257 | + |
| 258 | +## `tsconfig.build.json` |
| 259 | + |
| 260 | +Here you can store the typescript configuration of the project for the build. |
| 261 | + |
| 262 | +## `tsconfig.json` |
| 263 | + |
| 264 | +Here you can store the typescript configuration of the project. |
0 commit comments