# Rell project structure · Your first Rell app on Chromia · Learn Chromia

> Chromia applications are written in Rell, a language built for decentralized applications (dapps). Rell works directly with relational data models, so you…

Source: https://chromia.com/learn/book-review/rell-structure/

Your first Rell app on ChromiaLesson 3 of 26

1. [01Your first Rell app on Chromia](https://chromia.com/learn/book-review/introduction/)
2. [02Set up your project](https://chromia.com/learn/book-review/setup/)
3. [03Rell project structure](https://chromia.com/learn/book-review/rell-structure/)

Part 1: Define your first entity

1. [04Overview](https://chromia.com/learn/book-review/book-entity/)
2. [05Create your first entity](https://chromia.com/learn/book-review/book-entity/tables/)
3. [06Add your first operation](https://chromia.com/learn/book-review/book-entity/basic-operations/)
4. [07Query every book](https://chromia.com/learn/book-review/book-entity/write-queries/)

Part 2: Add a related entity

1. [08Overview](https://chromia.com/learn/book-review/book-review-entity/)
2. [09Define the book review entity](https://chromia.com/learn/book-review/book-review-entity/tables/)
3. [10Add an operation for creating book reviews](https://chromia.com/learn/book-review/book-review-entity/basic-operations/)
4. [11Query all reviews for a book](https://chromia.com/learn/book-review/book-review-entity/write-queries/)

Part 3: Checking and validating inputs

1. [12Overview](https://chromia.com/learn/book-review/input-verification/)
2. [13Verify inputs](https://chromia.com/learn/book-review/input-verification/input-verification/)
3. [14Return structured results from queries](https://chromia.com/learn/book-review/input-verification/structure/)

Part 4: Signing transactions and filtering queries

1. [15Overview](https://chromia.com/learn/book-review/sign-transaction/)
2. [16Sign a transaction](https://chromia.com/learn/book-review/sign-transaction/sign-transaction/)
3. [17Filter and sort query results](https://chromia.com/learn/book-review/sign-transaction/structure/)

Part 5: Blockchain state and transactions explained

1. [18Overview](https://chromia.com/learn/book-review/blockchain-transactions/)
2. [19How blockchain state and transactions work](https://chromia.com/learn/book-review/blockchain-transactions/query-transaction/)
3. [20Walking through an example](https://chromia.com/learn/book-review/blockchain-transactions/example/)

Part 6: Create the client

1. [21Overview](https://chromia.com/learn/book-review/build-client/)
2. [22Prerequisites](https://chromia.com/learn/book-review/build-client/prerequisites/)
3. [23Establishing a connection to Chromia](https://chromia.com/learn/book-review/build-client/sign-transaction/)
4. [24Query the blockchain using postchain-client](https://chromia.com/learn/book-review/build-client/query-blockchain/)
5. [25Complete the example](https://chromia.com/learn/book-review/build-client/complete-example/)

1. [26What’s next?](https://chromia.com/learn/book-review/what-next/)

[Learn](https://chromia.com/learn/)[Your first Rell app on Chromia](https://chromia.com/learn/book-review/)

03 / 26Beginner

# Rell project structure

Chromia applications are written in Rell, a language built for decentralized applications (dapps). Rell works directly with relational data models, so you can build reliable blockchain applications in a way that feels familiar and efficient. The [Rell introduction](https://docs.chromia.com/rell/rell-intro) covers the language in more depth.

## Organizing your project

You will split the code across dedicated files inside one folder. This keeps the project readable, easy to maintain, and ready to grow.

### Project setup

1. **Add a folder for the main module**:

   * The project has only one module, so create a folder called `main` under the `src` directory. Every file belonging to the module goes here.
2. **Create the module files**:

   * Add these files to the `main` folder:
     + `module.rell`
     + `entities.rell`
     + `functions.rell`
     + `operations.rell`
     + `queries.rell`

   You describe your data model in `entities.rell`. Each `entity` in Rell maps to a SQL table, and keywords like `key`, `index`, and `mutable` control how that table is stored and queried. See [Entity](https://docs.chromia.com/rell/language-features/modules/entity) for the full reference.
3. **Declare the module in `module.rell`**:

   * Put this code in `module.rell`:

   src/main/module.rell

   ```nolines
   module;
   ```

   * The `module;` declaration marks this file as the module's main file. It marks the folder as a module, so Rell treats all files in it as one unit, which keeps your code organized and easier to manage.
4. **Remove the old `main.rell` file**:

   * The `src` folder already contains `main.rell`. You could keep all your code in that single file, but separate files make the structure easier to follow. Delete `main.rell` to complete the reorganization.

The project should now have this layout:

text

```
book-review/
├── src/
│   ├── main/
│   │   ├── entities.rell
│   │   ├── functions.rell
│   │   ├── module.rell
│   │   ├── operations.rell
│   │   └── queries.rell
│   └── test/
│       └── book_review_test.rell
├── .gitignore
└── chromia.yml
```

Each file has a single responsibility, which keeps the codebase manageable as the application grows. The next sections go through these files one at a time, beginning with entity definitions and building up to a complete decentralized application.

Written for this site from Chromia’s public course. Code samples are the course’s own.

[← Previous**Set up your project**](https://chromia.com/learn/book-review/setup/)[Next →**Part 1: Define your first entity**](https://chromia.com/learn/book-review/book-entity/)

On this page

* [Organizing your project](#organizing-your-project)
