• Stars
    star
    128
  • Rank 281,044 (Top 6 %)
  • Language
    PHP
  • Created almost 8 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Reference applications for common web frameworks showing how to embed Metabase charts

Embedding Metabase dashboards: reference web apps

This repo contains example applications for common web frameworks to demonstrate how Metabase dashboards can be embedded in your application.

This README will walk you through getting Metabase up and running, as well as a simple web app, to show you a live example of an embedded dashboard.

Here's a simple Metabase dashboard in action:

Simple Metabase dashboard embedded in Node application

Premium embedding

Embedding Metabase charts will always be free, but we include a "Powered by Metabase" graphic when using the open source version.

If you'd like to remove the "Powered by Metabase" attribution, check out our paid plans. With full-app embedding, you can add dashboards, charts, or even the entire Metabase interface into your own app with a fully branded experience.

Prerequisites

Set up Metabase

We'll first need to set up a running instance of Metabase to serve the embedded dashboards.

  1. Shut down Metabase if you already have it running on your machine.
  2. Download the JAR file for Metabase OSS.
  3. Open up a terminal and clone this repo to your machine.
  4. Move the metabase.jar file from your downloads to the /embedding-reference-apps/metabase directory.
  5. cd into /embedding-reference-apps/metabase.
  6. Run the JAR file:
    java -jar metabase.jar
    
  7. Run any example depending on the programming language you choose.

Enable embedding

Once you've got Metabase running (on port 3000 by default):

  1. Go to localhost:3000 in your browser.
  2. Log into Metabase.
  3. Go to Admin settings > Embedding and click the toggle.

Running the apps

To see an embedded Metabase dashboard in action, set up Metabase, and follow the instructions in the README for the relevant app. If you're not sure which one to try, check out the Node app.

Embedding charts or dashboards

There are different ways to embed Metabase charts or dashboards in web applications.

Public embeds

The public embedding method is to simply use the public URLs inside of an iframe, or really anywhere you can insert HTML. The embedded dashboard has a secure URL, so a user can only look at the contents of the dashboard being shared. An end user never has information they can use to modify the URL and gain access to any other resources on your Metabase instance.

Signed embeds

With signed embedding, all embedded charts and dashboards have to be signed using a secret key. This allows you to build dynamic dashboards with a parameter that can be be locked down on the client side. You should sign embedded charts and dashboards on your server, which allows you to embed dashboards accessible to specific organizations, accounts, or users.

The web applications go into more detail about embedding, and provide examples. Start up the Node app and explore the app.

Full-app embedding

Full-app embedding puts the entire Metabase app inside your app, so you can include the query builder in addition to your charts and dashboards. Full-app embedding isn't covered in this repo. Check out the full-app embedding demo instead.

Docs and articles

Run into trouble?

Check out the Metabase discussion forum and search for your issue. If you don't find any answers, please create an issue for this repository.

More Repositories

1

metabase

The simplest, fastest way to get business intelligence and analytics to everyone in your company 😋
Clojure
36,663
star
2

toucan

A classy high-level Clojure library for defining application models and retrieving them from a DB
Clojure
566
star
3

metabase-deploy

Metabase binary deployment
Shell
96
star
4

sso-examples

Single Sign-On (SSO) examples for Metabase integration
JavaScript
46
star
5

hawk

It watches your code like a hawk! You like tests, right? Then run them with our state-of-the-art Clojure test runner.
Clojure
35
star
6

metabase-buildpack

Buildpack for Heroku
Shell
23
star
7

throttle

Tools for throttling access to API endpoints or other code pathways 😋
Clojure
17
star
8

connection-pool

Connection pools for JDBC databases. Simple wrapper around C3P0.
Clojure
14
star
9

metabase-qa

Make Metabase More Awesome
Shell
13
star
10

mbql

Formal definition and utility functions lib for the MBQL language
Clojure
12
star
11

sparksql-deps

Metabase SparkSQL driver dependencies
Clojure
8
star
12

dev-scripts

Useful scripts for Metabase development
Clojure
8
star
13

mba

metabase assembler
Clojure
7
star
14

sudoku-driver

Sample Metabase driver that generates sudoku boards
Clojure
7
star
15

webchauffeur

A fancy wrapper around selenium-webdriver for Node.js
JavaScript
6
star
16

metabase-clojure-mode

Minor Mode for Writing Metabase Clojure Code for Emacs
Emacs Lisp
6
star
17

crate-driver

Metabase driver for CrateDB. Community-supported.
Clojure
6
star
18

docker-spark

Docker image for running SparkSQL Thrift server
Dockerfile
5
star
19

financial-modeling-package

A package for setting up a metrics store in Metabase.
Python
5
star
20

macaw

A Clojure wrapper for JSqlParser 🦜
Clojure
5
star
21

toucan.admin

Automatic admin interface built on top of Toucan. Like Django admin, but for Clojure!
Clojure
4
star
22

metabase-docker-ci

Docker Image for CI
Dockerfile
4
star
23

metabase-nodejs-express-interactive-embedding-sample

Metabase Interactive Embedding Sample for Node.js
JavaScript
4
star
24

schema-util

Helpful prismatic/schema utility functions and schemas.
Clojure
3
star
25

CQL

Clojure Query Language
Clojure
3
star
26

metabook

Clerk Notebooks + Metabase
Clojure
3
star
27

common

Things shared across several Metabase projects, such as i18n & the canonical classloader
Clojure
3
star
28

sample-driver

A sample Metabase driver that connects to a database
Clojure
3
star
29

edumation-embedding-demo

Edumation - Metabase interactive embedding demo
TypeScript
3
star
30

jar-compression

EXPERIMENTAL Clojure library for programmatically compressing/decompressing JARs, stripping files and directories, and packing with pack200. Not actively supported
Clojure
3
star
31

uefa-euro-2024-data

A repo that is used to source data from the sportmonks API. The result is used for a EURO 2024 Metabase Dashboard.
Python
3
star
32

cla-bot

AWS Lambda Clojure GitHub app to check whether PR authors have signed CLA.
Clojure
2
star
33

second-date

Helpful java.time utility functions for Clojure
Clojure
2
star
34

interview-fe-boilerplate

JavaScript
2
star
35

honeysql-util

Helpful utility functions for HoneySQL
Clojure
2
star
36

driver

Interface and shared implementation functions for Metabase drivers [WIP]
Clojure
1
star
37

metabase-heroku

Shell
1
star
38

util

Experimental: Spin off metabase.util namespaces into separate lib
Clojure
1
star
39

lein-compress-jar

Leiningen plugin to compress/pack/strip blacklisted files from JARs
Clojure
1
star
40

druid-docker

Docker image to run simple Druid DB cluster for test purposes
Shell
1
star
41

docker-ci-build-image

Dockerfile for doing Metabase builds in CircleCI (no longer used)
Dockerfile
1
star