> For the complete documentation index, see [llms.txt](https://docs.discloud.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.discloud.com/en/faq/general-questions/what-is-the-root-of-the-project.md).

# What is the root of the project?

Understand the project root (base directory) so Discloud can detect configs, dependencies and your main file correctly.

## 🧾 Overview

The project root ("root directory") is the **top-level folder of your application,** the folder whose contents you compress and upload to Discloud. It contains the configuration file ([`discloud.config`](https://docs.discloud.com/en/configurations/discloud.config.md)), dependency manifest (e.g. [`package.json`](https://docs.discloud.com/en/development-environment/supported-languages/javascript/package-json.md), [`requirements.txt`](https://docs.discloud.com/en/development-environment/supported-languages/python/requirements.txt.md), [`Cargo.toml`](https://docs.discloud.com/en/development-environment/supported-languages/rust/cargo.toml.md), [`Gemfile`](https://docs.discloud.com/en/development-environment/supported-languages/ruby/gemfile.md)), optional [`.env`](https://docs.discloud.com/en/faq/general-questions/.env-file.md), and the folders with your source code (e.g. `src/`).

If the structure is wrong (for example, you zip a folder that contains another single folder that actually holds the files), Discloud may fail to detect the main file or dependencies.

***

## 🖼️ Visual Example

The green zone represents the **root** you should compress. Yellow shows a nested folder containing code files. Everything inside green is included when you compress the contents of that folder (leave out folders like `node_modules`).

<figure><img src="https://4206165266-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FETNoAt35DpCBhinHpaRx%2Fuploads%2FN4K79K6f8Mz7pFxbSLAY%2Fproject-root-structure-example.png?alt=media&amp;token=f959f5f5-372e-4933-807b-6718ddd38dcb" alt="Project root example"><figcaption></figcaption></figure>

***

### 🚫 Common Mistakes

| Mistake                        | Result                             | Fix                                                                                                                                |
| ------------------------------ | ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| Zipping parent of actual root  | Missing config / main file         | Compress the contents of the folder containing [`discloud.config`](https://docs.discloud.com/en/configurations/discloud.config.md) |
| Including `node_modules`       | Large upload, possible size issues | Remove it and let Discloud install                                                                                                 |
| Hardcoding tokens in code      | Security exposure                  | Use [`.env`](https://docs.discloud.com/en/faq/general-questions/.env-file.md) and environment variables                            |
| Multiple entry files ambiguous | Startup failure                    | Define `MAIN` in [`discloud.config`](https://docs.discloud.com/en/configurations/discloud.config.md) explicitly                    |
