A full-stack real-time table editor built with FastAPI, React, Databricks Apps and Lakebase.
The application consists of two main parts:
- Frontend: React + Vite application with TanStack Router
- Backend: FastAPI application serving both the frontend and API endpoints
- Modern React frontend with TanStack Router for routing
- FastAPI backend with automatic OpenAPI client generation
- Databricks SDK integration
- Component-based architecture with loading states
- Dark mode support
- Type-safe API communication
- React + Vite
- TanStack Router for routing
- TypeScript for type safety
- Tailwind CSS for styling
- Shadcn/ui components
- Orval for API client generation
- FastAPI for API development
- Uvicorn for ASGI server
- sqlmodel for database operations
- Databricks SDK for Databricks integration
- Python 3.11+
- Node.js 20+
- Yarn package manager
- UV package manager for Python
- Install Python dependencies:
uv sync --all-packages- Install frontend dependencies:
yarn --cwd src/trifold/ui install# Start development server
yarn --cwd src/trifold/ui dev
# Generate API client
yarn --cwd src/trifold/ui orval# Start development server
uvicorn trifold.app.app:app --reloadTo populate the database with some data, run:
python ops/populate_db.pyFor load testing, run:
DATABRICKS_CONFIG_PROFILE=<your-profile> locust -f ops/locust_test.py --host=<your-app-url>- Create a new Lakebase instance:
databricks database create-database-instance --capacity CU_1 trifold -p <your-profile>
- Deploy the app to Databricks:
databricks bundle deploy -p <your-profile>
- Grant the app service principal access to the Lakebase instance in the Databricks UI.
- Start the app:
databricks bundle run trifold -p <your-profile>
src/trifold/
├── app/ # Backend application
│ ├── api.py # API routes
│ ├── app.py # Main application
│ ├── models.py # Database models
│ └── utils.py # Utilities
└── ui/ # Frontend application
├── src/
│ ├── components/ # React components
│ ├── routes/ # Application routes
│ ├── lib/ # Utilities and API client
│ └── main.tsx # Application entry
└── package.json # Frontend dependencies
Each entity follows a three-model pattern:
EntityName- Database entity structureEntityNameIn- Creation/form input structureEntityNameView- API response structure
Components follow a consistent pattern:
- Static elements render immediately
- API data is fetched using
useXSuspensehooks - Loading states use
Skeletoncomponents - Data renders once fetched
- All API routes have defined response models
- Frontend uses auto-generated type-safe clients
- Background tasks handle asynchronous operations
- Use
useXSuspensehooks for data fetching - Implement loading states with Suspense and Skeleton components
- Create reusable components
- Follow consistent naming conventions
- Ensure proper error handling
- Use type-safe data access patterns
Project icon is from taken from svgrepo.com and slightly modified, original icon is CC0 licensed.