• Use PascalCase for class names.
  • Use camelCase for variable and function names.
  • Use dot.notation for file names.

Class Names

Class names follow the PascalCase convention, where the first letter of each word is capitalized.
class UserAuthentication {
  // class logic
}

Variable Names

Variables adopt the camelCase convention, where the first letter of each word except the first is capitalized. Example
let userFirstName = 'John';
let userLastName = 'Doe';

File Names

File names employ a dot notation. The theme or subject the file pertains to, often matching the folder name, appears at the end of the file name (more details on folder naming can be found under Folder Structure). For instance, permission.guard.ts (with the parent folder named guards) or user.schema.ts are exemplary file names. This convention simplifies file search and immediately clarifies the file’s content. Example:
// File located in src/guards/permission.guard.ts