{"id":18646761,"url":"https://github.com/metabase/edumation-embedding-demo","last_synced_at":"2025-04-11T12:31:58.228Z","repository":{"id":188823513,"uuid":"648234039","full_name":"metabase/edumation-embedding-demo","owner":"metabase","description":"Edumation - Metabase interactive embedding demo","archived":false,"fork":false,"pushed_at":"2024-06-17T20:44:43.000Z","size":1774,"stargazers_count":4,"open_issues_count":0,"forks_count":3,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-03-25T14:06:14.646Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.metabase.com/embedding-demo","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/metabase.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-01T13:55:42.000Z","updated_at":"2025-03-25T07:51:28.000Z","dependencies_parsed_at":"2024-06-17T22:38:49.432Z","dependency_job_id":"03ed4365-d9d1-4ade-85b1-3c92b4aaf258","html_url":"https://github.com/metabase/edumation-embedding-demo","commit_stats":null,"previous_names":["metabase/edumation-embedding-demo"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metabase%2Fedumation-embedding-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metabase%2Fedumation-embedding-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metabase%2Fedumation-embedding-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metabase%2Fedumation-embedding-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/metabase","download_url":"https://codeload.github.com/metabase/edumation-embedding-demo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248401991,"owners_count":21097328,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T06:22:28.882Z","updated_at":"2025-04-11T12:31:57.293Z","avatar_url":"https://github.com/metabase.png","language":"TypeScript","funding_links":[],"categories":["Metabase Examples"],"sub_categories":["Official Examples"],"readme":"# Metabase interactive embedding demo\n\nThis is the sample code for [Metabase's Edumation interactive embedding demo](https://www.metabase.com/embedding-demo), which showcases Metabase's interactive embedding capabilities.\n\n[Metabase](https://www.metabase.com/) is the easy, open-source way for everyone in your company to ask questions and learn from data.\n\n[Interactive embedding](https://www.metabase.com/docs/master/embedding/interactive-embedding) makes implementing multi-tenant, self-service analytics in your app easy.\n\n## Running the demo using Docker\n\nUse this option to run the demo alongside Metabase locally in two Docker containers without installing any dependencies.\n\n### Pre-requisites\n\nYou need to have Docker installed and running on your machine.\n\n### How to run\n\n1. Insert your Metabase license token in the [docker-compose.yaml](https://github.com/metabase/embedding-demo/blob/master/docker-compose.yaml#L17) file\n2. Run the command: `docker compose up`\n3. When the containers finish loading, check that everything works by opening [localhost:8080](http://localhost:8080)\n\n### Notes\n\n- You can sign into the local Metabase instance to explore using the usernames `fake1@edumation.com` or `fake2@edumation.com` and password `Metapass123!`\n- Metabase runs on [localhost:3000](http://localhost:3000)\n\n### Troubleshooting\n\nIn case you get an error like this:\n\n```bash\nBind for 0.0.0.0:3000 failed: port is already allocated\n```\n\nYou might consider changing the ports where the containers are exposing their services:\n* in this case Metabase on port 3000 (change the line to [3001:3000](https://github.com/metabase/embedding-demo/blob/master/docker-compose.yaml#L11)) or\n* or the web app on port 8080 (change the line to [8081:8080](https://github.com/metabase/embedding-demo/blob/master/docker-compose.yaml#L49))\n\n## Local development\n\nThese 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, ...).\n\n### Pre-requisites\n\nIn order to run the embedding demo on your local machine, you need to have installed:\n\n- [NodeJS](https://nodejs.org/en/)\n- [Yarn](https://yarnpkg.com/)\n\nYou also need a Metabase instance with a Pro/Enterprise license.\n\n### Installation\n\n#### Configuration\n\n1. Open the [.env.local](https://github.com/metabase/edumation-embedding-demo/blob/master/.env.local) file\n2. Add your [JWT](https://www.metabase.com/glossary/jwt) shared secret as follows:\n\n    ```yaml\n    METABASE_JWT_SHARED_SECRET=\"edumation-MB-instance-shared-secret\"\n    ```\n\n3. Update all `.env.*` files relevant properties to match your Metabase instance:\n\n    ```yaml\n    METABASE_APP_ID=\"edumation\"\n    METABASE_APP_DOMAIN=\"metabase.com\"\n    ```\n\n\u003e ⚠️ Warning: avoid committing the `.env.local` file, as that file contains your instance's JWT shared secret that needs to stay **secret**.\n\n#### Start\n\n1. Using the terminal, go to the root of the project\n2. Run the command ```yarn``` to install the Node packages\n3. Run the command ```yarn dev``` to start the app\n4. Go to [localhost:3003](http://localhost:3003) to check that it is working\n\n### Troubleshooting\n\nPlease read the documentation regarding [Metabase session samesite cookie](https://www.metabase.com/docs/latest/configuring-metabase/environment-variables#mb_session_cookie_samesite) if your Metabase instance and application are running on different domains, e.g. embedding Metabase cloud from another domain or from localhost.\n\nA custom cookie can be set in your instance env vars.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetabase%2Fedumation-embedding-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmetabase%2Fedumation-embedding-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetabase%2Fedumation-embedding-demo/lists"}