# Folder Structure

The folder structure is professional and easy to understand. A typical Nx workspace is structured into "apps" and "libs". This distinction allows us to have a more modular architecture by following a separation of concerns methodology, incentivizing the organization of our source code and logic into smaller, more focused, highly cohesive units.\
\
Nx automatically creates TypeScript path mappings in the `tsconfig.base.json` file, such that other apps or libs can easily consume them like below.

```javascript
// Example of importing from the library
import AppLoader from '@crema/components/AppLoader';
...
```

Therefore, consuming libraries is very straightforward, and similar to what you might already be accustomed to in previous projects.

In Crema-4.x.x all apps will go into the apps directory. You will the starter template to start your project. You will get a minimum of four apps by default in Crema-4.x for each variant as follows.

1. **source**: app based on the context API
2. **source-redux**: app based on the Redux
3. **source-toolkit**: app based on the redux-toolkit
4. **starter-kit**: starter-kit based on the context API

{% hint style="info" %}
You can remove the extra dependency of the project that not belongs to your project after the development is done.
{% endhint %}

A common mental model is to **see the application as "containers"** that link, bundle and compile functionality implemented in libraries for being deployed. As such, if we follow an *80/20 approach*:

* place 80% of your logic into the `libs/` folder
* and 20% into `apps/`<br>

  <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>Crema is using an advanced folder structure like below</p></div>

  <figure><img src="/files/UuVLAXk5376LAVurh1uQ" alt="Crema Folder Structure"><figcaption></figcaption></figure>


---

# 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://docs.cremawork.com/v-4/overview/folder-structure.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.
