Tool set for creating finding models for defining the semantic labels for imaging findings.
FindingModelForge is a FastAPI web application exposing
findingmodel functionality. The app uses GitHub OAuth for
authentication, Jinja2 for templating, and provides a modern web interface with Tailwind CSS and Alpine.js.
Requirements:
-
uv: Install with:
curl -LsSf https://astral.sh/uv/install.sh | sh -
Task: Install depends on system;
MacOS:
brew install gotask
Windows:
winget install Task.Task
task build
task run-containerBrowse to localhost:8000 to access the web application.
For development with hot reload:
task devFor development with CSS watching:
task dev-watchCommon development commands:
task setup # Install deps + create .env + build assets
task test # Run tests with coverage (70 tests, 71% router coverage)
task test-unit # Fast unit tests only
task lint # Lint and fix code issues
task format # Format code
task check # Quality checks (CI-friendly)
task build-frontend # Build CSS and JS assets- Linting and formatting using ruff configured via a
pyproject.tomlfile - Type checking using mypy with strict mode
- Unit testing and coverage with pytest
- Use
taskfor integration tasks (lint, format, type-check, test, build) - Pre-commit hooks for automated code quality checks
- GitHub Actions for automatic checking on commit for formatting, linting, and passing tests
- Set up Dependabot to keep dependencies up to date
- Build any packages and create releases on GitHub; automate with GitHub actions as appropriate
- Build app container image with
taskand push to GitHub Container Registry - Temporarily, manual deployment to Railway, with separate staging/ production environments.
- Later, move to continuous deployment with GitHub Actions
- Target Python version 3.12+
- Extensive type hinting throughout the codebase
- Environment variables for configuration using pydantic-settings
- Async/await patterns for I/O operations
- Comprehensive error handling and logging
Complete draft lifecycle with autosave, resume, submit, and delete functionality:
- Auto-save on Step 4: Drafts automatically created/updated when editing attributes
- Unified draft pages: Single endpoint handles both edit and view modes via
?mode=parameter - Session adoption: Automatic recovery of draft state when sessions are lost
- User isolation: One editable draft per (user_id, name) combination with secure ownership checks
- Action logging: Comprehensive audit trail for all draft operations
- Status management: draft → submitted → [future: under-review | added | declined]
- Smart resume: Entering the same finding name after submit shows final display view
- Redis integration: Cache layer available throughout with graceful degradation
- Flowbite components first; keep to their HTML structure and data-attributes.
- Alpine.js for local state and interactivity (
x-data,x-model,x-show, computed methods). Avoid custom vanilla JS. - Use Jinja2 macros in
templates/macroswhere possible (seeflowbite_components.html,layout_components.html,json_accordion.html). - HTMX is used for server-driven fragments in multi-step forms.
-
Data
-
Web
-
Frontend
tailwindcss- Utility-first CSS framework with dark mode supportalpinejs- Lightweight JavaScript framework for interactivityflowbite- Pre-built UI components with data-attribute patternsvite- Modern frontend build system with hot reloadhtmx- Server-driven interactivity for multi-step flows
-
Logging
loguru- Application logging and debugging infrastructure
-
Authentication & Security