Skip to content

About

LiFePO4 benchmark extraction SaaS ? FastAPI + Next.js 15

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

CathodeBench

CathodeBench is a LiFePO4-only week-1 alpha for reviewing benchmark data extracted from cathode papers.

Week-1 scope

  • Invite-only login
  • One workspace per user
  • PDF upload
  • Page parsing
  • Tier-1 LiFePO4 extraction with field-level evidence
  • Review and approval UI
  • CSV/JSON export
  • QA metrics dashboard
  • Deletion flow

Week-2 hardening

  • Redis-backed queue orchestration with worker entrypoint
  • Document status polling for queued, parsing, extracting, completed, and failed states
  • Persisted extraction progress with page and row counters
  • Stronger LiFePO4 heuristic extraction fallback and ambiguity flags
  • Session validation on page load
  • Richer admin metrics for edit burden and confidence-vs-acceptance
  • Docker packaging for API, worker, and web services
  • Real Alembic-backed schema migrations
  • Push-style document progress streaming for the review UI

Repo layout

  • apps/web: Next.js frontend
  • apps/api: FastAPI backend and extraction pipeline
  • schemas: Structured Outputs contract
  • prompts: extraction and normalization prompts
  • sql: SQL migration starter
  • infra: local Docker wiring

Local setup

  1. Copy .env.example to .env and fill the values you need.
  2. Start the full local stack from infra:
    • docker compose -f infra/docker-compose.yml up --build
  3. Open:
    • web: http://localhost:3000
    • API: http://localhost:8000
    • MinIO console: http://localhost:9001
    • API startup now runs Alembic migrations automatically.
  4. If you prefer running app processes manually, start only the backing services:
    • docker compose -f infra/docker-compose.yml up -d postgres redis minio
  5. Install backend dependencies:
    • python -m venv .venv
    • .\\.venv\\Scripts\\Activate.ps1
    • pip install -r apps/api/requirements.txt
  6. Install frontend dependencies:
    • cd apps/web
    • npm install
  7. Run the API:
    • python -m uvicorn app.main:app --reload --app-dir apps/api
  8. Run the worker:
    • cd apps/api
    • python -m app.workers.run_worker
  9. Run the frontend:
    • cd apps/web
    • npm run dev

If OPENAI_API_KEY is unset, the API falls back to a deterministic heuristic extractor for local testing. If you want to force synchronous local processing, set QUEUE_BACKEND=inline. If you want to run migrations manually, use alembic -c apps/api/alembic.ini upgrade head from the repo root.

About

LiFePO4 benchmark extraction SaaS ? FastAPI + Next.js 15

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages