Skip to content

Naming Conventions ​

Consistency in naming folders and files is critical for project readability and maintainability. All contributors must follow the same convention defined at the start of the project.

Rules ​

  • Each project defines a single naming convention for folders and files during the initialization phase.
  • The chosen convention must be documented in the project's setup guide or README.
  • When working with a template that already provides a naming convention, the team must follow that convention.
  • New files or folders must never mix different conventions within the same project.

Examples of conventions ​

  • Folders: kebab-case
    • user-profile/, auth-service/, api-client/
  • React components: PascalCase
    • UserCard.tsx, LoginForm.tsx, HeaderBar.tsx
  • Hooks: camelCase prefixed with use
    • useAuth.ts, useModal.ts, useUserProfile.ts
  • Utilities/helpers: camelCase
    • dateFormatter.ts, apiFetcher.ts, stringUtils.ts
  • Constants: SCREAMING_SNAKE_CASE
    • API_BASE_URL.ts, DEFAULT_PAGE_SIZE.ts