Skip to content

databricks-solutions/apx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

logo

๐Ÿš€ apx is the toolkit for building Databricks Apps โšก

Databricks FastAPI Pydantic uv React TypeScript Bun shadcn/ui


โœจ apx bundles together a set of tools and libraries to help you with app development lifecycle: develop, build and deploy.

๐Ÿ’ก The main idea of apx is to provide convenient, fast and AI-friendly development experience.

๐Ÿš€ Quickstart

  1. Run the command to initialize the project:
uvx git+https://github.com/databricks-solutions/apx.git init
  1. Open the project in Cursor (or any IDE of your choice, for that matter), allow usage of apx and shadcn mcp
  2. Start providing prompts to build an app, e.g.:
Use apx mcp server to start development server, then create a nice application for order management. Use shadcn mcp to add new components, make sure style is consistent and data is properly fetched from the backend. Start with mocking the backend data (yet use pydantic models), then implement the actual backend.
  1. Deploy whenever ready via Databricks CLI:
databricks bundle deploy -p <your-profile>

๐Ÿ› ๏ธ Stack

apx is built on top of the following stack:

  • ๐Ÿ Python + FastAPI in the backend
  • โš›๏ธ React + shadcn/ui in the frontend

๐Ÿ”Œ To connect the frontend and the backend, apx uses orval to generate the client code from the OpenAPI schema.

๐Ÿš€ Init

To kickstart your app, please make sure you have:

  • โœ… uv installed
  • โœ… bun installed
  • โœ… git installed

Then you can use the following command:

uvx git+https://github.com/databricks-solutions/apx.git init

This will launch an interactive prompt that will guide you through:

  • ๐Ÿ“ Naming your app (or using a randomly generated name)
  • ๐Ÿ”ง Selecting a Databricks profile (if you have any configured)
  • ๐Ÿค– Setting up AI assistant rules (cursor/vscode/codex/claude)

The app will be created in the current working directory by default.

โš™๏ธ Non-Interactive Mode

You can also specify all options via command-line flags to skip the prompts:

uvx https://github.com/databricks-solutions/apx.git init \
  --name my-app \
  --template essential \
  --profile my-profile \
  --assistant cursor \
  my-app

This will create a new app in the my-app directory with the app name my-app.

๐Ÿ“ Project Structure

The project structure is as follows:

my-app
โ”œโ”€โ”€ package.json
โ”œโ”€โ”€ pyproject.toml
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ src
โ”‚   โ””โ”€โ”€ sample
โ”‚       โ”œโ”€โ”€ __dist__
โ”‚       โ”œโ”€โ”€ backend
โ”‚       โ”‚   โ”œโ”€โ”€ app.py
โ”‚       โ”‚   โ”œโ”€โ”€ config.py
โ”‚       โ”‚   โ”œโ”€โ”€ dependencies.py
โ”‚       โ”‚   โ”œโ”€โ”€ models.py
โ”‚       โ”‚   โ”œโ”€โ”€ router.py
โ”‚       โ”‚   โ”œโ”€โ”€ runtime.py
โ”‚       โ”‚   โ””โ”€โ”€ utils.py
โ”‚       โ””โ”€โ”€ ui
โ”‚           โ”œโ”€โ”€ components
โ”‚           โ”œโ”€โ”€ lib
โ”‚           โ”œโ”€โ”€ routes
โ”‚           โ”œโ”€โ”€ main.tsx

๐Ÿ“ฆ The __dist__ directory is the directory where the frontend bundle is stored, so it can be served by the backend.

๐ŸŽฎ Commands

๐Ÿš€ init

uvx git+https://github.com/databricks-solutions/apx.git init

Initializes a new app project with interactive prompts for configuration. Supports optional flags to skip prompts:

  • --name, -n: Specify the app name
  • --template, -t: Choose a template (essential/stateful)
    • ๐ŸŽฏ Essential template is a basic template with UI and API.
    • ๐Ÿ’พ Stateful template also includes Lakebase integration via sqlmodel.
  • --profile, -p: Specify a Databricks profile
  • --assistant, -a: Choose AI assistant rules (cursor/vscode/codex/claude)
  • --layout, -l: Choose the layout (basic/sidebar)

