> For the complete documentation index, see [llms.txt](https://smartr-ai.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://smartr-ai.gitbook.io/docs/create-your-first-app/create-an-instant-app.md).

# Create an Instant App

## Steps to create a project

***

{% stepper %}
{% step %}
**Ensure You Are in a Workspace**:

* To create a project, you must be inside a workspace. If you just created a workspace, you should be automatically directed to its details page.
* Alternatively, navigate to the **"My Workspaces"** tab at the top of the page and select the workspace where you want to create the project.

<img src="https://2408265196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBEOzICwCfyOISoTxEvdS%2Fuploads%2FlmPsCeJ09sDmNZrAgSxQ%2Fworkspace-details-screen.png?alt=media&amp;token=de3b5750-2426-4536-97f6-ff98de5921ab" alt="" data-size="original">
{% endstep %}

{% step %}
**Add a New Project**:

* Once inside the workspace, click on **"Add Project"**.
* You will be presented with two options for project creation:
  * **Blank Project**: A minimal setup without a generated codebase, ideal for custom configurations.
  * **Instant App**: Generates a ready-to-use codebase, perfect for quickly starting your development with Smartr’s predefined setup.

{% endstep %}

{% step %}
**Instant App Generation:** For this guide, we will focus on the **Instant App** option, which provides a streamlined path to generating a codebase.

* **Enter Project Name**: Provide a unique name for your project that reflects its purpose. Click **"Proceed"** to continue.
* **Database Settings**: Choose your preferred method for connecting to the database:
  * **Full Connection String**: Enter the entire database connection string and click **"Test"** to verify the connection.
  * **Manual Configuration**: Specify the following:
    * **Database Type**: Select **SQLSERVER**.
    * **Host**: Enter the **server name**&#x20;
      * If you have local SQL: host.docker.internal
      * If you dockirized the SQL in the Previous step: smartr-sql
    * **Port**: Optional; defaults to **1433** if not specified.
    * **Database Name**: The name of the database you intend to use.
    * **User**: The username for database access. (sa)
    * **Password**: The password for the specified user.
    * Click **"Test"** to ensure the connection is valid.
* Click **"Proceed"** once the connection is verified.

<img src="https://2408265196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBEOzICwCfyOISoTxEvdS%2Fuploads%2FpHhENGzfFe9wfNXMNfHv%2FDb_Manual_Config.png?alt=media&amp;token=ca6368a6-e283-4fb1-b014-cc7b999bbfc3" alt="" data-size="original">

If the connection is successful, the connection status logo will turn green, indicating that the database connection is valid.

<img src="https://2408265196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBEOzICwCfyOISoTxEvdS%2Fuploads%2FhHcVZTRLTCQ7eYK2UrR7%2FDb_Conn_String_Config.png?alt=media&amp;token=57c54414-9aa4-422b-8af1-df660be78877" alt="" data-size="original">

* **Configure Directories**: Define the directories where your project files will be stored.
  * **Project Parent Directory**: Specify the location for generated project files.
  * **Patch History Directory**: Optionally, provide a path for patch history or keep the default (`[project_name]_history` under the parent directory).
  * **Auto Apply Patch**: Choose whether to automatically apply patches to your database. Enable this if you want patches applied without manual intervention.
* Click **"Proceed"** to move forward.

<img src="https://2408265196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBEOzICwCfyOISoTxEvdS%2Fuploads%2F96BNjTIwuKVhVaGkdj7q%2FFolder_Settings.png?alt=media&amp;token=b001dd2d-4d3c-4ee0-8b7c-d26837aa9135" alt="" data-size="original">

* **Generate the Codebase**: Review the project settings, then click **"Generate"**. The Smartr engine will generate your codebase based on the provided configuration.

<img src="https://2408265196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBEOzICwCfyOISoTxEvdS%2Fuploads%2FCASARzlEMZEOZ2jalRwE%2FGenerating_App.png?alt=media&amp;token=d2681af4-880f-4eec-939b-60ba0dbb87eb" alt="" data-size="original">

Once the generation process is complete, the code will be available in the specified directory.

<img src="https://2408265196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBEOzICwCfyOISoTxEvdS%2Fuploads%2FtBhof6u6bNN1OUE9pFcI%2Fparent-directory.png?alt=media&amp;token=4f2b63ec-26e8-4791-a118-677c8f201229" alt="" data-size="original">
{% endstep %}
{% endstepper %}

{% hint style="info" %}
When entering the **server name** during the database configuration, always start with `host.docker.internal` if you are using local SQL and `smartr-sql` if you are using the dockerized SQL . This is essential **when using Docker** because it allows the Smartr gateway running in a container to resolve the host machine’s address correctly. Without this, the database might be unreachable from the container, leading to connection errors.
{% endhint %}

## What's Next

***

With your project successfully created, you can delve deeper into Smartr's features, codebase architecture, and learn how to add customizations.

{% hint style="info" %}
**Did You Know?**

You can also use Smartr's AI assistant, **Diivo**, to create your Instant App quickly.&#x20;

Visit [Build with Diivo](/docs/build-with-diivo.md) for step-by-step guidance on how to use **Diivo** for this process.
{% endhint %}
