Skip to main content

File naming conventions

NestFlux provides naming conventions that should be followed to ensure project naming consistency (and sometimes to ensure functionality).

Basic rules

  1. All file names should be written in kebab-case. This prevents GIT issues when working with users that use case insensitive systems. Only markdown files such as README.md or CONTRIBUTING.md are allowed to be written in capital letters.

Table of extensions

Some files contain a custom "extension" before the real extension. For example: get-date.util.ts. This extension helps to identify what kind of file it is without reading its content. Some extensions are project-specific, but generally they are shared across all projects.

ExtensionDescriptionCan be used in
ClientServerPackages
*.util.*A file that contains a single utility method.
✅ (All)
*.utils.*A file that contains multiple utilities grouped by scope.
✅ (All)
*.controller-definition.*File that contains the definition of a controller.
@shared/api-definition
*.controller.*Used to define NestJS controllers.
*.module.*Used to define NestJS modules.