Skip to main content

Build your first app

This tutorial walks through the full app lifecycle with Shoplazza CLI — from an empty directory to a deployed app with an extension. It should take about 15 minutes.

Prerequisites​

  • Shoplazza CLI installed — see Install
  • A Shoplazza partner account
  • git on your PATH (app init and app extension create clone templates with it)

1. Authenticate​

--domain app grants the scopes app extension development needs:

shell
shoplazza auth login --store-domain my-store.myshoplaza.com --domain app

Verify:

shell
shoplazza auth status

2. Scaffold the app​

app init creates a new app and scaffolds its project into a sub-directory:

shell
shoplazza app init --name "my-app"

If your account belongs to multiple partners, add --partner <id>. To link an existing app instead, use shoplazza app init --client-id <client_id>. If an app named my-app already exists under the partner, app init stops and shows its client_id rather than creating a duplicate. In a terminal, you can also run shoplazza app init with no flags and answer the prompts.

shell
cd my-app

3. Add an extension​

Scaffold a theme extension into the project:

shell
shoplazza app extension create --type theme --name my-theme --theme-type basic

--type accepts theme, checkout, or function. For a function extension: --type function --name my-function.

4. Develop locally​

Build and push all extensions to your store, and start the dev server with a public tunnel:

shell
shoplazza app dev

The app comes from the active app config; the store is your current store. Refresh the store to see your extension changes. There is no file watcher — re-run app dev after you change files. Use --debug for verbose extension builds.

To register the tunnel URLs on the Partner dashboard, run shoplazza app dev --write-urls (it records them in the [dashboard] section of the app config), then shoplazza app config push.

5. Deploy​

Build all extensions and deploy a new version of the app to your current store (in a terminal, you are asked to confirm first):

shell
shoplazza app deploy

6. Review deployed versions​

shell
shoplazza app versions

Next steps​