> For the complete documentation index, see [llms.txt](https://pavewise.gitbook.io/pavewise-style-guide-and-more/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://pavewise.gitbook.io/pavewise-style-guide-and-more/frontend/naming/declarations.md).

# Declarations

{% hint style="info" %}
Component names should follow the ***NounAdjective*****&#x20;(*****ComponentAdjective*****) format**.\
\
Think "what is it, who is it for":

* "What is it": `Pod`
* "Who is it for": `Project`
* Result: `PodProject.tsx PodProduction.tsx`

Additional information about **naming components** can be found on the [Component Architecture](/pavewise-style-guide-and-more/frontend/todo/component-architecture.md) page.
{% endhint %}

<details>

<summary>Components (PascalCase)</summary>

* `function PodProject({}: Props) {...}`

</details>

<details>

<summary>Functions (camelCase)</summary>

* `function handleClick(...) {}`
* `function getProjectStatus(...) {}`

// TODO: look into common function naming conventions ("getX", "generateX", "displayX", "convertX")

</details>

<details>

<summary>Variables - immutable constants (UPPER_CASE)</summary>

* `const PROJECT_ID = ''`

**For "testing" variables (fixtures/mock data), prepend** `FX_`**:**

* `const FX_PROJECTS: TDocBE[] = [...]`

</details>

<details>

<summary>Variables - all other variables (camelCase)</summary>

* `const docs = [...]`
* `let projectStatus = ''`

</details>

<details>

<summary>Types/Interfaces (PascalCase)</summary>

**Component prop types:**

* `interface Props {...}`
  * main component (props are not exported)
* `interface ComponentProps {...}`&#x20;
  * when main component's props are exported, prepend component name
  * local components (multiple components per file)

**Function parameter/argument types (when not typed inline):**

* `interface Params {...}`
  * main function (params are not exported)
* `interface FunctionParams {...}`
  * when main function's params are exported, prepend function name
  * local functions (multiple components per file)

**All other types -- start with "T":**

* `type TDoc = {...}`
* `type TInput = {...}`
* `type TProjectStatus = 'x' | 'y' | 'z'`

</details>

<details>

<summary>Schemas (camelCase)</summary>

* `const schema = z.object(...)`
* `const schemaProject = z.object(...)`

</details>
