Standalone Andent web application for browser-based dental workflow automation.
Andent Web provides a modern web interface for dental case intake, STL classification, and PreFormServer handoff. It accepts STL uploads, automatically classifies model types (Ortho, Die, Tooth, Splint), plans compatibility-aware Form 4B/Form 4BL builds, preserves per-file preset hints, and can hold below-target final builds until more compatible sent cases arrive or the office cutoff releases them.
Current Repository Scope:
- Browser-based STL upload
- Per-file classification table
- Durable Model Type, Preset, and Printer edits
- Queue management and batch operations
- Compatibility-aware Form 4B/Form 4BL build planning
- Density-based build holding with operator release
- PreFormServer handoff and print queue tracking
- Python 3.9+
- pip or uv
# Clone the repository
git clone https://github.com/Harwav/Andent_Webapp.git
cd Andent_Webapp
# Create virtual environment
python -m venv venv
venv\Scripts\activate # Windows
source venv/bin/activate # macOS/Linux
# Install dependencies
pip install -r requirements.txt# From the repository root
uvicorn app.main:app --reload --port 8090Open in browser:
http://localhost:8090/
FormFlow can also be packaged as a single Windows tray application. The EXE starts the FastAPI server in the background, shows a green/yellow/red system-tray readiness icon, opens FormFlow in the browser, and exposes tray actions for status, PreFormServer recheck, restart, logs, and quit.
# Build the versioned EXE from app/version.py
python scripts/builders/build_windows_exe.py
# Smoke-test without opening a browser
$env:FORMFLOW_WEB_PORT = "8765"
$env:FORMFLOW_WEB_OPEN_BROWSER = "0"
$exe = Resolve-Path "dist\FormFlow_v0.1.0.exe"
$p = Start-Process -FilePath $exe -PassThru -WindowStyle Hidden
Invoke-RestMethod http://127.0.0.1:8765/health
Stop-Process -Id $p.Id -Force
Remove-Item Env:\FORMFLOW_WEB_PORT -ErrorAction SilentlyContinue
Remove-Item Env:\FORMFLOW_WEB_OPEN_BROWSER -ErrorAction SilentlyContinuePackaged runtime data defaults to folders beside the EXE (data/, output/, logs/) unless FORMFLOW_WEB_DATA_DIR, FORMFLOW_WEB_OUTPUT_DIR, or FORMFLOW_WEB_DATABASE_PATH override the paths. Startup diagnostics are written to logs/formflow_tray_diagnostic.log.
curl http://localhost:8090/health
curl http://localhost:8090/health/live
curl http://localhost:8090/health/readyAndent_Webapp/
├── app/ # FastAPI web application
│ ├── main.py # Application entry point
│ ├── config.py # Settings and configuration
│ ├── database.py # SQLite database layer
│ ├── schemas.py # Pydantic models
│ ├── routers/
│ │ ├── uploads.py # Upload and classification endpoints
│ │ └── metrics.py # Metrics dashboard
│ ├── services/
│ │ ├── classification.py # STL classification logic
│ │ ├── preset_catalog.py # Preset compatibility metadata
│ │ ├── build_planning.py # Form 4B/Form 4BL build manifest planning
│ │ ├── planning_preview.py # Build preview logic
│ │ ├── preform_client.py # PreFormServer local API client
│ │ ├── print_queue_service.py # Print handoff and queue sync
│ │ └── prep_pipeline.py # Prep pipeline utilities
│ └── static/ # Frontend assets
├── core/ # Shared backend modules
│ ├── andent_classification.py # Case ID and artifact classification
│ ├── batch_optimizer.py # STL dimension/volume utilities
│ ├── stl_validator.py # STL file validation
│ ├── andent_service_pipeline.py # Prep pipeline orchestration
│ ├── andent_planning.py # Build planning logic
│ ├── fps_parser.py # FPS file parser
│ └── constants.py # App constants
├── tests/ # Test suite
├── desktop/ # Windows tray runtime and packaged server lifecycle
├── scripts/builders/ # Windows EXE build helpers
├── docs/ # Product documentation
│ ├── 00_context/
│ ├── 01_requirements/
│ └── 02_planning/
├── requirements.txt
├── formflow.spec # PyInstaller one-file EXE spec
├── run_formflow.py # Thin tray-runtime entrypoint
└── README.md
POST /api/uploads/classify- Upload and classify STL filesGET /api/uploads/queue- List queue rowsPATCH /api/uploads/rows/{row_id}- Update classificationPOST /api/uploads/rows/bulk-update- Bulk update model type, preset, or printer groupPOST /api/uploads/rows/send-to-print- Send ready rows to PreFormServer using build manifestsPOST /api/uploads/rows/bulk-delete- Delete rowsGET /api/uploads/rows/{row_id}/file- Download STL fileGET /api/uploads/rows/{row_id}/thumbnail.svg- Get thumbnail SVGGET /api/uploads/rows/{row_id}/plan-preview- Get case plan previewPOST /api/uploads/rows/batch-plan-preview- Batch plan previewGET /api/print-queue/jobs- List tracked print jobsGET /api/print-queue/jobs/{job_id}/screenshot- Fetch cached or remote job screenshotPOST /api/print-queue/jobs/{job_id}/release-now- Release a held build to PreFormServer
Generated print jobs use YYMMDD_CASEID_CASEID names in build order. Case IDs are sanitized to filename-safe tokens before the name is used for local .form and .png outputs. Names longer than 120 characters are trimmed and suffixed with a stable 10-character hash of the full untrimmed name; same-day collisions receive a numeric suffix.
GET /health- Health check with timestampGET /health/live- Liveness probeGET /health/ready- Readiness probeGET /metrics- Metrics dashboard (HTML)
Environment variables:
| Variable | Default | Description |
|---|---|---|
FORMFLOW_WEB_HOST |
127.0.0.1 |
Server host |
FORMFLOW_WEB_PORT |
8090 |
Server port |
FORMFLOW_WEB_DATA_DIR |
./data |
Data directory |
FORMFLOW_WEB_DATABASE_PATH |
./data/formflow.db |
Database path |
FORMFLOW_WEB_OUTPUT_DIR |
./output |
Local output directory |
FORMFLOW_WEB_OPEN_BROWSER |
1 |
Set to 0, false, or no to suppress packaged-runtime browser launch |
FORMFLOW_WEB_PRINT_HOLD_DENSITY_TARGET |
0.40 |
Minimum estimated density before a final compatible build dispatches immediately |
FORMFLOW_WEB_PRINT_HOLD_CUTOFF_LOCAL_TIME |
18:00 |
Local cutoff time when held builds become releasable |
# Run tests from repository root
PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 python -m pytest tests/ -qnpm install
npx playwright install chromium
npm run test:release-gateThis is the hard ship/no-ship gate. It runs environment probes, Python backend tests, Chromium browser flows, canonical Form 4BL dataset classification, live virtual/debug PreFormServer handoff invariants, and packaged EXE startup proof. A release ships only when the command exits 0 and the generated verdict says SHIP: yes.
Prerequisites:
- Canonical STL data exists at
C:\Users\Marcus\Desktop\From 4BL Test Data, or setFORMFLOW_RELEASE_TEST_DATA_DIR. - A live compatible PreFormServer is reachable at
http://127.0.0.1:44388, or setPREFORM_SERVER_URL. - The available PreForm target is virtual/debug only for the release-gate dispatch path.
- A packaged EXE exists under
dist/, for exampledist\FormFlow_v0.1.0.exe.
Evidence is written under docs/02_planning/98_VerificationArtifacts/pre_release_* by default, including release-gate.json, verdict.md, stage logs, dataset manifest, PreForm status, browser evidence, print-job evidence, and packaged-runtime evidence.
- STL upload and classification
- Manual model type/preset overrides
- Queue management
- Batch operations
- Compatibility-aware Form 4B/Form 4BL build manifests
- Printer-group row and bulk edits
- Density-based holding and Release now path
- Real PreFormServer handoff path
- Print Queue tab and job status polling
- Windows tray EXE runtime and CI packaging smoke test
- Live PreFormServer/Formlabs acceptance validation
See docs/02_planning/ for product documentation:
Proprietary - FormFlow Dent Project
Contact your Formlabs representative for technical support.