> For the complete documentation index, see [llms.txt](https://docs.goril.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.goril.app/cookbook/my-first-application/create-the-task-model.md).

# Create the Task model

In this task, you will create the Task model which we will use across the application and associate it with the Local State to store them in the device.

1. Navigate to the **API** tab.
2. Click on the **Model** tab in the left panel.
3. Click on the **Add API Model** button.
4. Fill the **Model Name** with "Task".
5. To add some Properties by clicking on the **Add Field** button below **Properties** :&#x20;

   To change a **Type** click on the showing one and select it in the dropdown. You can choose as well if the property is Nullable and/or is a List.

   1. Add a "title" of type **String.**
   2. Add a "date" of type **DateTime.**
   3. Add a "description" of type **String?.**&#x20;
   4. Add a "isDone" of type **bool.**
   5. Add a "priority" of type **int?.**
   6. Add a "comments" of type **List\<String>.**
6. Click on **Save.**

If you click on the **Task** model you should have the same as shown below.

<figure><img src="https://2361990732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FruhMqqOvKXgZPke0Ehds%2Fuploads%2FBWmrcCaH2lLsLOUFwpjC%2Ftodo_apimodel.png?alt=media&amp;token=4316d60b-5ae1-4655-b6be-83c1abf62047" alt=""><figcaption><p>Task model</p></figcaption></figure>

The Task model created now we have to create a **Local State** variable to store the tasks in the device storage.

1. Navigate to the [State](/main-pages/state.md) tab.
2. Click on the **Add Local State** button.
3. Fill the **Field Name** with "taskList".
4. Enable the **Persisted** switch to allow the application to store the Tasks in the device.
5. Select **Task** as **Field Type** in the bottom of the dropdown, in the Custom type section.
6. Click on **List.**
7. Click on **Save.**

<figure><img src="https://2361990732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FruhMqqOvKXgZPke0Ehds%2Fuploads%2Fk3cheyjjYS4rTFTmo6Ej%2Ftodo_localstate.png?alt=media&amp;token=87c9e699-c68d-4775-b145-48d0767f4f65" alt=""><figcaption><p>Create Local State </p></figcaption></figure>

In the next step we will see how to initialize a page with an observable, set the values, create and update the layout in consequence.

{% content-ref url="/pages/suCPXg4tNEhMJe1Mxz2J" %}
[Create the base HomePage Layout](/cookbook/my-first-application/create-the-base-homepage-layout.md)
{% endcontent-ref %}
