# 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="https://203379523-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUKfCepvBVy12KL3pUjmb%2Fuploads%2F6KfqFfDNQxi59DMVErMT%2Fimage.png?alt=media&#x26;token=66ff137b-e096-43ff-a07b-d6b810a31afe" alt="Crema Folder Structure"><figcaption></figcaption></figure>
