Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 69 additions & 0 deletions .github/workflows/release-lakebase.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Release @databricks/lakebase

on:
push:
branches:
- main
paths:
- 'packages/lakebase/**'
workflow_dispatch:
inputs:
dry-run:
description: "Dry run (no actual release)"
required: false
type: boolean
default: false

jobs:
release:
runs-on:
group: databricks-protected-runner-group
labels: linux-ubuntu-latest

environment: release

env:
DRY_RUN: ${{ inputs.dry-run == true }}

permissions:
contents: write
id-token: write

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}

- name: Setup Git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"

- name: Setup pnpm
uses: pnpm/action-setup@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 24
registry-url: "https://registry.npmjs.org"
cache: "pnpm"

- name: Update npm
run: npm install -g npm@latest

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Release
working-directory: packages/lakebase
run: |
if [ "$DRY_RUN" == "true" ]; then
pnpm release:dry
else
pnpm release:ci
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
55 changes: 55 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ jobs:

environment: release

outputs:
version: ${{ steps.version.outputs.version }}

permissions:
contents: write
id-token: write
Expand Down Expand Up @@ -61,6 +64,18 @@ jobs:
echo "dry_run=${{ inputs.dry-run }}" >> $GITHUB_OUTPUT
fi

- name: Determine version
id: version
if: steps.mode.outputs.dry_run != 'true'
run: |
VERSION=$(pnpm exec release-it --release-version --ci 2>/dev/null) || true
if [[ "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Next version: $VERSION"
else
echo "No releasable version detected"
fi

- name: Release
run: |
if [ "${{ steps.mode.outputs.dry_run }}" == "true" ]; then
Expand All @@ -70,3 +85,43 @@ jobs:
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

sync-template:
runs-on:
group: databricks-protected-runner-group
labels: linux-ubuntu-latest

needs: release
# in case a dry run is performed, the version is not set so we need to check for it.
if: needs.release.outputs.version != ''

permissions:
contents: write

steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: main
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}

- name: Setup Git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"

- name: Setup pnpm
uses: pnpm/action-setup@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 24
cache: "pnpm"

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Sync template and push tag
run: pnpm exec tsx tools/publish-template-tag.ts ${{ needs.release.outputs.version }}
14 changes: 12 additions & 2 deletions .release-it.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,19 @@
"git": {
"commitMessage": "chore: release v${version} [skip ci]",
"tagName": "v${version}",
"tagMatch": "v*",
"tagAnnotation": "Release v${version}",
"requireBranch": "main",
"requireCleanWorkingDir": true,
"requireCommits": true,
"requireCommitsFail": false,
"commitsPath": "packages/appkit packages/appkit-ui packages/shared",
"push": true,
"pushArgs": ["--follow-tags"]
},
"github": {
"release": true,
"releaseName": "v${version}",
"releaseName": "AppKit v${version}",
"autoGenerate": false,
"draft": false,
"preRelease": false,
Expand All @@ -35,7 +39,13 @@
"commitsSort": ["type", "subject"]
},
"infile": "CHANGELOG.md",
"header": "# Changelog\n\nAll notable changes to this project will be documented in this file."
"header": "# Changelog\n\nAll notable changes to this project will be documented in this file.",
"gitRawCommitsOpts": {
"path": ["packages/appkit", "packages/appkit-ui", "packages/shared"]
},
"commitsOpts": {
"path": ["packages/appkit", "packages/appkit-ui", "packages/shared"]
}
}
}
}
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,26 @@

All notable changes to this project will be documented in this file.

## [0.7.4](https://github.com/databricks/appkit/compare/v0.7.3...v0.7.4) (2026-02-18)

