From 8fb67dda9cd617c631507f4eb9f9fa3e796b91cf Mon Sep 17 00:00:00 2001 From: Metabase Docs bot Date: Fri, 5 Dec 2025 03:25:14 +0000 Subject: [PATCH] [auto] adding content to release-x.57.x->release-x.57.x --- .../sdk/quickstart-with-sample-app.md | 80 +++++++++-------- .../sdk/quickstart-with-sample-app.md | 80 +++++++++-------- .../sdk/quickstart-with-sample-app.html | 89 +++++++++++-------- .../sdk/quickstart-with-sample-app.html | 89 +++++++++++-------- 4 files changed, 196 insertions(+), 142 deletions(-) diff --git a/_docs/latest/embedding/sdk/quickstart-with-sample-app.md b/_docs/latest/embedding/sdk/quickstart-with-sample-app.md index 615bd0405..d774fa393 100644 --- a/_docs/latest/embedding/sdk/quickstart-with-sample-app.md +++ b/_docs/latest/embedding/sdk/quickstart-with-sample-app.md @@ -26,6 +26,22 @@ This guide sets up the embedded analytics SDK with a [sample React app](https:// - [A Metabase Pro or Enterprise license](/pricing/) (If you don't have a license, check out [this quickstart](./quickstart) that lacks the paid JWT SSO setup.) - (Optional): [Docker](https://www.docker.com/) +## Clone the sample app repo + +1. Clone the [sample React app](https://github.com/metabase/metabase-nodejs-react-sdk-embedding-sample/tree/{{page.version | remove: "v0."}}-stable). + +```bash +git clone git@github.com:metabase/metabase-nodejs-react-sdk-embedding-sample.git +``` + +2. Check out the branch in the [metabase-nodejs-react-sdk-embedding-sample](https://github.com/metabase/metabase-nodejs-react-sdk-embedding-sample/tree/{{page.version | remove: "v0."}}-stable) repo that corresponds to your Metabase version. + +```bash +git checkout {{page.version}}-stable +``` + +E.g., if you're running Metabase 1.57 make sure the sample app repo is on the `57-stable` branch. You can find your Metabase version in the Metabase UI by clicking on the gears icon in the upper right and selecting **About Metabase**. + ## Two ways to set up the sample app with Metabase - [Quick setup with Docker](#quick-setup-with-docker) (includes a sample Metabase) @@ -33,27 +49,36 @@ This guide sets up the embedded analytics SDK with a [sample React app](https:// ## Quick setup with Docker -This quick setup will run a Docker container with the sample app and a sample Metabase. +This setup will run a Docker container with the sample app and a sample Metabase. + +1. Copy the environment template file: + + In the cloned directory, run: + +```bash +cp .env.docker.example .env.docker +``` -1. Copy `.env.docker.example` to `.env.docker`. 2. In the `.env.docker` file, replace `` with your premium embedding token. + 3. In the top-level directory, run: - ```bash - yarn start - ``` + +```bash +yarn start +``` This script will: - Pull a Metabase Docker image and run it in a container. -- Set up JWT SSO in Metabase. -- Build and run the sample application with an embedded interactive question. +- Set up [JWT SSO in Metabase](../../people-and-groups/authenticating-with-jwt) +- Build and run the sample application with an embedded question. -The app will start on [http://localhost:4400](http://localhost:4400). +4. The app will start on [http://localhost:4400](http://localhost:4400). -That's it! You should be [up and running](#at-this-point-you-should-be-up-and-running). +That's it! If you want to log in to the sample Metabase this command set up, visit [http://localhost:4300](http://localhost:4300). You can log in with email and password as Rene Descartes: - +E - email: rene@example.com - password: foobarbaz @@ -72,10 +97,9 @@ Here's a quick overview of what you'll be doing: ### Start up the sample application -5. [Get the sample application](#set-up-the-sample-application). -6. [Set up the application environment](#set-up-the-application-environment). -7. [Run the app server](#set-up-the-application-server) to handle authentication with JWT and serve the embedded Metabase components. -8. [Run the client application](#set-up-the-client-application) that will contain Metabase components built with the SDK. +5. [Set up the application environment](#set-up-the-application-environment). +6.. [Run the app server](#set-up-the-application-server) to handle authentication with JWT and serve the embedded Metabase components. +7. [Run the client application](#set-up-the-client-application) that will contain Metabase components built with the SDK. And then fiddle around with styling. @@ -85,15 +109,15 @@ Let's go. You can run Metabase Pro on a Cloud plan with a [free trial](/pricing/). -Or run it locally. Here's a docker one-liner: +Or run it locally. Here's a [docker](../../installation-and-operation/running-metabase-on-docker) one-liner: -```sh +```bash docker run -d -p 3000:3000 --name metabase metabase/metabase-enterprise:latest ``` You can also [download the JAR](https://downloads.metabase.com/enterprise/latest/metabase.jar), and run it like so: -```sh +```bash java --add-opens java.base/java.nio=ALL-UNNAMED -jar metabase.jar ``` @@ -148,26 +172,10 @@ Be sure to hit the **Save and enable** button, or all is void. ## Set up the sample application -Clone the [Metabase Node JS React SDK embedding sample app](https://github.com/metabase/metabase-nodejs-react-sdk-embedding-sample/tree/{{page.version | remove: "v0."}}-stable). - -```sh -git clone git@github.com:metabase/metabase-nodejs-react-sdk-embedding-sample.git -``` - -### Check out the branch that corresponds to your Metabase version - -Check out the branch in the [metabase-nodejs-react-sdk-embedding-sample](https://github.com/metabase/metabase-nodejs-react-sdk-embedding-sample/tree/{{page.version | remove: "v0."}}-stable) repo that corresponds to your Metabase version. - -E.g., if you're running Metabase 1.53, make sure the sample app repo is on the `53-stable` branch. You can find your Metabase version in the Metabase UI by clicking on the gears icon in the upper right and selecting **About Metabase**. - -To switch to another branch, run `git checkout `, e.g.: - -``` -git checkout 52-stable -``` - ## Set up the application environment +[Clone the sample app](#clone-the-sample-app-repo) and `cd` into it. + In the sample app's main directory, copy the `.env.example` template to `.env`. ```sh @@ -233,7 +241,7 @@ Start the client app: npm start ``` -Your browser should automatically open the app. By default, the app runs on [http://localhost:3100](localhost:3100). +Your browser should automatically open the app. By default, the app runs on [http://localhost:3100](http://localhost:3100). ## At this point, you should be up and running diff --git a/_docs/v0.57/embedding/sdk/quickstart-with-sample-app.md b/_docs/v0.57/embedding/sdk/quickstart-with-sample-app.md index 704b293a0..19273a15d 100644 --- a/_docs/v0.57/embedding/sdk/quickstart-with-sample-app.md +++ b/_docs/v0.57/embedding/sdk/quickstart-with-sample-app.md @@ -24,6 +24,22 @@ This guide sets up the embedded analytics SDK with a [sample React app](https:// - [A Metabase Pro or Enterprise license](/pricing/) (If you don't have a license, check out [this quickstart](./quickstart) that lacks the paid JWT SSO setup.) - (Optional): [Docker](https://www.docker.com/) +## Clone the sample app repo + +1. Clone the [sample React app](https://github.com/metabase/metabase-nodejs-react-sdk-embedding-sample/tree/{{page.version | remove: "v0."}}-stable). + +```bash +git clone git@github.com:metabase/metabase-nodejs-react-sdk-embedding-sample.git +``` + +2. Check out the branch in the [metabase-nodejs-react-sdk-embedding-sample](https://github.com/metabase/metabase-nodejs-react-sdk-embedding-sample/tree/{{page.version | remove: "v0."}}-stable) repo that corresponds to your Metabase version. + +```bash +git checkout {{page.version}}-stable +``` + +E.g., if you're running Metabase 1.57 make sure the sample app repo is on the `57-stable` branch. You can find your Metabase version in the Metabase UI by clicking on the gears icon in the upper right and selecting **About Metabase**. + ## Two ways to set up the sample app with Metabase - [Quick setup with Docker](#quick-setup-with-docker) (includes a sample Metabase) @@ -31,27 +47,36 @@ This guide sets up the embedded analytics SDK with a [sample React app](https:// ## Quick setup with Docker -This quick setup will run a Docker container with the sample app and a sample Metabase. +This setup will run a Docker container with the sample app and a sample Metabase. + +1. Copy the environment template file: + + In the cloned directory, run: + +```bash +cp .env.docker.example .env.docker +``` -1. Copy `.env.docker.example` to `.env.docker`. 2. In the `.env.docker` file, replace `` with your premium embedding token. + 3. In the top-level directory, run: - ```bash - yarn start - ``` + +```bash +yarn start +``` This script will: - Pull a Metabase Docker image and run it in a container. -- Set up JWT SSO in Metabase. -- Build and run the sample application with an embedded interactive question. +- Set up [JWT SSO in Metabase](../../people-and-groups/authenticating-with-jwt) +- Build and run the sample application with an embedded question. -The app will start on [http://localhost:4400](http://localhost:4400). +4. The app will start on [http://localhost:4400](http://localhost:4400). -That's it! You should be [up and running](#at-this-point-you-should-be-up-and-running). +That's it! If you want to log in to the sample Metabase this command set up, visit [http://localhost:4300](http://localhost:4300). You can log in with email and password as Rene Descartes: - +E - email: rene@example.com - password: foobarbaz @@ -70,10 +95,9 @@ Here's a quick overview of what you'll be doing: ### Start up the sample application -5. [Get the sample application](#set-up-the-sample-application). -6. [Set up the application environment](#set-up-the-application-environment). -7. [Run the app server](#set-up-the-application-server) to handle authentication with JWT and serve the embedded Metabase components. -8. [Run the client application](#set-up-the-client-application) that will contain Metabase components built with the SDK. +5. [Set up the application environment](#set-up-the-application-environment). +6.. [Run the app server](#set-up-the-application-server) to handle authentication with JWT and serve the embedded Metabase components. +7. [Run the client application](#set-up-the-client-application) that will contain Metabase components built with the SDK. And then fiddle around with styling. @@ -83,15 +107,15 @@ Let's go. You can run Metabase Pro on a Cloud plan with a [free trial](/pricing/). -Or run it locally. Here's a docker one-liner: +Or run it locally. Here's a [docker](../../installation-and-operation/running-metabase-on-docker) one-liner: -```sh +```bash docker run -d -p 3000:3000 --name metabase metabase/metabase-enterprise:latest ``` You can also [download the JAR](https://downloads.metabase.com/enterprise/latest/metabase.jar), and run it like so: -```sh +```bash java --add-opens java.base/java.nio=ALL-UNNAMED -jar metabase.jar ``` @@ -146,26 +170,10 @@ Be sure to hit the **Save and enable** button, or all is void. ## Set up the sample application -Clone the [Metabase Node JS React SDK embedding sample app](https://github.com/metabase/metabase-nodejs-react-sdk-embedding-sample/tree/{{page.version | remove: "v0."}}-stable). - -```sh -git clone git@github.com:metabase/metabase-nodejs-react-sdk-embedding-sample.git -``` - -### Check out the branch that corresponds to your Metabase version - -Check out the branch in the [metabase-nodejs-react-sdk-embedding-sample](https://github.com/metabase/metabase-nodejs-react-sdk-embedding-sample/tree/{{page.version | remove: "v0."}}-stable) repo that corresponds to your Metabase version. - -E.g., if you're running Metabase 1.53, make sure the sample app repo is on the `53-stable` branch. You can find your Metabase version in the Metabase UI by clicking on the gears icon in the upper right and selecting **About Metabase**. - -To switch to another branch, run `git checkout `, e.g.: - -``` -git checkout 52-stable -``` - ## Set up the application environment +[Clone the sample app](#clone-the-sample-app-repo) and `cd` into it. + In the sample app's main directory, copy the `.env.example` template to `.env`. ```sh @@ -231,7 +239,7 @@ Start the client app: npm start ``` -Your browser should automatically open the app. By default, the app runs on [http://localhost:3100](localhost:3100). +Your browser should automatically open the app. By default, the app runs on [http://localhost:3100](http://localhost:3100). ## At this point, you should be up and running diff --git a/_site/docs/latest/embedding/sdk/quickstart-with-sample-app.html b/_site/docs/latest/embedding/sdk/quickstart-with-sample-app.html index 06b7ff54b..88c84949e 100644 --- a/_site/docs/latest/embedding/sdk/quickstart-with-sample-app.html +++ b/_site/docs/latest/embedding/sdk/quickstart-with-sample-app.html @@ -5509,6 +5509,24 @@

Prerequisites

  • (Optional): Docker
  • +

    Clone the sample app repo

    + +
      +
    1. Clone the sample React app.
    2. +
    + +
    git clone git@github.com:metabase/metabase-nodejs-react-sdk-embedding-sample.git
    +
    + +
      +
    1. Check out the branch in the metabase-nodejs-react-sdk-embedding-sample repo that corresponds to your Metabase version.
    2. +
    + +
    git checkout v0.57-stable
    +
    + +

    E.g., if you’re running Metabase 1.57 make sure the sample app repo is on the 57-stable branch. You can find your Metabase version in the Metabase UI by clicking on the gears icon in the upper right and selecting About Metabase.

    +

    Two ways to set up the sample app with Metabase

      @@ -5518,31 +5536,47 @@

      Two ways to set up the

      Quick setup with Docker

      -

      This quick setup will run a Docker container with the sample app and a sample Metabase.

      +

      This setup will run a Docker container with the sample app and a sample Metabase.

        -
      1. Copy .env.docker.example to .env.docker.
      2. -
      3. In the .env.docker file, replace <your_enterprise_token> with your premium embedding token.
      4. -
      5. In the top-level directory, run: -
        yarn start
        -
        +
      6. +

        Copy the environment template file:

        + +

        In the cloned directory, run:

      +
      cp .env.docker.example .env.docker
      +
      + +
        +
      1. +

        In the .env.docker file, replace <your_enterprise_token> with your premium embedding token.

        +
      2. +
      3. +

        In the top-level directory, run:

        +
      4. +
      + +
      yarn start
      +
      +

      This script will:

      • Pull a Metabase Docker image and run it in a container.
      • -
      • Set up JWT SSO in Metabase.
      • -
      • Build and run the sample application with an embedded interactive question.
      • +
      • Set up JWT SSO in Metabase
      • +
      • Build and run the sample application with an embedded question.
      -

      The app will start on http://localhost:4400.

      - -

      That’s it! You should be up and running.

      +
        +
      1. The app will start on http://localhost:4400.
      2. +
      -

      If you want to log in to the sample Metabase this command set up, visit http://localhost:4300. You can log in with email and password as Rene Descartes:

      +

      That’s it!

      +

      If you want to log in to the sample Metabase this command set up, visit http://localhost:4300. You can log in with email and password as Rene Descartes: +E

      • email: rene@example.com
      • password: foobarbaz
      • @@ -5566,9 +5600,8 @@

        Set up Metabase for embedding

        Start up the sample application

          -
        1. Get the sample application.
        2. -
        3. Set up the application environment.
        4. -
        5. Run the app server to handle authentication with JWT and serve the embedded Metabase components.
        6. +
        7. Set up the application environment. +6.. Run the app server to handle authentication with JWT and serve the embedded Metabase components.
        8. Run the client application that will contain Metabase components built with the SDK.
        @@ -5580,14 +5613,14 @@

        Install Metabase Enterprise Edition

        You can run Metabase Pro on a Cloud plan with a free trial.

        -

        Or run it locally. Here’s a docker one-liner:

        +

        Or run it locally. Here’s a docker one-liner:

        -
        docker run -d -p 3000:3000 --name metabase metabase/metabase-enterprise:latest
        +
        docker run -d -p 3000:3000 --name metabase metabase/metabase-enterprise:latest
         

        You can also download the JAR, and run it like so:

        -
        java --add-opens java.base/java.nio=ALL-UNNAMED -jar metabase.jar
        +
        java --add-opens java.base/java.nio=ALL-UNNAMED -jar metabase.jar
         

        By default, Metabase will run at http://localhost:3000.

        @@ -5642,24 +5675,10 @@

        Save and enable JWT

        Set up the sample application

        -

        Clone the Metabase Node JS React SDK embedding sample app.

        - -
        git clone git@github.com:metabase/metabase-nodejs-react-sdk-embedding-sample.git
        -
        - -

        Check out the branch that corresponds to your Metabase version

        - -

        Check out the branch in the metabase-nodejs-react-sdk-embedding-sample repo that corresponds to your Metabase version.

        - -

        E.g., if you’re running Metabase 1.53, make sure the sample app repo is on the 53-stable branch. You can find your Metabase version in the Metabase UI by clicking on the gears icon in the upper right and selecting About Metabase.

        - -

        To switch to another branch, run git checkout <branch-name>, e.g.:

        - -
        git checkout 52-stable
        -
        -

        Set up the application environment

        +

        Clone the sample app and cd into it.

        +

        In the sample app’s main directory, copy the .env.example template to .env.

        cp .env.example .env
        @@ -5717,7 +5736,7 @@ 

        Set up the client application

        npm start
         
        -

        Your browser should automatically open the app. By default, the app runs on http://localhost:3100.

        +

        Your browser should automatically open the app. By default, the app runs on http://localhost:3100.

        At this point, you should be up and running

        diff --git a/_site/docs/v0.57/embedding/sdk/quickstart-with-sample-app.html b/_site/docs/v0.57/embedding/sdk/quickstart-with-sample-app.html index dfaff1242..71f612eb7 100644 --- a/_site/docs/v0.57/embedding/sdk/quickstart-with-sample-app.html +++ b/_site/docs/v0.57/embedding/sdk/quickstart-with-sample-app.html @@ -5511,6 +5511,24 @@

        Prerequisites

      • (Optional): Docker
      +

      Clone the sample app repo

      + +
        +
      1. Clone the sample React app.
      2. +
      + +
      git clone git@github.com:metabase/metabase-nodejs-react-sdk-embedding-sample.git
      +
      + +
        +
      1. Check out the branch in the metabase-nodejs-react-sdk-embedding-sample repo that corresponds to your Metabase version.
      2. +
      + +
      git checkout v0.57-stable
      +
      + +

      E.g., if you’re running Metabase 1.57 make sure the sample app repo is on the 57-stable branch. You can find your Metabase version in the Metabase UI by clicking on the gears icon in the upper right and selecting About Metabase.

      +

      Two ways to set up the sample app with Metabase

        @@ -5520,31 +5538,47 @@

        Two ways to set up the

        Quick setup with Docker

        -

        This quick setup will run a Docker container with the sample app and a sample Metabase.

        +

        This setup will run a Docker container with the sample app and a sample Metabase.

          -
        1. Copy .env.docker.example to .env.docker.
        2. -
        3. In the .env.docker file, replace <your_enterprise_token> with your premium embedding token.
        4. -
        5. In the top-level directory, run: -
          yarn start
          -
          +
        6. +

          Copy the environment template file:

          + +

          In the cloned directory, run:

        +
        cp .env.docker.example .env.docker
        +
        + +
          +
        1. +

          In the .env.docker file, replace <your_enterprise_token> with your premium embedding token.

          +
        2. +
        3. +

          In the top-level directory, run:

          +
        4. +
        + +
        yarn start
        +
        +

        This script will:

        • Pull a Metabase Docker image and run it in a container.
        • -
        • Set up JWT SSO in Metabase.
        • -
        • Build and run the sample application with an embedded interactive question.
        • +
        • Set up JWT SSO in Metabase
        • +
        • Build and run the sample application with an embedded question.
        -

        The app will start on http://localhost:4400.

        - -

        That’s it! You should be up and running.

        +
          +
        1. The app will start on http://localhost:4400.
        2. +
        -

        If you want to log in to the sample Metabase this command set up, visit http://localhost:4300. You can log in with email and password as Rene Descartes:

        +

        That’s it!

        +

        If you want to log in to the sample Metabase this command set up, visit http://localhost:4300. You can log in with email and password as Rene Descartes: +E

        • email: rene@example.com
        • password: foobarbaz
        • @@ -5568,9 +5602,8 @@

          Set up Metabase for embedding

          Start up the sample application

            -
          1. Get the sample application.
          2. -
          3. Set up the application environment.
          4. -
          5. Run the app server to handle authentication with JWT and serve the embedded Metabase components.
          6. +
          7. Set up the application environment. +6.. Run the app server to handle authentication with JWT and serve the embedded Metabase components.
          8. Run the client application that will contain Metabase components built with the SDK.
          @@ -5582,14 +5615,14 @@

          Install Metabase Enterprise Edition

          You can run Metabase Pro on a Cloud plan with a free trial.

          -

          Or run it locally. Here’s a docker one-liner:

          +

          Or run it locally. Here’s a docker one-liner:

          -
          docker run -d -p 3000:3000 --name metabase metabase/metabase-enterprise:latest
          +
          docker run -d -p 3000:3000 --name metabase metabase/metabase-enterprise:latest
           

          You can also download the JAR, and run it like so:

          -
          java --add-opens java.base/java.nio=ALL-UNNAMED -jar metabase.jar
          +
          java --add-opens java.base/java.nio=ALL-UNNAMED -jar metabase.jar
           

          By default, Metabase will run at http://localhost:3000.

          @@ -5644,24 +5677,10 @@

          Save and enable JWT

          Set up the sample application

          -

          Clone the Metabase Node JS React SDK embedding sample app.

          - -
          git clone git@github.com:metabase/metabase-nodejs-react-sdk-embedding-sample.git
          -
          - -

          Check out the branch that corresponds to your Metabase version

          - -

          Check out the branch in the metabase-nodejs-react-sdk-embedding-sample repo that corresponds to your Metabase version.

          - -

          E.g., if you’re running Metabase 1.53, make sure the sample app repo is on the 53-stable branch. You can find your Metabase version in the Metabase UI by clicking on the gears icon in the upper right and selecting About Metabase.

          - -

          To switch to another branch, run git checkout <branch-name>, e.g.:

          - -
          git checkout 52-stable
          -
          -

          Set up the application environment

          +

          Clone the sample app and cd into it.

          +

          In the sample app’s main directory, copy the .env.example template to .env.

          cp .env.example .env
          @@ -5719,7 +5738,7 @@ 

          Set up the client application

          npm start
           
          -

          Your browser should automatically open the app. By default, the app runs on http://localhost:3100.

          +

          Your browser should automatically open the app. By default, the app runs on http://localhost:3100.

          At this point, you should be up and running