{"id":18646773,"url":"https://github.com/metabase/sdk-kotlin-spring-be-example","last_synced_at":"2025-08-21T10:18:05.150Z","repository":{"id":223904522,"uuid":"761751021","full_name":"metabase/sdk-kotlin-spring-be-example","owner":"metabase","description":"Example backend for Metabase SDK implemented using Kotlin and Spring Boot","archived":false,"fork":false,"pushed_at":"2024-02-22T17:08:08.000Z","size":59,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":25,"default_branch":"main","last_synced_at":"2025-05-17T19:07:23.931Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"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":null,"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}},"created_at":"2024-02-22T12:26:23.000Z","updated_at":"2024-06-18T13:58:03.000Z","dependencies_parsed_at":"2024-02-22T17:57:58.108Z","dependency_job_id":"64108143-9b4f-4809-983a-00ecbcbe5813","html_url":"https://github.com/metabase/sdk-kotlin-spring-be-example","commit_stats":null,"previous_names":["metabase/sdk-kotlin-spring-be-example"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/metabase/sdk-kotlin-spring-be-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metabase%2Fsdk-kotlin-spring-be-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metabase%2Fsdk-kotlin-spring-be-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metabase%2Fsdk-kotlin-spring-be-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metabase%2Fsdk-kotlin-spring-be-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/metabase","download_url":"https://codeload.github.com/metabase/sdk-kotlin-spring-be-example/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metabase%2Fsdk-kotlin-spring-be-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271462096,"owners_count":24763859,"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","status":"online","status_checked_at":"2025-08-21T02:00:08.990Z","response_time":74,"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":"2024-11-07T06:22:31.494Z","updated_at":"2025-08-21T10:18:05.130Z","avatar_url":"https://github.com/metabase.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"#### Kotlin / Spring Boot SDK Embedding Example\nThis repository replicates an example backend that will play well with the Metabase Embedding SDK. We've used Kotlin and Spring Boot for this example to show that the Metabase SDK doesn't require any specific backend infrastructure, but rather just one endpoint.\n\n## Set up Metabase\n#### Enable SSO with JWT\n\nFrom any Metabase page, click on the **gear** icon in the upper right and select **Admin Settings** \u003e **Settings** \u003e **Authentication**.\n\nOn the card that says **JWT**, click the **Setup** button.\n\n#### JWT Identity provider URI\n\nIn **JWT IDENTITY PROVIDER URI** field, paste  `localhost:8081/login`.\n\n#### String used by the JWT signing key\n\nClick the **Generate key** button. Copy the key.\n\n\n## Setup the backend\nEnsure that you've cloned this repository to your local machine first.\n\n### (Recommended) IntelliJ IDEA\nThis method is _by far_ the easiest (due to JetBrains creating IntelliJ and Kotlin). You'll need to install IntelliJ, then use `Open an existing project` at the root of the local version of this repo. Then, go to:\n```\nsrc/main/kotlin/com/metabase/mbkotlinspringexample/MbSdkJavaBeExampleApplication.kt\n```\n\nYou'll see a green play button to the left of `fun main`. Click that, and click `Run MbSdkJavaBeExampleApplication`.\n\u003cimg width=\"511\" alt=\"image\" src=\"https://github.com/metabase/sdk-kotlin-spring-be-example/assets/25306947/2745719a-bff0-436b-bfe7-954fa3cea55d\"\u003e\n\n_Then, go to **Making sure it works**_\n\n\n### Command Line\n###### Installing Gradle\nEnsure that you have the `gradle` package, which you can download from the gradle website. Alternatively, on MacOS, you can install the package with `brew` using \n```\nbrew install gradle\n```\nCheck that your installation was successful by running:\n```\ngradle -v\n```\nIt should give you some information on its version if installed successfully.\n\n\n### Running the app\n\nNow, just run `gradle build` to build the app, then run `gradle run`. \n\n\n\n## Making sure it works\nGo to `localhost:8081`. The `/` endpoint will redirect you to `localhost:3004` if the server is working correctly.\n\n## Setting up environment variables\nYou'll want to make sure that your environment variables are set up to connect with your frontend application and your Metabase instance. \n\n`METABASE_CLIENT_APP_URL`\nThis URL should point to your frontend application. This app uses this variable to make sure that CORS is set up properly to accept requests from your FE.\n\n`METABASE_SITE_URL`\nYour Metabase instance's URL\n\n`METABASE_JWT_SHARED_SECRET`\nThe JWT shared secret that you can find in your Metabase Admin Settings, in \n```\nSettings \u003e Authentication \u003e JWT \u003e String used by the JWT signing key\n```\n\u003cimg width=\"885\" alt=\"image\" src=\"https://github.com/metabase/sdk-kotlin-spring-be-example/assets/25306947/a03e4446-e415-459c-b8d5-53f001768c02\"\u003e\n\nIf you want to hardcode your variables, go to `application.properties` to set them.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetabase%2Fsdk-kotlin-spring-be-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmetabase%2Fsdk-kotlin-spring-be-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetabase%2Fsdk-kotlin-spring-be-example/lists"}