* typegen command ([#119](https://github.com/databricks/appkit/issues/119)) ([8c3735c](https://github.com/databricks/appkit/commit/8c3735c6b27c5e5cbacb81363ccaf4f6acbfd185))

## [0.7.3](https://github.com/databricks/appkit/compare/v0.7.2...v0.7.3) (2026-02-18)

* release `@databricks/lakebase` correctly, fix `appkit` dependency ([#111](https://github.com/databricks/appkit/issues/111)) ([5b6856a](https://github.com/databricks/appkit/commit/5b6856a6b42680a671cfc3e99eab3bef72803fd1))

## [0.7.2](https://github.com/databricks/appkit/compare/v0.7.1...v0.7.2) (2026-02-18)

* template sync ([#109](https://github.com/databricks/appkit/issues/109)) ([f250016](https://github.com/databricks/appkit/commit/f250016b28e24e3ce56d09a0a3d95088a689a943))

## [0.7.1](https://github.com/databricks/appkit/compare/v0.7.0...v0.7.1) (2026-02-18)

* sync template versions on release ([#105](https://github.com/databricks/appkit/issues/105)) ([4cbe826](https://github.com/databricks/appkit/commit/4cbe8266e80e4b4cfe4b4e0594c2633dcba7123a))

## [0.7.0](https://github.com/databricks/appkit/compare/v0.6.0...v0.7.0) (2026-02-17)

* introduce Lakebase Autoscaling driver ([#98](https://github.com/databricks/appkit/issues/98)) ([27b1848](https://github.com/databricks/appkit/commit/27b184886b2ab15c73f3d46f5ff9e9c6d8806c71))

## [0.6.0](https://github.com/databricks/appkit/compare/v0.5.4...v0.6.0) (2026-02-16)

### appkit
Expand Down
33 changes: 33 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,39 @@ The AnalyticsPlugin provides SQL query execution:
- Built-in caching with configurable TTL
- Databricks SQL Warehouse connector for execution

### Lakebase Autoscaling Connector

**Location:** `packages/appkit/src/connectors/lakebase/`

AppKit provides `createLakebasePool()` - a factory function that returns a standard `pg.Pool` configured with automatic OAuth token refresh for Databricks Lakebase (OLTP) databases.

**Key Features:**
- Returns standard `pg.Pool` (compatible with all ORMs)
- Automatic OAuth token refresh (1-hour tokens, 2-minute buffer)
- Token caching to minimize API calls
- Battle-tested pattern (same as AWS RDS IAM authentication)

**Quick Example:**
```typescript
import { createLakebasePool } from '@databricks/appkit';

// Reads from PGHOST, PGDATABASE, LAKEBASE_ENDPOINT env vars
const pool = createLakebasePool();

// Standard pg.Pool API
const result = await pool.query('SELECT * FROM users');
```

**ORM Integration:**
Works with Drizzle, Prisma, TypeORM - see [Lakebase Integration Docs](docs/docs/integrations/lakebase.md) for examples.

**Architecture:**
- Connector files: `packages/appkit/src/connectors/lakebase/`
- `pool.ts` - Pool factory with OAuth token refresh
- `types.ts` - TypeScript interfaces (`LakebasePoolConfig`)
- `utils.ts` - Helper functions (`generateDatabaseCredential`)
- `auth-types.ts` - Lakebase v2 API types

### Frontend-Backend Interaction

```
Expand Down
2 changes: 1 addition & 1 deletion NOTICE.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ This Software contains code from the following open source projects:
| [lucide-react](https://www.npmjs.com/package/lucide-react) | 0.554.0 | ISC | https://lucide.dev |
| [next-themes](https://www.npmjs.com/package/next-themes) | 0.4.6 | MIT | https://github.com/pacocoursey/next-themes#readme |
| [obug](https://www.npmjs.com/package/obug) | 2.1.1 | MIT | https://github.com/sxzz/obug#readme |
| [pg](https://www.npmjs.com/package/pg) | 8.16.3 | MIT | https://github.com/brianc/node-postgres |
| [pg](https://www.npmjs.com/package/pg) | 8.18.0 | MIT | https://github.com/brianc/node-postgres |
| [react-day-picker](https://www.npmjs.com/package/react-day-picker) | 9.12.0 | MIT | https://daypicker.dev |
| [react-hook-form](https://www.npmjs.com/package/react-hook-form) | 7.68.0 | MIT | https://react-hook-form.com |
| [react-resizable-panels](https://www.npmjs.com/package/react-resizable-panels) | 3.0.6 | MIT | https://github.com/bvaughn/react-resizable-panels#readme |
Expand Down
22 changes: 20 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

Build Databricks Apps faster with our brand-new Node.js + React SDK. Built for humans and AI.

> [!WARNING] PREVIEW - NOT FOR PRODUCTION USE
>
> [!WARNING]
> PREVIEW - NOT FOR PRODUCTION USE

> **This SDK is in preview and is subject to change without notice.**
>
> - ❌ **Do NOT use in production environments**
Expand All @@ -24,6 +25,23 @@ AppKit simplifies building data applications on Databricks by providing:
- **Developer experience**: Remote hot reload, file-based queries, optimized for AI-assisted development
- **Databricks native**: Seamless integration with SQL Warehouses, Unity Catalog, and other workspace resources

## Plugins

AppKit's power comes from its plugin system. Each plugin adds a focused capability to your app with minimal configuration.

### Available now

- **Analytics Plugin** — Query your Lakehouse data directly from your app. Define SQL queries as files, execute them against Databricks SQL Warehouses, and get automatic caching, parameterization, and on-behalf-of user execution out of the box. Perfect for building apps that surface insights from your Lakehouse.

### Coming soon

- **Genie Plugin** — Conversational AI interface powered by Databricks Genie
- **Files Plugin** — Browse, upload, and manage files in Unity Catalog Volumes
- **Lakebase Plugin** — OLTP database operations with automatic OAuth token management
- ...and this is just the beginning.

> Missing a plugin? [Open an issue](https://github.com/databricks/appkit/issues/new) and tell us what you need — community input directly shapes the roadmap.

## Getting started

Follow the [Getting Started](https://databricks.github.io/appkit/docs/) guide to get started with AppKit.
Expand Down
5 changes: 5 additions & 0 deletions apps/dev-playground/.env.dist
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,8 @@ NODE_ENV='development'
OTEL_EXPORTER_OTLP_ENDPOINT='http://localhost:4318'
OTEL_RESOURCE_ATTRIBUTES='service.sample_attribute=dev'
OTEL_SERVICE_NAME='dev-playground'
LAKEBASE_ENDPOINT='' # Run: databricks postgres list-endpoints projects/{project-id}/branches/{branch-id} — use the `name` field from the output
PGHOST=
PGUSER=
PGDATABASE=databricks_postgres
PGSSLMODE=require
Loading