# 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>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://pavewise.gitbook.io/pavewise-style-guide-and-more/frontend/naming/declarations.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
