A full-stack support ticket dashboard built on Databricks, using FastAPI + React + Lakebase + Genie Conversation API. Scaffolded with ai-dev-kit.
- Backend: FastAPI with psycopg connection pool
- Frontend: React + Vite + TailwindCSS + TypeScript
- Database: Databricks Lakebase (managed PostgreSQL)
- Analytics: Genie Conversation API (natural language SQL)
- Hosting: Databricks Apps
- Auth: Databricks SDK
Config()with auto-injected service principal
ticket-dashboard/
├── app.yaml # Databricks Apps deployment config
├── app.py # FastAPI entrypoint (serves React SPA)
├── requirements.txt # Python dependencies
├── server/
│ ├── config.py # Dual-mode auth (local vs. deployed)
│ ├── db.py # Lakebase connection pool with OAuth
│ ├── models.py # Pydantic models
│ └── routes/
│ ├── tickets.py # CRUD endpoints
│ └── genie.py # Genie Conversation API proxy
└── frontend/
├── package.json
├── vite.config.ts # Proxies /api to FastAPI for local dev
├── src/
│ ├── App.tsx
│ ├── api.ts
│ ├── types.ts
│ └── components/
│ ├── TicketTable.tsx
│ ├── CreateTicketForm.tsx
│ ├── GenieChat.tsx
│ ├── StatusBadge.tsx
│ └── PriorityBadge.tsx
└── dist/ # Built output (included in deployment)
- Databricks workspace with Lakebase and Apps enabled
- Databricks CLI v0.285.0+ authenticated:
databricks auth login --host <url> --profile <name> - Node.js 18+ and uv (Python package manager)
- ai-dev-kit installed:
bash <(curl -sL https://raw.githubusercontent.com/databricks-solutions/ai-dev-kit/main/install.sh)
# Terminal 1: Start FastAPI backend
export DATABRICKS_PROFILE=my-profile
uv run uvicorn app:app --reload --port 8000
# Terminal 2: Start React dev server (hot reload)
cd frontend
npm install
npm run dev # Runs on :5173, proxies /api to :8000# Build the React frontend
cd frontend && npm run build && cd ..
# Create the app
databricks apps create ticket-dashboard -p my-profile
# Upload source code (node_modules excluded)
databricks workspace mkdirs /Workspace/Users/<email>/apps/ticket-dashboard
databricks workspace import-dir . /Workspace/Users/<email>/apps/ticket-dashboard -p my-profile
# Deploy
databricks apps deploy ticket-dashboard \
--source-code-path /Workspace/Users/<email>/apps/ticket-dashboard -p my-profileAfter the first deploy, add resources in the Databricks UI:
- Go to Compute > Apps > ticket-dashboard
- Add Lakebase database resource
- Add SQL warehouse resource
- Add Genie space resource
- Redeploy to pick up the new environment variables
| Method | Path | Description |
|---|---|---|
| GET | /api/tickets | List all tickets |
| POST | /api/tickets | Create a ticket |
| PUT | /api/tickets/{id} | Update a ticket |
| DELETE | /api/tickets/{id} | Delete a ticket |
| POST | /api/ask | Ask Genie a natural language question |
databricks-app-python- FastAPI scaffold, OAuth, app.yaml, deploymentdatabricks-lakebase-autoscale- Lakebase connection pool, OAuthConnection patterndatabricks-genie- Genie space creation, Conversation API integration