App SDK

Configuration

Learn how to set up your app so it can interact with your Sanity content

Configuration

The term "configuration" in the context of SDK apps will generally refer to one of two things:

  • Your root app configuration file: sanity.cli.ts or .js, found at the root of your project. This file includes your organization ID, and the entry point for your app. Once your project has been deployed, an id for your application will be added to facilitate future deployment.
  • One or many SanityConfig objects that contain a project ID and dataset belonging to the Sanity dataset(s) you wish to interact with in your app. This configuration is passed to the SanityApp provider which typically wraps your application and provides all the necessary context needed to interact with your content.

Before you can run your application locally for the first time, you’ll need to update the config variable in src/App.tsx to include the projectId and dataset for the Sanity project(s) you want your app to work with. You can enter one or more of these configuration objects in the config array if you’d like your app to work with multiple projects and datasets.

Local development

To run your app in development mode, run the following command in your terminal from your app’s directory:

Your app will open in your organization’s Dashboard, even while running locally.

Was this page helpful?