# Project configuration

## Node

The global Node.js configuration is defined in the project's `package.json` file located in `<project-root>/package.json`:

{% code title="package.json" %}

```json
{
    "name": "my-multijet-project",
    "private": true,
    "workspaces": [
        "microservices/*",
        "libs/*"
    ],
    "scripts": {
        "ts": "esr",
        "build": "npm run openapi:generate && turbo run build",
        "build:debug": "npm run openapi:generate && turbo run build:debug",
        "lint": "turbo run lint",
        "lint:fix": "turbo run lint:fix",
        "test": "turbo run test --parallel",
        "typecheck": "turbo run typecheck",
        "openapi:generate": "turbo run openapi:generate",
        // AWS SAM specific commands
        "presam:build": "npm run build",
        "sam:build": "sam build -t deploy/aws/sam/template.yaml --parallel",
        "presam:start": "npm run sam:build",
        "sam:start": "sam local start-api -t deploy/aws/sam/template.yaml"
    },
    "dependencies": {
        "esbuild": "...",
        "fastify": "...",
        "turbo": "..."
    },
    "devDependencies": {
        ...
    }
    "packageManager": "npm@8.11.0",
}

```

{% endcode %}

In this we define all the **global scripts** (most of them runs **Turborepo pipelines**, head to the[Turborepo configuration](/multijet/configuration/turborepo.md) section to know more), **global dependencies** (can be imported by all libs or microservices) and the **npm workspaces**.

{% hint style="info" %}
Note that the `ts`script can be used to run any arbitrary TypeScript file using `esbuild-runner` (similar to ts-node)
{% endhint %}

## TypeScript

The main Typescript configuration file is located in `<project-root>/tsconfig.base.json`:

{% code title="tsconfig.base.json" %}

```json
{
    "exclude": ["node_modules", "**/*/dist", "**/*.test.ts"],
    "compilerOptions": {
        // Disable emitting file from a compilation.
        // We'll use esbuild to compile our TypeScript files to JavaScript, so we
        // avoid emitting files when using tsc (and use it only for type-checking).
        "noEmit": true,
        "resolveJsonModule": true,
        "esModuleInterop": true,
        "lib": ["es2023"],
        "module": "Node16",
        "strict": true,
        "skipLibCheck": true,
        "forceConsistentCasingInFileNames": true,
        "moduleResolution": "node",
        "alwaysStrict": true
    }
}

```

{% endcode %}

{% hint style="info" %}
Every lib or microservice **extends** this configuration file.
{% endhint %}

The `noEmit` option is essential to the Multijet build process. This **disables any output file** from the compilation because it is not needed since we will use **esbuild** to make an output bundle file (See the [Build configuration](/multijet/configuration/build-configuration.md) section). We use `tsc` to only do the type checking.


---

# Agent Instructions: 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://quinck.gitbook.io/multijet/configuration/project-configuration.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.
