vroqjs.com

99-reference/naming-cheatsheet.md

Naming cheatsheet

Naming cheatsheet

This file is a compact guide to naming in Vroq apps.

General rules

  • prefer clear, descriptive names
  • use the same naming pattern across the app
  • avoid vague names like util, helper, misc, temp, or manager
  • name files by their main responsibility

Feature folders

Use business-capability names:

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

Avoid vague folder names:

  • features/tools
  • features/stuff

Components

Name components by UI role:

  • FileCard
  • EditorToolbar
  • StatusBadge

Sections

Name sections by feature-local UI role:

  • FileListSection
  • FileDetailsSection
  • DebuggerSection

Reducers

Name reducers after the feature state slice they own:

  • filesReducer
  • editorReducer
  • debuggerReducer

Actions

Use explicit feature-scoped action names:

  • FILES_ADD
  • FILES_REMOVE
  • EDITOR_SET_CONTENT
  • DEBUGGER_SET_CLIENT

Avoid:

  • SET_DATA
  • UPDATE
  • CHANGE

API clients

Name API files by domain:

  • fileApi.js
  • editorApi.js
  • debuggerApi.js

Final rule

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