Skip to content

feat: React + FastAPI web UI to replace NiceGUI#12

Merged
biswasbiplob merged 4 commits intomainfrom
feature/ui-upgrade-plan
Feb 9, 2026
Merged

feat: React + FastAPI web UI to replace NiceGUI#12
biswasbiplob merged 4 commits intomainfrom
feature/ui-upgrade-plan

Conversation

@biswasbiplob
Copy link
Copy Markdown
Owner

Summary

  • Replace NiceGUI with a modern React 19 + TypeScript + Tailwind CSS v4 frontend backed by a FastAPI REST API with SSE progress streaming
  • Complete implementation of the migration plan in docs/UIUpgradePlan.md
  • Version bumped to 0.8.0

Backend (src/legacylipi/api/)

  • FastAPI app with session-based architecture and async pipeline runners
  • 11 REST endpoints: config (3), sessions (2), processing (3), progress SSE (1), download (1), health (1)
  • Pydantic request/response schemas matching all frontend contracts
  • In-memory session manager with TTL cleanup
  • Pipeline logic extracted from NiceGUI app.py into standalone async functions

Frontend (frontend/)

  • 10 React components: Header, FileUploader (drag-drop), WorkflowModeSelector, ScanCopySettings, OcrSettings, OutputFormatSelect, TranslationSettings, TranslatorSettings, ActionButton, StatusPanel
  • 5 custom hooks: useFileUpload, useProgress (SSE), useProcessing, useDownload, useConfig
  • React Context + useReducer state management with 11 action types
  • Typed API client with fetch wrapper
  • Dark theme with CSS variables, responsive 3-column layout

Integration

  • legacylipi api CLI subcommand + legacylipi-web entry point
  • scripts/dev.sh for hot-reload development (FastAPI + Vite HMR)
  • scripts/check.sh updated with frontend TypeScript check (5 steps)
  • FastAPI serves built React static files in production

Tests & Docs

  • 14 new API tests (393 total, all passing)
  • Updated README.md, docs/development.md, CLAUDE.md with new architecture

Test plan

  • tsc --noEmit passes (zero TypeScript errors)
  • vite build produces 227KB JS + 20KB CSS
  • ruff format --check + ruff check pass
  • mypy passes with no issues
  • pytest — 393 tests pass (14 new API tests)
  • Manual: uv run legacylipi api serves UI at :8000
  • Manual: Upload PDF → select workflow → process → download result

🤖 Generated with Claude Code

biswasbiplob and others added 4 commits February 9, 2026 23:22
Comprehensive plan to migrate from NiceGUI to a decoupled architecture
with React 19 + Vite + TypeScript frontend and FastAPI REST API backend.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace NiceGUI with a modern React 19 + TypeScript + Tailwind CSS v4
frontend backed by a FastAPI REST API with SSE progress streaming.

Backend: FastAPI with session-based architecture, async pipeline
runners, Pydantic schemas, and 11 REST endpoints.

Frontend: Drag-and-drop upload, workflow mode selection, configurable
settings panels, real-time progress bar, and result download.

- Add FastAPI backend with routes for config, sessions, processing,
  progress (SSE), and download
- Add React frontend with 10 components, 5 hooks, and Context state
- Add 14 API tests (393 total tests passing)
- Add `legacylipi api` CLI subcommand and `legacylipi-web` entry point
- Add scripts/dev.sh for hot-reload development
- Update scripts/check.sh with frontend TypeScript check
- Update README, docs/development.md, and CLAUDE.md
- Bump version to 0.8.0

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@biswasbiplob biswasbiplob merged commit b1097d0 into main Feb 9, 2026
3 checks passed
@biswasbiplob biswasbiplob deleted the feature/ui-upgrade-plan branch February 10, 2026 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant