File Naming Conventions

Consistent file naming is essential for organization and makes it easier to find documents.

General Rules

  • Lowercase: Use lowercase for all file and directory names.
  • No Spaces: Do not use spaces in file names. Use hyphens (-) or underscores (_) instead. Hyphens are generally preferred.
  • Descriptive: File names should be descriptive and give a clear indication of the file’s content.
  • Date Format: When including a date in a file name, use the YYYY-MM-DD format. This ensures that files are sorted chronologically.

Conventions by File Type

Project Documents

  • Format: [project-name]_[document-type]_[version].[ext]
  • Example:
    • acme-corp_project-brief_v1.2.docx
    • project-x_user-personas_2023-10-26.pdf

Design Files

  • Format: [feature-or-screen-name]_[version]_[status].[ext]
  • Status: wireframe, mockup, final.
  • Example:
    • user-profile_v1_wireframe.fig
    • login-screen_v2_mockup.sketch

Code & Scripts

  • Components (React/Vue/etc.): PascalCase.tsx (e.g., UserProfile.tsx)
  • Pages/Routes: kebab-case.ts (e.g., user-profile.page.ts)
  • Utility/Helper files: camelCase.ts or kebab-case.ts (e.g., dateUtils.ts, date-utils.ts)
  • Test files: [filename].test.ts or [filename].spec.ts (e.g., UserProfile.test.tsx)
  • Configuration files: [service].config.js (e.g., jest.config.js)
  • Scripts: kebab-case.sh (e.g., deploy-staging.sh)

SOPs and Internal Documentation

  • Format: [section-number]_[topic-name].md
  • Example:
    • 01_project-kickoff-checklist.md
    • 03_code-review-process.md

Directory Structure

  • src or source: For all source code.
  • docs or documentation: For project-specific documentation.
  • assets: For static assets like images, fonts, etc.
  • scripts: For shell scripts and other automation scripts.
  • tests or __tests__: For test files.

Sticking to these conventions will help keep our projects organized and easy to navigate.