UI description for the open-ended task described in summary.md.
This UI is now implemented as a React + Vite app in ui/ (not Streamlit).
The previous Streamlit UI (app.py, pages/, shared/) was discarded.
Integration branch: ui/react-integration
- Frontend:
ui/(React, Vite, React Router) - UI API adapter:
ui_api.py(FastAPI) - Scrapers + merger reused from existing Python code:
scrapers/electronic4you.pyscrapers/etec.pymatching/merger.py
GET /api/healthGET /api/productsGET /api/search/suggestions?q=...POST /api/pipeline/runGET /api/pipeline/results?query=...&specs=...
Implemented behavior:
- Center search box for product name/model/brand.
- Real-time source-DB suggestions shown below the input.
- Suggestions do not run full pipeline.
- Optional priority feature text input (e.g., OLED, USB-C).
- Search action navigates to results page and triggers pipeline run there.
Notes:
- Suggestions are fetched with debounce via
/api/search/suggestions.
Implemented behavior:
- Grid listing of source products (3 columns on desktop, responsive down to 1 column).
- Product cards show concise key data (name, description, price, category, top features).
Implemented behavior:
- Collapsible left sidebar.
- Category filtering.
- Sorting options: name asc/desc, price asc/desc.
Notes:
- Categories are derived from live source products returned by
/api/products.
Implemented behavior:
- Similar grid layout to all-products page, but using pipeline outputs.
- Feature/specification filter input that filters current output data only (no rerun).
- Top search box for new search that triggers a new pipeline run.
- "Run All Pipeline" action to run pipeline for all source products.
- Coverage and result stats shown as badges.
- New search (
q) + optional specs =>POST /api/pipeline/runwithrun_all=false. - Run all =>
POST /api/pipeline/runwithrun_all=true. - Display =>
GET /api/pipeline/results.
From repository root:
- Start backend API adapter:
source hack_venv/bin/activate
uvicorn ui_api:app --reload --host 0.0.0.0 --port 8000- Start frontend:
cd ui
npm install
npm run dev -- --host 0.0.0.0 --port 5173- Open:
http://127.0.0.1:5173
Optional frontend env:
cp ui/.env.example ui/.envVITE_API_URL defaults to http://localhost:8000.
- UI framework is React/Vite now (not Streamlit).
- Zip source is integrated under
ui/; zip file itself is gitignored. - The read-only hackathon platform in
webapp/was not modified.