GUI for the Brisk ML framework.
Project description
brisk-ui
Web-based GUI for the brisk ML framework, distributed as a separate Python package with a FastAPI backend and React frontend.
Architecture
User runs: brisk ui
│
▼
┌─────────────────────────────────────┐
│ brisk CLI (main package) │
│ - Validates project directory │
│ - Checks brisk-ui is installed │
│ - Starts uvicorn server │
│ - Opens browser │
└─────────────────────────────────────┘
│
▼
┌─────────────────────────────────────┐
│ brisk-ui (this package) │
│ ┌─────────────────────────────────┐│
│ │ FastAPI Backend ││
│ │ - /api/* routes ││
│ │ - Reads SQLite via brisk ││
│ │ - Reads/writes Python configs ││
│ └─────────────────────────────────┘│
│ ┌─────────────────────────────────┐│
│ │ Static Files (React build) ││
│ │ - Served at / ││
│ └─────────────────────────────────┘│
└─────────────────────────────────────┘
Development
Prerequisites
- Python 3.11+
- Node.js 18+
- Poetry
Setup
# Install Python dependencies
poetry install
# Install frontend dependencies
cd frontend && npm install && cd ..
Development Mode (Hot Reload)
Development mode runs the backend and frontend separately, allowing for hot reloading of both.
Terminal 1: Backend
poetry run brisk-ui-dev
This starts the FastAPI backend on port 8050 with:
- API routes at http://localhost:8050/api
- OpenAPI docs at http://localhost:8050/docs
- CORS enabled for the frontend dev server
Terminal 2: Frontend
cd frontend && npm run dev
This starts the Vite dev server on port 3000 with hot module replacement.
Open http://localhost:3000 to view the app.
Test Mode (Static Files)
Test mode serves the pre-built frontend from brisk_ui/static/, simulating production deployment.
Step 1: Build the frontend
poetry run build-frontend
This compiles the React app and copies it to brisk_ui/static/.
Step 2: Run in test mode
poetry run brisk-ui-dev --mode test
Open http://localhost:8050 to view the app.
Command Options
# Run with a specific project directory
poetry run brisk-ui-dev /path/to/brisk/project
# Run on a different port
poetry run brisk-ui-dev --port 9000
# Run in test mode with custom project
poetry run brisk-ui-dev /path/to/project --mode test --port 8080
Create Mode (New Project)
Create mode allows you to test the project creation workflow without an existing project.
Terminal 1: Backend with --create flag
# Specify the parent directory where projects will be created
poetry run brisk-ui-dev ./projects --create
This will:
- Create the parent directory if it doesn't exist
- Skip the database validation
- Set the app to "create mode"
Terminal 2: Frontend
cd frontend && npm run dev
The app will automatically redirect to /project where you can:
- Fill out the project information form (the project name becomes the directory name)
- Navigate through all 8 wizard steps
- Click "Create Project" on the final step to save files
Example: If you enter "My Cool Project" as the project name, it will create:
./projects/my-cool-project/
└── .brisk/
└── .env
After creating, you can restart without --create to test editing:
poetry run brisk-ui-dev ./projects/my-cool-project
Project Structure
brisk-ui/
├── pyproject.toml
├── brisk_ui/
│ ├── __init__.py
│ ├── server.py # FastAPI app factory
│ ├── config.py # Dev/prod configuration
│ ├── api/
│ │ ├── __init__.py
│ │ ├── dependencies.py # DI for settings/services
│ │ └── routes/
│ │ ├── __init__.py
│ │ ├── health.py
│ │ ├── test.py # Test integration endpoints
│ │ └── configs.py
│ ├── services/
│ │ └── database.py
│ └── static/ # React build output (generated)
├── frontend/ # React source (not distributed)
│ ├── package.json
│ ├── vite.config.ts
│ └── src/
│ ├── api/ # API client
│ │ ├── client.ts
│ │ └── test.ts
│ └── features/
├── dev/
│ ├── run_dev.py # Dev entrypoint
│ ├── build_frontend.py # Frontend build script
│ └── backend-dev/ # Test project directory
└── tests/
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file briskui-1.0.0.tar.gz.
File metadata
- Download URL: briskui-1.0.0.tar.gz
- Upload date:
- Size: 787.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.3.2 CPython/3.13.11 Linux/6.18.8-arch2-1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
928f6482e4d22b94325df48b75edfb7435eb9c26da4c08930e78d1c5ef086d02
|
|
| MD5 |
c2856fae19ae19d8d441df7ec214c1ed
|
|
| BLAKE2b-256 |
8a3a7d885ffe1ff424205bf0806b129d1169a0ab30342eccd9d0dc0354ddd0c1
|
File details
Details for the file briskui-1.0.0-py3-none-any.whl.
File metadata
- Download URL: briskui-1.0.0-py3-none-any.whl
- Upload date:
- Size: 808.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.3.2 CPython/3.13.11 Linux/6.18.8-arch2-1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1cfe8f6999aa52cae2a14d284d6d1ef0e024887d1c6dece48a4faa86af9f065c
|
|
| MD5 |
f25ba6a8a6d2608a37ff40db293e0f39
|
|
| BLAKE2b-256 |
fe8afcdfcb95388c485c72292a734cf2d43d394582e951004b0b2b8c05d1b19b
|