> ## Documentation Index
> Fetch the complete documentation index at: https://gora.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Canonical Gora app flows

> Build and test the three MVP Gora flows with the CLI, Devnet, Dev Bridge, and local chain metadata.

# Canonical Gora app flows

These are the three developer flows Project 08.8 supports. They are intentionally small because the first production apps can build on the same surfaces instead of copying internal scripts.

## 1. Off-chain computation with callback

Use this when a Gora app computes a result and the chain side is updated by a gateway or callback submitter. No user wallet signature is required.

```bash theme={null}
gora init callback-demo --template offchain-callback --chain base --yes
cd callback-demo

gora config set node.url https://gora-dev.ngrok.app
gora contract deploy --chain base --node https://gora-dev.ngrok.app
gora contract link --chain base

gora build
gora validate
gora deploy
gora invoke --app callback_demo --input fixtures/request.json --wait

gora inspect result <request-id>
gora inspect callback <request-id>
```

The starter returns both an off-chain `callback` object and a `chain_callback` intent. Devnet callback status is visible through `gora inspect callback`, which combines Gora request output with Dev Bridge broadcast/submission events.

## 2. Mobile-initiated request with program-owned payout

Use this when mobile starts the interaction, the Gora app computes the outcome, and the app/program-owned chain component performs the payout. The raffle app is the current concrete example.

```bash theme={null}
cd examples/apps/raffle-app
npm install
npm run setup:wallets
npm run deploy:base
npm run register -- base <participant-address>
npm run fund -- base 1
npm run draw -- --round 1
```

For the full Base, Solana, and Algorand walkthrough, use [Raffle App](../examples/raffle-app). The short command block above is only the smallest local shape of the flow.

## 3. Agent-initiated transaction with mobile signing

Use this when the app/agent decides a user-paid transaction should happen, mobile signs it, and the Dev Bridge/operator submits it.

```bash theme={null}
gora init agent-demo --template agent-mobile-signing --chain base --yes
cd agent-demo

gora config set node.url https://gora-dev.ngrok.app
gora build
gora validate
gora deploy
gora invoke --app agent_demo --input fixtures/request.json --wait

gora status --app agent_demo --bridge https://gora-bridge-dev.ngrok.app
gora inspect signing <signing-request-id> --bridge https://gora-bridge-dev.ngrok.app
gora inspect submission <signing-request-id> --bridge https://gora-bridge-dev.ngrok.app
```

The generated template includes `mobile_signing_request.signing_payload` and `submission_plan`, so the node can publish it to the bridge without app-specific glue code.

## Devnet operator command

```bash theme={null}
gora devnet up --chains base,solana,algorand --mobile-signing true
```

Use narrower chain sets while developing:

```bash theme={null}
gora devnet up --chains base --mobile-signing true --no-ngrok
```

Check status:

```bash theme={null}
gora devnet status
```

Status includes Gora, Dev Bridge, Base, Solana, Algorand, tool availability, and the current contract registry.

## Self-serve QA

Run this after rebuilding the CLI and starting Devnet:

```bash theme={null}
node ops/p08_8_self_serve_qa.mjs \
  --node https://gora-dev.ngrok.app \
  --bridge https://gora-bridge-dev.ngrok.app
```

For local template-only validation:

```bash theme={null}
node ops/p08_8_self_serve_qa.mjs --offline
```

The QA script creates all three canonical templates in a clean workspace, validates them, checks node and bridge health, and simulates a bridge mobile-signing submission with a mock chain submission plan.
