> For the complete documentation index, see [llms.txt](https://docs.uptiq.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.uptiq.ai/academy/tier-2-core-skills/m06-app-builder-design-system-builder/lab-3-generate-and-inspect-the-app-in.md). Agents can also search and read this documentation through its [MCP server](https://docs.uptiq.ai/~gitbook/mcp).

# Lab 3: Generate and inspect the app in Build mode

Hands-on lab for lesson 3 of module M06, generate and inspect the app in build mode.

{% @uptiq-training/training-labels content="Module 6 | brand
Lesson 3 of 8 | brand
Lab 3 | success
20 minutes | neutral
Bloom level Apply | neutral" %}

{% @uptiq-training/training-navigator title="M06 App Builder & Design System Builder" content="Lesson 1: Orient to App Builder | soon
Lesson 2: Plan a borrower status check app in Plan mode | soon
Lab 2: Plan a borrower status check app in Plan mode
Lesson 3: Generate and inspect the app in Build mode | soon
Lab 3: Generate and inspect the app in Build mode | current
Lesson 4: Knowledge check 1 | soon
Lesson 5: Create and apply a design system | soon
Lab 5: Create and apply a design system
Lesson 6: Configure, scan and publish the app | soon
Lab 6: Configure, scan and publish the app
Lesson 7: Schedule a background task with Console Operator | soon
Lab 7: Schedule a background task with Console Operator
Lesson 8: Module assessment | soon" %}

## Lab overview

**Exercise title:** Generate and Inspect the App in Build Mode

**Difficulty level:** Apply (Bloom Level 3 — you will perform a multi-step procedure and interpret what you observe)

**Estimated hands-on time:** 20 minutes

**What you will build:** A borrower status check app generated in Build Mode from the plan you documented in Lesson 2. You will then use DB Explorer to inspect the generated database schema and query history, and use the Data Flow view to confirm that the agent and data sources are correctly connected.

**Enabling objective:** Generate an app blueprint in Build Mode from a defined borrower onboarding use case, use DB Explorer to inspect the generated schema and queries, and use the Data Flow view to validate that agents and data sources are correctly connected.

**Prerequisites:**

* Lesson 2 complete — you must have a documented plan for the borrower status check app, including the user journey, data sources, and agent connection
* Active sandbox environment with App Builder access
* A project database available in your sandbox
* An agent available for connection in your project
* Developer role (or Account Admin / Organisation Admin) in the sandbox

## Your sandbox environment

**Environment access URL:** `<provided by your instructor>`

**Connection details:**

| **Field**                                       | **Where to find it**                                        |
| ----------------------------------------------- | ----------------------------------------------------------- |
| **Console URL**                                 | `<provided by your instructor>`                             |
| **Project name**                                | `<provided by your instructor>`                             |
| **Agent name (for connection in build prompt)** | `<provided by your instructor>`                             |
| **Project database name**                       | Visible in App Config → Database after the app is generated |

**Pre-provisioned resources — you do not need to set these up:**

* A project with App Builder enabled
* A project database (PostgreSQL Managed DB) provisioned and available for connection
* At least one agent available in the project for connection during the build
* Your user account is assigned the Developer role or higher

## Configuration template

This lesson does not use a static configuration file. The App Builder Agent generates the application code from your natural-language prompt. The template below is the build prompt you will send in Step 2. Fill in the bracketed fields from your Lesson 2 plan before sending.

> Build a borrower status check app with the following requirements: User journey: \<paste the user journey from your Lesson 2 plan> Data sources: \<paste the data sources from your Lesson 2 plan> Agent connection: Connect the agent to handle borrower status queries.

{% hint style="info" %}
**Tip:** The more specific your prompt, the closer the generated app will match your intended data model. Include field names (for example, `loan_status`, `borrower_id`) if your Lesson 2 plan documented them — the App Builder Agent uses these to name the database tables and columns it generates.
{% endhint %}

## Step-by-step instructions

### Procedure 1 — Switch to Build Mode and Generate the App

{% stepper %}
{% step %}
**Confirm Build Mode is active**

In the App Builder workspace, locate the mode control inside the prompt box at the bottom-right, beside the send arrow. Confirm it reads ⚡ Build ⌄.

If it reads Plan, select the control and choose Build Mode — the control will update to ⚡ Build ⌄.

*App Builder prompt box with the mode control showing ⚡ Build ⌄ and the mode dropdown open*

{% hint style="success" %}
**Checkpoint:** The mode control reads ⚡ Build ⌄ before you send any prompt. If it still reads Plan, the mode switch did not register — select the control again and choose Build Mode.
{% endhint %}
{% endstep %}

{% step %}
**Send the build prompt**

In the prompt box, type or paste your completed build prompt from the Configuration Template above. Include the user journey, data sources, and agent connection from your Lesson 2 plan.

Select the send arrow (or press Enter) to submit the prompt.

*App Builder prompt box with a build prompt typed and ready to send*

{% hint style="warning" %}
**Warning:** Every prompt sent in Build Mode initializes active code execution immediately. There is no confirmation step. If you send the prompt in Plan Mode by mistake, the platform returns a plan instead of generating code — switch to Build Mode and send the prompt again.
{% endhint %}
{% endstep %}

{% step %}
**Monitor the build and wait for completion**

Watch the build conversation panel. The App Builder Agent logs each step it takes as it generates the application. Do not navigate away.

If a banner appears reading "This is taking a while", stay in the conversation — the build continues running. You can choose to continue in a new conversation, but for this exercise remain in the current one so you can observe the full build log.

*Console Operator conversation showing the "This is taking a while" notice*

{% hint style="success" %}
**Checkpoint:** The build conversation ends with a summary message and the live preview becomes available in the workspace. If the build conversation stops mid-way with an error, go to [Troubleshooting Quick Reference](#troubleshooting).
{% endhint %}
{% endstep %}

{% step %}
**Interact with the live preview to trigger database queries**

When the build completes, a live preview of your borrower status check app appears in the workspace. Interact with the preview — for example, submit a borrower lookup or navigate to a status screen — to trigger at least one database query.

This step is required before DB Explorer will show query results in the Console tab.

*App Builder workspace showing a generated app in the live preview panel*

{% hint style="info" %}
**Tip:** Any interaction that causes the app to read or write data will trigger a query. A simple page load or a search submission is usually sufficient.
{% endhint %}
{% endstep %}
{% endstepper %}

### Procedure 2 — Inspect the Generated Schema and Queries in DB Explorer

{% stepper %}
{% step %}
**Open DB Explorer**

In the app workspace action bar, select More. From the menu that appears, select DB Explorer.

*App workspace action bar with the More menu open, showing DB Explorer and Data Flow options*

{% hint style="success" %}
**Checkpoint:** DB Explorer opens. You should see at least two views available — a Console tab and a schema diagram view. If DB Explorer does not appear in the More menu, confirm your role is Developer or higher.
{% endhint %}
{% endstep %}

{% step %}
**Review the Console tab for executed queries**

Select the Console tab in DB Explorer. Review the list of SQL queries the app has run. For each query, note:

* The SQL statement (which tables are being queried)
* The parameters passed
* Whether the query succeeded or failed

Confirm that at least one query succeeded and that the tables being queried match the borrower status check data model you planned in Lesson 2 — you should see tables related to loan status and borrower identification.

{% hint style="success" %}
**Checkpoint:** At least one query appears in the Console tab with a success status. If the Console tab is empty, go to [Troubleshooting Quick Reference](#troubleshooting).
{% endhint %}

{% hint style="info" %}
**Concept:** The Console tab shows you what the app is actually doing to its data — not what you intended it to do, but what the generated code is executing. A mismatch between the queries here and your intended data model is a signal to revise your build prompt.
{% endhint %}
{% endstep %}

{% step %}
**Inspect the schema diagram**

Navigate to the schema view in DB Explorer (select the schema or diagram tab). Review the schema diagram, which shows the database tables and their relationships as a visual diagram.

Confirm that the tables shown match the borrower status check data model from your Lesson 2 plan. Specifically, look for:

* A table representing loan status
* A table or column representing a borrower identifier

Note what you observe. If the schema does not match your intended data model, note which tables are missing or incorrectly named — you will use this observation in later lessons.

*DB Explorer schema visualizer showing the generated database schema as a diagram*

{% hint style="info" %}
**Tip:** The schema diagram reflects the PostgreSQL Managed DB the platform generated for your app. The table names come directly from your build prompt — if you included specific field names like `loan_status` or `borrower_id`, you should see them here.
{% endhint %}

{% hint style="info" %}
**Concept:** DB Explorer operates against either the Preview build or the Published build. For this exercise you are inspecting the Preview build — the build currently open in your workspace. The Published build is what end users see at the live URL; it does not exist yet because you have not published.
{% endhint %}

{% hint style="warning" %}
**Warning:** The specific navigation controls within the schema diagram (for example, expanding a table to view its columns or clicking a relationship line) are not fully documented for this sandbox version. Explore the diagram interface and note what you can interact with. If you need to perform a specific action within the diagram that is not obvious, flag it for your instructor.
{% endhint %}
{% endstep %}
{% endstepper %}

### Procedure 3 — Validate Agent and Data Source Connections in Data Flow

{% stepper %}
{% step %}
**Open Data Flow**

Return to the app workspace action bar. Select More, then select Data Flow.

*App workspace action bar with the More menu open, showing Data Flow option*

{% hint style="success" %}
**Checkpoint:** The Data Flow diagram opens, showing an architecture diagram of your app. If Data Flow shows an empty diagram or no agent connection, go to [Troubleshooting Quick Reference](#troubleshooting).
{% endhint %}
{% endstep %}

{% step %}
**Review the architecture diagram**

Examine the Data Flow diagram. Identify each of the following components and note whether they appear:

* **Pages** — the screens or views the app generates
* **Services** — backend logic layers
* **Data stores** — the database(s) connected to the app
* **Integrations / external systems** — any external services connected during the build
* **Connections** — the labeled lines between components showing how data flows

*Data Flow diagram showing pages, services, data stores, and labeled connections*

{% hint style="info" %}
**Concept:** The Data Flow diagram is generated from the app as it is built — it reflects the architecture the App Builder Agent created from your prompt, not a diagram you draw manually. Each time you send a new build prompt, the diagram updates.
{% endhint %}
{% endstep %}

{% step %}
**Confirm agent and data source connections**

In the Data Flow diagram, confirm the following:

1. **Agent connection** — the agent you specified in your build prompt appears as a connected component in the diagram, with a labeled connection to the relevant page or service.
2. **Data source connections** — the project database (shown as a data store) appears with labeled connections to the relevant pages or services.

For each connection, note:

* Whether it is present
* Whether the label correctly identifies the component (agent name, database name)
* Whether the connection points to the correct page or service

If any connection is missing or incorrectly labeled, write a brief note describing what you would do to fix it — for example, "The agent connection is missing; I would revise the build prompt to explicitly include the agent connection instruction."

{% hint style="warning" %}
**Warning:** This is a partially unguided step. You are applying the concepts from the lesson to interpret what you see — there is no single correct answer for what the diagram will look like, because it reflects the app your specific prompt generated. Focus on whether the components you intended to include are present and correctly connected.
{% endhint %}

{% hint style="success" %}
**Checkpoint:** You can identify at least the agent component and the data store component in the diagram. If either is absent, note it and proceed — you will address missing connections in a later lesson.
{% endhint %}
{% endstep %}
{% endstepper %}

## Troubleshooting

<details>

<summary>Fixes for common problems in this lab</summary>

| **Symptom**                                                       | **Cause**                                                                                                          | **Fix**                                                                                                                                                                                                                                                                                                                                                        |
| ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Build fails — error message appears in the build conversation** | The App Builder Agent encountered a code generation error it could not resolve automatically                       | Select **Fix with AI** in the build conversation — the agent will attempt to diagnose and resolve the failure. Alternatively, describe the fix in a follow-up prompt (for example, "The build failed because of a missing dependency — please fix it"). If neither works, select **View Error Details** to see the deploy log and identify the specific error. |
| **DB Explorer Console tab is empty — no queries shown**           | The app has not been interacted with yet; queries are only logged after the app executes them                      | Return to the live preview and interact with the app (submit a form, navigate to a page, perform a search). Then return to DB Explorer and refresh the Console tab.                                                                                                                                                                                            |
| **Data Flow diagram is empty or shows no agent connection**       | The agent was not included in the build prompt, or the build prompt did not specify an agent connection explicitly | Review your build prompt. If the agent connection was not included, send a follow-up build prompt: "Connect the \[agent name] agent to handle borrower status queries." The Data Flow diagram will update after the next build.                                                                                                                                |
| **Mode control still reads Plan after switching**                 | The mode switch did not register before the prompt was sent                                                        | Select the mode control again, choose Build Mode, and confirm the control reads **⚡ Build ⌄** before sending any prompt.                                                                                                                                                                                                                                       |
| **"This is taking a while" banner appears**                       | The build is running longer than expected — this is normal for complex apps                                        | Stay in the conversation. The build continues running in the background. Do not start a new conversation unless you are prepared to lose the current build context.                                                                                                                                                                                            |
| **DB Explorer does not appear in the More menu**                  | Your role may not have access, or the app has not completed its first build                                        | Confirm the build completed successfully (live preview is visible). Confirm your role is Developer, Account Admin, or Organisation Admin. If both are true and DB Explorer is still absent, contact your instructor.                                                                                                                                           |
| **Schema tables do not match the intended data model**            | The build prompt did not include specific field or table names, so the agent used generic names                    | Note the discrepancy. In a later lesson you will learn how to revise the build to correct the schema. For now, proceed with the schema as generated.                                                                                                                                                                                                           |

</details>

## Checkpoints and validation

### Embedded checkpoint 1 — Build Mode confirmed before sending prompt

Confirm the mode control reads ⚡ Build ⌄ before you send the build prompt. If it reads Plan, the platform will return a plan document instead of generating code.

* **How to confirm:** Look at the mode control in the bottom-right of the prompt box.
* **If confirmation fails:** Select the control, choose Build Mode, and verify the label updates before proceeding.

### Embedded checkpoint 2 — Build completes and live preview is available

Confirm the build conversation ends with a summary and the live preview panel shows a running application.

* **How to confirm:** The live preview panel on the right side of the workspace shows your app's UI, not a loading state or error.
* **If confirmation fails:** Check the build conversation for an error message. Use Fix with AI or describe the fix in a follow-up prompt. See [Troubleshooting Quick Reference](#troubleshooting).

### Embedded checkpoint 3 — At least one database query appears in DB Explorer Console

* **How to confirm:** Open More → DB Explorer → Console tab and verify at least one row appears.
* **If confirmation fails:** Return to the live preview and interact with the app to trigger a query, then return to DB Explorer. See [Troubleshooting Quick Reference](#troubleshooting).

### Embedded checkpoint 4 — Schema tables match the borrower status check data model

Confirm the schema diagram shows tables related to loan status and borrower identification.

* **How to confirm:** Open the schema view in DB Explorer and look for tables whose names correspond to the data model from your Lesson 2 plan.
* **If confirmation fails:** Note the discrepancy and proceed. You will address schema corrections in a later lesson.

### Embedded checkpoint 5 — Agent and data store appear in the Data Flow diagram

Confirm the Data Flow diagram shows the agent as a connected component and the project database as a data store with labeled connections.

* **How to confirm:** Open More → Data Flow and identify the agent component and the data store component in the diagram.
* **If confirmation fails:** Note which component is missing and what you would do to fix it (see Step 10). See [Troubleshooting Quick Reference](#troubleshooting).

**Assessment component:** None. Formative coverage of this lesson's enabling objective is handled in Lesson 4, Knowledge Check 1.

## Solution reference

<details>

<summary>The completed state of your work</summary>

The following describes the completed state of the lab when all procedures are successfully executed. Use this as a reference to verify your work.

### Build Mode confirmed and app generated

* The mode control reads **⚡ Build ⌄** throughout the exercise.
* The build conversation shows a sequence of steps taken by the App Builder Agent, ending with a summary.
* The live preview panel shows a running borrower status check application.

### DB Explorer — Console tab

* At least one SQL query appears in the Console tab.
* The query references tables related to loan status and borrower identification (for example, a `SELECT` statement against a `loan_status` or `borrower_status` table).
* The query status shows as succeeded.

### DB Explorer — Schema diagram

* The schema diagram shows a PostgreSQL Managed DB with at least two tables: one representing loan or borrower status, one representing borrower identification.
* Example table names (will vary based on your build prompt): `loan_status`, `borrowers`, `borrower_status`, `loan_applications`.
* Relationships between tables are visible as connecting lines in the diagram.

### Data Flow diagram

* The diagram shows at least the following components:
  * One or more **pages** (the app's UI screens)
  * A **data store** representing the project database (labeled with the Managed DB name)
  * The **agent** you specified in your build prompt, shown as a connected component with a labeled connection to the relevant page or service
* All connections are labeled and point to the correct components.
* No components from your build prompt are missing from the diagram.

### Build version

* The version selector in the workspace marks the current build as **Latest**.
* The app has not been published yet — there is no **Published** build at this stage.
* You are working in the **Preview** build scope throughout this exercise.

</details>

{% hint style="success" %}
**Lab complete.** Confirm every checkpoint above before you move on.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.uptiq.ai/academy/tier-2-core-skills/m06-app-builder-design-system-builder/lab-3-generate-and-inspect-the-app-in.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
