# Files organisation

To keep things well structured, we will slip our code in different folders in `packages/api`.

* `/` project configuration files
* `src` all the code we write for the app.
  * `config` one file per environment.
  * `entities` our data models.
  * `migrations` if we need to alter the database.
  * `routers` one folder per route.

This is the final files structure:

```
.
├── jest.config.js
├── package.json
├── src
│   ├── app.ts
│   ├── config
│   │   ├── ci.ts
│   │   ├── index.ts
│   │   ├── local.ts
│   │   ├── production.ts
│   │   ├── shared.ts
│   │   └── staging.ts
│   ├── containers.ts
│   ├── coverage
│   │   ├── Emoji.ts.html
│   │   ├── base.css
│   │   ├── containers.ts.html
│   │   ├── index.html
│   │   ├── prettify.css
│   │   └── sort-arrow-sprite.png
│   ├── entities
│   │   ├── Link.ts
│   │   ├── User.ts
│   │   └── index.ts
│   ├── index.ts
│   ├── middlewares
│   │   ├── RateLimiter
│   │   │   ├── index.spec.ts
│   │   │   └── index.ts
│   │   └── index.ts
│   ├── migrate.ts
│   ├── migrations
│   │   └── 001_example.ts
│   ├── routers
│   │   ├── Emoji
│   │   │   ├── index.spec.ts
│   │   │   └── index.ts
│   │   ├── GraphQL
│   │   │   ├── helpers
│   │   │   │   ├── PaginatedArgs.ts
│   │   │   │   ├── PaginatedResponse.ts
│   │   │   │   └── index.ts
│   │   │   ├── index.ts
│   │   │   └── resolvers
│   │   │       ├── Health.ts
│   │   │       ├── Link
│   │   │       │   ├── Link.spec.ts
│   │   │       │   ├── Link.ts
│   │   │       │   ├── LinkInput.ts
│   │   │       │   └── index.ts
│   │   │       ├── User
│   │   │       │   ├── User.spec.ts
│   │   │       │   ├── User.ts
│   │   │       │   ├── UserAuthInput.ts
│   │   │       │   └── index.ts
│   │   │       └── index.ts
│   │   └── index.ts
│   ├── sequelize.ts
│   └── setupTests.ts
├── tsconfig.json
├── tslint.json
└── yarn.lock
```


---

# 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://tutorial.specian.co.uk/backend/files-organisation.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.
