Code Monkey home page Code Monkey logo

edumation-embedding-demo's Introduction

Metabase interactive embedding demo

This is the sample code for Metabase's Edumation interactive embedding demo, which showcases Metabase's interactive embedding capabilities.

Metabase is the easy, open-source way for everyone in your company to ask questions and learn from data.

Interactive embedding makes implementing multi-tenant, self-service analytics in your app easy.

Running the demo using Docker

Use this option to run the demo alongside Metabase locally in two Docker containers without installing any dependencies.

Pre-requisites

You need to have Docker installed and running on your machine.

How to run

  1. Insert your Metabase license token in the docker-compose.yaml file
  2. Run the command: docker compose up
  3. When the containers finish loading, check that everything works by opening localhost:8080

Notes

Troubleshooting

In case you get an error like this:

Bind for 0.0.0.0:3000 failed: port is already allocated

You might consider changing the ports where the containers are exposing their services:

  • in this case Metabase on port 3000 (change the line to 3001:3000) or
  • or the web app on port 8080 (change the line to 8081:8080)

Local development

These instructions are to run the embedding app locally pointing to a separate Metabase instance. The Metabase instance needs certain state and this is not covered here (users, data, dashboards, ...).

Pre-requisites

In order to run the embedding demo on your local machine, you need to have installed:

You also need a Metabase instance with a Pro/Enterprise license.

Installation

Configuration

  1. Open the .env.local file

  2. Add your JWT shared secret as follows:

    METABASE_JWT_SHARED_SECRET="edumation-MB-instance-shared-secret"
  3. Update all .env.* files relevant properties to match your Metabase instance:

    METABASE_APP_ID="edumation"
    METABASE_APP_DOMAIN="metabase.com"

โš ๏ธ Warning: avoid committing the .env.local file, as that file contains your instance's JWT shared secret that needs to stay secret.

Start

  1. Using the terminal, go to the root of the project
  2. Run the command yarn to install the Node packages
  3. Run the command yarn dev to start the app
  4. Go to localhost:3003 to check that it is working

Troubleshooting

Please read the documentation regarding Metabase session samesite cookie if your Metabase instance and application are running on different domains, e.g. embedding Metabase cloud from another domain or from localhost.

A custom cookie can be set in your instance env vars.

edumation-embedding-demo's People

Contributors

albertoperdomo avatar deniskaber avatar losrebellos avatar winlost avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

albertoperdomo

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.