Databricks app apx

From frank-luongt/faos-skills-marketplace · View interactive version

Databricks app apx is an AI agent skill from the GitHub repository frank-luongt/faos-skills-marketplace. Build full-stack Databricks applications using APX framework (FastAPI + React).

How to use this skill

Skill file

<!-- AUTO-GENERATED by export-skills.py — DO NOT EDIT -->


name: databricks-app-apx

description: Build full-stack Databricks applications using APX framework (FastAPI + React).


Databricks APX Application

Build full-stack Databricks applications using APX framework (FastAPI + React).

Trigger Conditions

Invoke when user requests:

Do NOT invoke if user specifies: Streamlit, Dash, Node.js, Shiny, Gradio, Flask, or other

frameworks.

Prerequisites Check

Option A) Repository configured for use with APX. 1.. Verify APX MCP available:

mcp-cli tools | grep apx 2. Verify shadcn MCP available: mcp-cli tools | grep shadcn 3. Confirm

APX project (check pyproject.toml)

Option B) Install APX

  1. Verify uv available or prompt for install. On Mac, suggest: brew install uv.
  2. Verify bun available or prompt for install. On Mac, suggest:
brew tap oven-sh/bun
brew install bun
  1. Verify git available or prompt for install.
  2. Run APX setup commands:
uvx --from git+https://github.com/databricks-solutions/apx.git apx init

Workflow Overview

Total time: 55-70 minutes

  1. Initialize (5 min) - Start servers, create todos
  2. Backend (15-20 min) - Models + routes with mock data
  3. Frontend (20-25 min) - Components + pages
  4. Test (5-10 min) - Type check + manual verification
  5. Document (10 min) - README + code structure guide

Phase 1: Initialize

# Start APX development server
mcp-cli call apx/start '{}'
mcp-cli call apx/status '{}'

Create TodoWrite with tasks:

Phase 2: Backend Development

Create Pydantic Models

In src/{app_name}/backend/models.py:

Follow 3-model pattern:

See backend-patterns.md for complete code templates.

Create API Routes

In src/{app_name}/backend/router.py:

Critical requirements:

See backend-patterns.md for complete CRUD templates.

Type Check

mcp-cli call apx/dev_check '{}'

Fix any Python type errors reported by basedpyright.

Phase 3: Frontend Development

Wait 5-10 seconds after backend changes for OpenAPI client regeneration.

Add UI Components

# Get shadcn add command
mcp-cli call shadcn/get_add_command_for_items '{
  "items": ["@shadcn/button", "@shadcn/card", "@shadcn/table",
            "@shadcn/badge", "@shadcn/select", "@shadcn/skeleton"]
}'

Run the command from project root with --yes flag.

Create Pages

List page: src/{app_name}/ui/routes/_sidebar/{entity}.tsx

Detail page: src/{app_name}/ui/routes/_sidebar/{entity}.$id.tsx

See frontend-patterns.md for complete page templates.

Update Navigation

In src/{app_name}/ui/routes/_sidebar/route.tsx, add new item to navItems array.

Phase 4: Testing

# Type check both backend and frontend
mcp-cli call apx/dev_check '{}'

# Test API endpoints
curl http://localhost:8000/api/{entities} | jq .
curl http://localhost:8000/api/{entities}/{id} | jq .

# Get frontend URL
mcp-cli call apx/get_frontend_url '{}'

Manually verify in browser:

Phase 5: Deployment & Monitoring

Deploy to Databricks

Use DABs to deploy your APX application to Databricks. See the asset-bundles skill for complete

deployment guidance.

Monitor Application Logs

Automated log checking with APX MCP:

The APX MCP server can automatically check deployed application logs. Simply ask: "Please check the

deployed app logs for <app-name>"

The APX MCP will retrieve logs and identify issues automatically, including:

Manual log checking (reference):

For direct CLI access:

databricks apps logs <app-name> --profile <profile-name>

Key patterns to look for:

Phase 6: Documentation

Create two markdown files:

README.md:

CODE_STRUCTURE.md:

Key Patterns

Backend

Frontend

Success Criteria

Common Issues

Deployed app not working: Ask to check deployed app logs (APX MCP will automatically retrieve

and analyze them) or manually use databricks apps logs <app-name> Python type errors: Use

explicit casting for dict access, check Optional fields TypeScript errors: Wait for OpenAPI

regen, verify hook names match operation_ids OpenAPI not updating: Check watcher status with

apx dev status, restart if needed Components not added: Run shadcn from project root with

--yes flag

Reference Materials

Read these files only when actively writing that type of code or debugging issues.

<!-- Source: .faos/custom/skills/cloud/databricks/databricks-app-apx/SKILL.md -->

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.