๐Ÿ”ฅ dev - Development Server Management

The dev command group manages development servers in detached mode:

Start Development Servers

uv run apx dev start

Starts backend, frontend, and OpenAPI watcher in detached mode.

Options:

  • --frontend-port: Frontend port (default: 5173)
  • --backend-port: Backend port (default: 8000)
  • --host: Host for dev, frontend, and backend servers (default: localhost)
  • --obo/--no-obo: Enable/disable On-Behalf-Of header (default: enabled)
  • --openapi/--no-openapi: Enable/disable OpenAPI watcher (default: enabled)
  • --max-retries: Maximum number of retry attempts for processes (default: 10)
  • --watch: Start servers and tail logs until Ctrl+C, then stop all servers

Check Server Status

uv run apx dev status

Shows status of all running development servers (backend, frontend, OpenAPI watcher).

View Logs

uv run apx dev logs

Displays historical logs from development servers.

Options:

  • --duration, -d: Show logs from last N seconds
  • --ui: Show only frontend logs
  • --backend: Show only backend logs
  • --openapi: Show only OpenAPI logs

Tail Logs

uv run apx dev logs -f

Continuously streams logs from development servers.

Options:

  • --duration, -d: Initially show logs from last N seconds
  • --timeout, -t: Stop tailing after N seconds
  • --ui: Show only frontend logs
  • --backend: Show only backend logs
  • --app: Show only app logs
  • --raw: Show raw log output without prefix formatting

Stop Development Servers

uv run apx dev stop

Stops all running development servers.

๐Ÿ“ฆ build

uv run apx build

Prepares the app for deployment by building both frontend assets and Python wheel.

๐Ÿ”ง openapi

uv run apx openapi

Manually generates OpenAPI schema and orval client. Use --watch to enable automatic regeneration on changes.

Note: you don't need to run this command manually, watcher will run automatically when you start the development server.

๐Ÿ“œ Project todos

  • Add chat template
  • Add chat template
  • MCP of apx commands
  • Add a way to add a custom template

License and Third Party Libraries

License

ยฉ 2025 Databricks, Inc. All rights reserved. The source in this project is provided subject to the Databricks License.

Third Party Libraries

library description license source
FastAPI High-performance API framework based on Starlette MIT GitHub
Pydantic Data validation and settings management using Python type hints MIT GitHub
SQLModel SQLAlchemy-like ORM for Python MIT GitHub
Databricks SDK for Python Official Databricks SDK for Python Apache-2.0 GitHub
orval OpenAPI client generator MIT GitHub
shadcn/ui UI library for React MIT GitHub
React Library for building user interfaces MIT GitHub
TypeScript Programming language for web development Apache-2.0 GitHub
Bun JavaScript runtime MIT GitHub
uv Fast, modern Python package manager MIT GitHub
jinja2 Template engine for Python MIT GitHub
rich CLI interface library for Python MIT GitHub
typer Typer is a library for building CLI applications MIT GitHub
uvicorn ASGI server for Python BSD-3-Clause GitHub
httpx HTTP client for Python BSD-3-Clause GitHub
watchfiles File change monitoring for Python MIT GitHub
hatchling Build backend for Python MIT GitHub
uv-dynamic-versioning Dynamic versioning for Python packages MIT GitHub
vite Frontend build tool for JavaScript MIT GitHub
tailwindcss Utility-first CSS framework for rapid UI development MIT GitHub
smol-toml Tom's Obvious, Minimal Language for JS MIT GitHub
psutil Cross-platform library for retrieving information on running processes and system utilization (CPU, memory, disks, network) in Python. BSD-3-Clause GitHub

About

apx - the toolkit for building Databricks Apps

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published