{"id":51905217,"url":"https://github.com/metabase/data-app-template","last_synced_at":"2026-07-26T21:01:02.313Z","repository":{"id":365306418,"uuid":"1263993270","full_name":"metabase/data-app-template","owner":"metabase","description":"Agent-cloneable starter template for building a Metabase Data App","archived":false,"fork":false,"pushed_at":"2026-06-16T18:51:19.000Z","size":11,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-16T20:25:49.674Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-09T13:09:17.000Z","updated_at":"2026-06-16T18:51:50.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/metabase/data-app-template","commit_stats":null,"previous_names":["metabase/data-app-template"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/metabase/data-app-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metabase%2Fdata-app-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metabase%2Fdata-app-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metabase%2Fdata-app-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metabase%2Fdata-app-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/metabase","download_url":"https://codeload.github.com/metabase/data-app-template/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metabase%2Fdata-app-template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35928365,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-07-20T02:08:10.276Z","status":"online","status_checked_at":"2026-07-26T02:00:06.503Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2026-07-26T21:01:00.857Z","updated_at":"2026-07-26T21:01:02.274Z","avatar_url":"https://github.com/metabase.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# data-app-template\n\nStarter template for building Metabase **data-apps** — single-bundle\nReact apps that admins upload and embed inside Metabase via an isolated\niframe.\n\n## Quick start\n\n```bash\ngh repo create my-data-app --template metabase/data-app-template --private --clone\ncd my-data-app\nnpm install                           # or yarn / pnpm / bun — no lockfile shipped\ncp .env.local.example .env.local      # set VITE_MB_URL + VITE_MB_API_KEY\nnpm run dev                           # preview at http://localhost:5174\nnpm run build                         # produces dist/index.js for upload\n```\n\nTo upload: Metabase → Admin → Data apps → **Add**, pick a short `name`\n(it appears in the `/data-app/\u003cname\u003e` URL), upload `dist/index.js`.\n\nIf the dev preview hits CORS, add `http://localhost:5174` under\nAdmin → Embedding → Embedded analytics SDK → CORS.\n\n## What's in the box\n\n```\n.\n├── package.json            ← @metabase/embedding-sdk-react + react/react-dom\n├── vite.config.ts          ← lib mode → IIFE; externalizes SDK + react\n├── tsconfig.json\n├── index.html              ← dev preview shell (do not edit — see note)\n├── src/\n│   ├── index.tsx           ← PRODUCTION entry — factory returns { component, theme }\n│   ├── dev.tsx             ← DEV entry — wraps App with MetabaseProvider + authConfig\n│   ├── theme.ts            ← MetabaseTheme, shared by dev + prod entries\n│   ├── App.tsx             ← edit this; pure content, no MetabaseProvider wrap\n│   └── vite-env.d.ts       ← Vite env-var types\n├── .env.local.example\n└── .gitignore\n```\n\n`src/App.tsx` and anything you add under `src/` is shared between dev\nand prod. The two modes only diverge at the entry layer.\n\n## Calling external APIs (`allowed_hosts`)\n\nA data app runs sandboxed: by default it **can't** `fetch`/XHR anything. To let\nit reach an external API, list the origins in `data_app.yaml` under\n`allowed_hosts` (supports a `*.` subdomain wildcard):\n\n```yaml\nallowed_hosts:\n  - https://api.example.com\n  - https://*.internal.acme.com\n```\n\nThe same allowlist is enforced in both places: `npm run dev` applies it via the\ndev server's CSP, and Metabase applies it via the iframe CSP + the membrane\nsandbox. The Metabase instance itself is reached through the SDK (not listed\nhere). A call to any other host fails in dev exactly as it will in production.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetabase%2Fdata-app-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmetabase%2Fdata-app-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetabase%2Fdata-app-template/lists"}