# Build your first app

Source: https://snizu.dev/docs/apps/first-app

## Before you start [#before-you-start]

- Node.js 22 or newer, and the CLI: `npm i -g @snizu/cli`.
- A Partner API token from the developer console (**Settings → API tokens**), with `apps:deploy` and `stores:create`.

## 1. Sign in and open a store to try it on [#1-sign-in-and-open-a-store-to-try-it-on]

```shellsession title="Terminal"
$ snizu login
✓ Signed in to Nakhla Studio.
$ snizu store create "Siwa Grove test" --sample libas
✓ Opened Siwa Grove test at siwa-grove-test.snizu.app.
```

A development store is yours: free, behind a password, with test payments only. It runs drafts of your apps.

## 2. Write the app [#2-write-the-app]

```shellsession title="Terminal"
$ snizu app create gift-wrap
✓ Wrote an app in /home/salma/gift-wrap.
$ cd gift-wrap
$ npm test
```

It's plain Node with no dependencies: `server.js` holds the routes, and `lib/verify.js` every check an app has to make, with its tests. [What it writes](/docs/cli/app/create) lists each file.

## 3. Register it [#3-register-it]

```shellsession title="Terminal"
$ snizu app init --name "Gift wrap" --category sales
Registered gift-wrap in Nakhla Studio. Its client secret is in the console.
✓ Wrote snizu.app.json for gift-wrap.
```

Copy the client ID and secret from the app's page in the developer console into `.env`:

```sh title=".env"
CLIENT_ID=…
CLIENT_SECRET=…
APP_URL=https://gift-wrap.example.com
```

## 4. Say what it needs [#4-say-what-it-needs]

`snizu.app.json` holds the manifest. Give the app its scopes and why it needs each, its webhooks, and the page merchants open in the admin:

```json title="snizu.app.json"
{
  "handle": "gift-wrap",
  "version": "0.1.0",
  "manifest": {
    "scopes": ["orders:read"],
    "access_reasons": [
      {
        "resource": "orders",
        "reason": "To wrap the items each order asks for.",
        "reason_ar": "لنغلّف المنتجات التي يطلبها كل طلب."
      }
    ],
    "admin_url": "https://gift-wrap.example.com/admin",
    "webhooks": [{ "url": "https://gift-wrap.example.com/webhooks", "topics": ["order.created"] }],
    "settings": [],
    "api_version": "2026-10"
  }
}
```

The server checks it whenever you deploy, and says what's wrong one field at a time.

## 5. Run it on your store [#5-run-it-on-your-store]

```shellsession title="Terminal"
$ npm run dev
$ snizu app dev --store siwa-grove-test
✓ 0.1.0 runs on Siwa Grove test (Libas) at http://127.0.0.1:9292
```

`npm run dev` serves your app; `snizu app dev` makes the store run its draft, with its theme embeds on, and does it again whenever you save. Open the store's admin to see your page under Apps.

## 6. Send it to review [#6-send-it-to-review]

```shellsession title="Terminal"
$ snizu app deploy --submit --notes "First version"
✓ Updated gift-wrap 0.1.0 as a draft.
✓ 0.1.0 is in review. You'll hear when it's decided.
```

## Next [#next]

- [Embedded pages](/docs/apps/embedded-pages): your app's page inside the admin, with App Bridge.
- [Checkout blocks](/docs/apps/checkout-blocks): your app's page inside the hosted checkout.
- [Verify webhook signatures](/docs/connections/webhooks/verify-signatures).