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

# Style and structure guide

## Code formatting

By default a Multijet project uses **Prettier** as a code formatter, customizable with the root configuration file:

{% code title=".prettierc" %}

```json
{
    "singleQuote": true,
    "trailingComma": "all",
    "semi": false,
    "tabWidth": 4,
    "arrowParens": "avoid"
}
```

{% endcode %}

## Editor configuration

If you are using **VSCode**, multijet includes a default configuration (located in the `.vscode` folder) that includes recommended extensions, debug configurations and formatting settings.

It is highly recommended to use [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) as a **standard for all Git commits**.

## Modules file structure

It is suggested to follow a standard file structure when developing shared **libs**.

The followings are **examples** of how you can structure your libraries in order to make them more consistent and readable.

{% hint style="info" %}
It's important to write **interfaces** so you can decouple the implementation of your library or module. All shared libs or modules, if possibile, should export at least **one interface** and **one implementation** for that same interface.
{% endhint %}

```
my-lib/
└── src/
    ├── core/
    │   └── ... core implementation
    ├── models/
    │   └── ... interfaces and models
    ├── common/
    │   ├── const.ts
    │   ├── errors.ts
    │   └── ... used in the entire lib
    ├── helper/
    │   └── ... helper functions
    └── index.ts
```

If your library needs to be divided in **submodules** you can follow the same structure as follows:

```
my-lib/
└── src/
    ├── module-1/
    │   ├── core/
    │   │   └── module-1.ts
    │   ├── models/
    │   │   ├── module-1.models.ts
    │   │   ├── module-1.errors.ts
    │   │   ├── module-1.consts.ts
    │   │   └── ...
    │   └── helper
    ├── module-2/
    │   ├── core
    │   ├── models
    │   └── helper
    ├── common/
    │   ├── consts.ts
    │   ├── types.ts
    │   └── ... used between modules
    └── index.ts
```

The library `index.ts` should **only contain exports** for the modules and interfaces you want to export, nothing more.

The following is a real example of a small lib:

<img src="/files/osERi6HEOoVmkAJHLNG2" alt="" data-size="original">


---

# 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, and the optional `goal` query parameter:

```
GET https://quinck.gitbook.io/multijet/getting-started/style-and-structure-guide.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
