From c5c1382b84e3b7af62c315c4a154b8648a98b0f9 Mon Sep 17 00:00:00 2001 From: Evgenii Kniazev Date: Wed, 21 Jan 2026 11:35:42 +0000 Subject: [PATCH 1/4] Add DAB template schema for CLI compatibility This enables the appkit template to be used by the Databricks CLI init-template command. Changes: - Add databricks_template_schema.json with project_name, sql_warehouse_id, profile, and app_description properties - Restructure template to template/{{.project_name}}/ directory format expected by DAB template system Co-Authored-By: Claude Opus 4.5 --- databricks_template_schema.json | 29 ++++++++++++++++++ .../{ => {{.project_name}}}/.env.example.tmpl | 0 template/{ => {{.project_name}}}/.env.tmpl | 0 .../{ => {{.project_name}}}/.gitignore.tmpl | 0 .../{ => {{.project_name}}}/.prettierignore | 0 .../{ => {{.project_name}}}/.prettierrc.json | 0 template/{ => {{.project_name}}}/README.md | 0 .../{ => {{.project_name}}}/app.yaml.tmpl | 0 .../client/components.json | 0 .../{ => {{.project_name}}}/client/index.html | 0 .../client/postcss.config.js | 0 .../client/public/apple-touch-icon.png | Bin .../client/public/favicon-16x16.png | Bin .../client/public/favicon-192x192.png | Bin .../client/public/favicon-32x32.png | Bin .../client/public/favicon-48x48.png | Bin .../client/public/favicon-512x512.png | Bin .../client/public/favicon.svg | 0 .../client/public/site.webmanifest | 0 .../client/src/App.tsx | 0 .../client/src/ErrorBoundary.tsx | 0 .../client/src/index.css | 0 .../client/src/lib/utils.ts | 0 .../client/src/main.tsx | 0 .../client/src/vite-env.d.ts | 0 .../client/tailwind.config.ts | 0 .../client/vite.config.ts | 0 .../config/queries/hello_world.sql | 0 .../config/queries/mocked_sales.sql | 0 .../databricks.yml.tmpl | 0 .../{ => {{.project_name}}}/eslint.config.js | 0 .../features/analytics/app_env.yml | 0 .../features/analytics/bundle_resources.yml | 0 .../features/analytics/bundle_variables.yml | 0 .../features/analytics/dotenv.yml | 0 .../features/analytics/dotenv_example.yml | 0 .../features/analytics/target_variables.yml | 0 template/{ => {{.project_name}}}/package.json | 0 .../playwright.config.ts | 0 .../{ => {{.project_name}}}/server/server.ts | 0 .../tests/smoke.spec.ts | 0 .../tsconfig.client.json | 0 .../{ => {{.project_name}}}/tsconfig.json | 0 .../tsconfig.server.json | 0 .../tsconfig.shared.json | 0 .../{ => {{.project_name}}}/vitest.config.ts | 0 46 files changed, 29 insertions(+) create mode 100644 databricks_template_schema.json rename template/{ => {{.project_name}}}/.env.example.tmpl (100%) rename template/{ => {{.project_name}}}/.env.tmpl (100%) rename template/{ => {{.project_name}}}/.gitignore.tmpl (100%) rename template/{ => {{.project_name}}}/.prettierignore (100%) rename template/{ => {{.project_name}}}/.prettierrc.json (100%) rename template/{ => {{.project_name}}}/README.md (100%) rename template/{ => {{.project_name}}}/app.yaml.tmpl (100%) rename template/{ => {{.project_name}}}/client/components.json (100%) rename template/{ => {{.project_name}}}/client/index.html (100%) rename template/{ => {{.project_name}}}/client/postcss.config.js (100%) rename template/{ => {{.project_name}}}/client/public/apple-touch-icon.png (100%) rename template/{ => {{.project_name}}}/client/public/favicon-16x16.png (100%) rename template/{ => {{.project_name}}}/client/public/favicon-192x192.png (100%) rename template/{ => {{.project_name}}}/client/public/favicon-32x32.png (100%) rename template/{ => {{.project_name}}}/client/public/favicon-48x48.png (100%) rename template/{ => {{.project_name}}}/client/public/favicon-512x512.png (100%) rename template/{ => {{.project_name}}}/client/public/favicon.svg (100%) rename template/{ => {{.project_name}}}/client/public/site.webmanifest (100%) rename template/{ => {{.project_name}}}/client/src/App.tsx (100%) rename template/{ => {{.project_name}}}/client/src/ErrorBoundary.tsx (100%) rename template/{ => {{.project_name}}}/client/src/index.css (100%) rename template/{ => {{.project_name}}}/client/src/lib/utils.ts (100%) rename template/{ => {{.project_name}}}/client/src/main.tsx (100%) rename template/{ => {{.project_name}}}/client/src/vite-env.d.ts (100%) rename template/{ => {{.project_name}}}/client/tailwind.config.ts (100%) rename template/{ => {{.project_name}}}/client/vite.config.ts (100%) rename template/{ => {{.project_name}}}/config/queries/hello_world.sql (100%) rename template/{ => {{.project_name}}}/config/queries/mocked_sales.sql (100%) rename template/{ => {{.project_name}}}/databricks.yml.tmpl (100%) rename template/{ => {{.project_name}}}/eslint.config.js (100%) rename template/{ => {{.project_name}}}/features/analytics/app_env.yml (100%) rename template/{ => {{.project_name}}}/features/analytics/bundle_resources.yml (100%) rename template/{ => {{.project_name}}}/features/analytics/bundle_variables.yml (100%) rename template/{ => {{.project_name}}}/features/analytics/dotenv.yml (100%) rename template/{ => {{.project_name}}}/features/analytics/dotenv_example.yml (100%) rename template/{ => {{.project_name}}}/features/analytics/target_variables.yml (100%) rename template/{ => {{.project_name}}}/package.json (100%) rename template/{ => {{.project_name}}}/playwright.config.ts (100%) rename template/{ => {{.project_name}}}/server/server.ts (100%) rename template/{ => {{.project_name}}}/tests/smoke.spec.ts (100%) rename template/{ => {{.project_name}}}/tsconfig.client.json (100%) rename template/{ => {{.project_name}}}/tsconfig.json (100%) rename template/{ => {{.project_name}}}/tsconfig.server.json (100%) rename template/{ => {{.project_name}}}/tsconfig.shared.json (100%) rename template/{ => {{.project_name}}}/vitest.config.ts (100%) diff --git a/databricks_template_schema.json b/databricks_template_schema.json new file mode 100644 index 0000000..2d27357 --- /dev/null +++ b/databricks_template_schema.json @@ -0,0 +1,29 @@ +{ + "properties": { + "project_name": { + "type": "string", + "description": "Project Name", + "order": 1, + "pattern": "^[A-Za-z0-9_-]+$", + "pattern_match_failure_message": "Name must consist of letters, numbers, underscores, or hyphens." + }, + "sql_warehouse_id": { + "type": "string", + "description": "SQL Warehouse ID", + "order": 2 + }, + "profile": { + "type": "string", + "description": "Profile Name", + "default": "", + "order": 3 + }, + "app_description": { + "type": "string", + "description": "App Description (Optional)", + "default": "A Databricks App powered by Databricks AppKit", + "order": 4 + } + }, + "success_message": "\nYour new project has been created in the '{{.project_name}}' directory!" +} diff --git a/template/.env.example.tmpl b/template/{{.project_name}}/.env.example.tmpl similarity index 100% rename from template/.env.example.tmpl rename to template/{{.project_name}}/.env.example.tmpl diff --git a/template/.env.tmpl b/template/{{.project_name}}/.env.tmpl similarity index 100% rename from template/.env.tmpl rename to template/{{.project_name}}/.env.tmpl diff --git a/template/.gitignore.tmpl b/template/{{.project_name}}/.gitignore.tmpl similarity index 100% rename from template/.gitignore.tmpl rename to template/{{.project_name}}/.gitignore.tmpl diff --git a/template/.prettierignore b/template/{{.project_name}}/.prettierignore similarity index 100% rename from template/.prettierignore rename to template/{{.project_name}}/.prettierignore diff --git a/template/.prettierrc.json b/template/{{.project_name}}/.prettierrc.json similarity index 100% rename from template/.prettierrc.json rename to template/{{.project_name}}/.prettierrc.json diff --git a/template/README.md b/template/{{.project_name}}/README.md similarity index 100% rename from template/README.md rename to template/{{.project_name}}/README.md diff --git a/template/app.yaml.tmpl b/template/{{.project_name}}/app.yaml.tmpl similarity index 100% rename from template/app.yaml.tmpl rename to template/{{.project_name}}/app.yaml.tmpl diff --git a/template/client/components.json b/template/{{.project_name}}/client/components.json similarity index 100% rename from template/client/components.json rename to template/{{.project_name}}/client/components.json diff --git a/template/client/index.html b/template/{{.project_name}}/client/index.html similarity index 100% rename from template/client/index.html rename to template/{{.project_name}}/client/index.html diff --git a/template/client/postcss.config.js b/template/{{.project_name}}/client/postcss.config.js similarity index 100% rename from template/client/postcss.config.js rename to template/{{.project_name}}/client/postcss.config.js diff --git a/template/client/public/apple-touch-icon.png b/template/{{.project_name}}/client/public/apple-touch-icon.png similarity index 100% rename from template/client/public/apple-touch-icon.png rename to template/{{.project_name}}/client/public/apple-touch-icon.png diff --git a/template/client/public/favicon-16x16.png b/template/{{.project_name}}/client/public/favicon-16x16.png similarity index 100% rename from template/client/public/favicon-16x16.png rename to template/{{.project_name}}/client/public/favicon-16x16.png diff --git a/template/client/public/favicon-192x192.png b/template/{{.project_name}}/client/public/favicon-192x192.png similarity index 100% rename from template/client/public/favicon-192x192.png rename to template/{{.project_name}}/client/public/favicon-192x192.png diff --git a/template/client/public/favicon-32x32.png b/template/{{.project_name}}/client/public/favicon-32x32.png similarity index 100% rename from template/client/public/favicon-32x32.png rename to template/{{.project_name}}/client/public/favicon-32x32.png diff --git a/template/client/public/favicon-48x48.png b/template/{{.project_name}}/client/public/favicon-48x48.png similarity index 100% rename from template/client/public/favicon-48x48.png rename to template/{{.project_name}}/client/public/favicon-48x48.png diff --git a/template/client/public/favicon-512x512.png b/template/{{.project_name}}/client/public/favicon-512x512.png similarity index 100% rename from template/client/public/favicon-512x512.png rename to template/{{.project_name}}/client/public/favicon-512x512.png diff --git a/template/client/public/favicon.svg b/template/{{.project_name}}/client/public/favicon.svg similarity index 100% rename from template/client/public/favicon.svg rename to template/{{.project_name}}/client/public/favicon.svg diff --git a/template/client/public/site.webmanifest b/template/{{.project_name}}/client/public/site.webmanifest similarity index 100% rename from template/client/public/site.webmanifest rename to template/{{.project_name}}/client/public/site.webmanifest diff --git a/template/client/src/App.tsx b/template/{{.project_name}}/client/src/App.tsx similarity index 100% rename from template/client/src/App.tsx rename to template/{{.project_name}}/client/src/App.tsx diff --git a/template/client/src/ErrorBoundary.tsx b/template/{{.project_name}}/client/src/ErrorBoundary.tsx similarity index 100% rename from template/client/src/ErrorBoundary.tsx rename to template/{{.project_name}}/client/src/ErrorBoundary.tsx diff --git a/template/client/src/index.css b/template/{{.project_name}}/client/src/index.css similarity index 100% rename from template/client/src/index.css rename to template/{{.project_name}}/client/src/index.css diff --git a/template/client/src/lib/utils.ts b/template/{{.project_name}}/client/src/lib/utils.ts similarity index 100% rename from template/client/src/lib/utils.ts rename to template/{{.project_name}}/client/src/lib/utils.ts diff --git a/template/client/src/main.tsx b/template/{{.project_name}}/client/src/main.tsx similarity index 100% rename from template/client/src/main.tsx rename to template/{{.project_name}}/client/src/main.tsx diff --git a/template/client/src/vite-env.d.ts b/template/{{.project_name}}/client/src/vite-env.d.ts similarity index 100% rename from template/client/src/vite-env.d.ts rename to template/{{.project_name}}/client/src/vite-env.d.ts diff --git a/template/client/tailwind.config.ts b/template/{{.project_name}}/client/tailwind.config.ts similarity index 100% rename from template/client/tailwind.config.ts rename to template/{{.project_name}}/client/tailwind.config.ts diff --git a/template/client/vite.config.ts b/template/{{.project_name}}/client/vite.config.ts similarity index 100% rename from template/client/vite.config.ts rename to template/{{.project_name}}/client/vite.config.ts diff --git a/template/config/queries/hello_world.sql b/template/{{.project_name}}/config/queries/hello_world.sql similarity index 100% rename from template/config/queries/hello_world.sql rename to template/{{.project_name}}/config/queries/hello_world.sql diff --git a/template/config/queries/mocked_sales.sql b/template/{{.project_name}}/config/queries/mocked_sales.sql similarity index 100% rename from template/config/queries/mocked_sales.sql rename to template/{{.project_name}}/config/queries/mocked_sales.sql diff --git a/template/databricks.yml.tmpl b/template/{{.project_name}}/databricks.yml.tmpl similarity index 100% rename from template/databricks.yml.tmpl rename to template/{{.project_name}}/databricks.yml.tmpl diff --git a/template/eslint.config.js b/template/{{.project_name}}/eslint.config.js similarity index 100% rename from template/eslint.config.js rename to template/{{.project_name}}/eslint.config.js diff --git a/template/features/analytics/app_env.yml b/template/{{.project_name}}/features/analytics/app_env.yml similarity index 100% rename from template/features/analytics/app_env.yml rename to template/{{.project_name}}/features/analytics/app_env.yml diff --git a/template/features/analytics/bundle_resources.yml b/template/{{.project_name}}/features/analytics/bundle_resources.yml similarity index 100% rename from template/features/analytics/bundle_resources.yml rename to template/{{.project_name}}/features/analytics/bundle_resources.yml diff --git a/template/features/analytics/bundle_variables.yml b/template/{{.project_name}}/features/analytics/bundle_variables.yml similarity index 100% rename from template/features/analytics/bundle_variables.yml rename to template/{{.project_name}}/features/analytics/bundle_variables.yml diff --git a/template/features/analytics/dotenv.yml b/template/{{.project_name}}/features/analytics/dotenv.yml similarity index 100% rename from template/features/analytics/dotenv.yml rename to template/{{.project_name}}/features/analytics/dotenv.yml diff --git a/template/features/analytics/dotenv_example.yml b/template/{{.project_name}}/features/analytics/dotenv_example.yml similarity index 100% rename from template/features/analytics/dotenv_example.yml rename to template/{{.project_name}}/features/analytics/dotenv_example.yml diff --git a/template/features/analytics/target_variables.yml b/template/{{.project_name}}/features/analytics/target_variables.yml similarity index 100% rename from template/features/analytics/target_variables.yml rename to template/{{.project_name}}/features/analytics/target_variables.yml diff --git a/template/package.json b/template/{{.project_name}}/package.json similarity index 100% rename from template/package.json rename to template/{{.project_name}}/package.json diff --git a/template/playwright.config.ts b/template/{{.project_name}}/playwright.config.ts similarity index 100% rename from template/playwright.config.ts rename to template/{{.project_name}}/playwright.config.ts diff --git a/template/server/server.ts b/template/{{.project_name}}/server/server.ts similarity index 100% rename from template/server/server.ts rename to template/{{.project_name}}/server/server.ts diff --git a/template/tests/smoke.spec.ts b/template/{{.project_name}}/tests/smoke.spec.ts similarity index 100% rename from template/tests/smoke.spec.ts rename to template/{{.project_name}}/tests/smoke.spec.ts diff --git a/template/tsconfig.client.json b/template/{{.project_name}}/tsconfig.client.json similarity index 100% rename from template/tsconfig.client.json rename to template/{{.project_name}}/tsconfig.client.json diff --git a/template/tsconfig.json b/template/{{.project_name}}/tsconfig.json similarity index 100% rename from template/tsconfig.json rename to template/{{.project_name}}/tsconfig.json diff --git a/template/tsconfig.server.json b/template/{{.project_name}}/tsconfig.server.json similarity index 100% rename from template/tsconfig.server.json rename to template/{{.project_name}}/tsconfig.server.json diff --git a/template/tsconfig.shared.json b/template/{{.project_name}}/tsconfig.shared.json similarity index 100% rename from template/tsconfig.shared.json rename to template/{{.project_name}}/tsconfig.shared.json diff --git a/template/vitest.config.ts b/template/{{.project_name}}/vitest.config.ts similarity index 100% rename from template/vitest.config.ts rename to template/{{.project_name}}/vitest.config.ts From 53e348edfe9b9fef3e2065df056262d2b53ba871 Mon Sep 17 00:00:00 2001 From: Evgenii Kniazev Date: Wed, 21 Jan 2026 11:39:57 +0000 Subject: [PATCH 2/4] Add feature-based variables with defaults to schema Add all feature composition variables (dotenv, dotenv_example, app_env, bundle_variables, bundle_resources, target_variables) with empty defaults so the template can be used standalone without features enabled. Co-Authored-By: Claude Opus 4.5 --- databricks_template_schema.json | 36 +++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/databricks_template_schema.json b/databricks_template_schema.json index 2d27357..0e1d70b 100644 --- a/databricks_template_schema.json +++ b/databricks_template_schema.json @@ -23,6 +23,42 @@ "description": "App Description (Optional)", "default": "A Databricks App powered by Databricks AppKit", "order": 4 + }, + "dotenv": { + "type": "string", + "description": "Additional .env content", + "default": "", + "hidden": true + }, + "dotenv_example": { + "type": "string", + "description": "Additional .env.example content", + "default": "", + "hidden": true + }, + "app_env": { + "type": "string", + "description": "App environment variables for app.yaml", + "default": "", + "hidden": true + }, + "bundle_variables": { + "type": "string", + "description": "Additional bundle variables", + "default": "", + "hidden": true + }, + "bundle_resources": { + "type": "string", + "description": "Additional bundle resources", + "default": "", + "hidden": true + }, + "target_variables": { + "type": "string", + "description": "Target-specific variables", + "default": "", + "hidden": true } }, "success_message": "\nYour new project has been created in the '{{.project_name}}' directory!" From e1c46455329fd3e696b489fc72c85d70ce0aecf6 Mon Sep 17 00:00:00 2001 From: Evgenii Kniazev Date: Wed, 21 Jan 2026 11:41:36 +0000 Subject: [PATCH 3/4] Add plugin variables and enable template processing for server.ts - Add plugin_import and plugin_usage variables with analytics defaults - Rename server.ts to server.ts.tmpl so template variables get processed Co-Authored-By: Claude Opus 4.5 --- databricks_template_schema.json | 12 ++++++++++++ .../server/{server.ts => server.ts.tmpl} | 0 2 files changed, 12 insertions(+) rename template/{{.project_name}}/server/{server.ts => server.ts.tmpl} (100%) diff --git a/databricks_template_schema.json b/databricks_template_schema.json index 0e1d70b..c127c86 100644 --- a/databricks_template_schema.json +++ b/databricks_template_schema.json @@ -59,6 +59,18 @@ "description": "Target-specific variables", "default": "", "hidden": true + }, + "plugin_import": { + "type": "string", + "description": "Plugin imports for server.ts", + "default": "analytics", + "hidden": true + }, + "plugin_usage": { + "type": "string", + "description": "Plugin usage in createApp", + "default": "analytics()", + "hidden": true } }, "success_message": "\nYour new project has been created in the '{{.project_name}}' directory!" diff --git a/template/{{.project_name}}/server/server.ts b/template/{{.project_name}}/server/server.ts.tmpl similarity index 100% rename from template/{{.project_name}}/server/server.ts rename to template/{{.project_name}}/server/server.ts.tmpl From cc358d042e4a57faf99f09865bbf47177f975ae5 Mon Sep 17 00:00:00 2001 From: Evgenii Kniazev Date: Wed, 21 Jan 2026 11:46:16 +0000 Subject: [PATCH 4/4] Enable template processing for package.json Rename package.json to package.json.tmpl so that {{.project_name}} and {{.app_description}} variables get processed. Co-Authored-By: Claude Opus 4.5 --- template/{{.project_name}}/{package.json => package.json.tmpl} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename template/{{.project_name}}/{package.json => package.json.tmpl} (100%) diff --git a/template/{{.project_name}}/package.json b/template/{{.project_name}}/package.json.tmpl similarity index 100% rename from template/{{.project_name}}/package.json rename to template/{{.project_name}}/package.json.tmpl