vroqjs.com

01-house-style/02-naming.md

Naming conventions

Naming conventions

Consistent naming makes Vroq apps easier to understand, edit, and debug. ChatGPT should follow these rules when creating or modifying code.

General rules

  • Prefer clear, descriptive names over short or clever ones
  • Use the same naming pattern everywhere in the app
  • Avoid vague names like util, helper, misc, temp, or manager
  • File names should reflect their main responsibility

Feature names

Feature folders should represent a business capability or UI area.

Examples:

  • features/debugger
  • features/files
  • features/editor

Avoid:

  • features/tools
  • features/stuff

Component names

Components should describe the UI role.

Examples:

  • FileList
  • DebuggerPanel
  • Toolbar

Avoid names that describe implementation instead of purpose.

Section names

Sections are feature-local UI fragments.

Examples:

  • DebuggerSection
  • FileDetailsSection

Sections often read from the store and dispatch actions.

Reducer names

Reducers should clearly match the state slice they own.

Examples:

  • debuggerReducer
  • filesReducer

Action names

Actions should be explicit and feature-scoped.

Examples:

  • FILES_ADD
  • DEBUGGER_SET_CLIENT

Avoid generic actions like SET_DATA.

API helpers

API helper files should describe the API domain.

Examples:

  • fileApi.js
  • debuggerApi.js

Final rule

A reader should be able to guess what a file or function does just by its name.