Spaces:
Running
Running
Release Checklist β Virtual Foreman
Pre-production state right now. The following items remain β all can be completed in less than an hour.
β Done
- Backend (FastAPI) is live on Hugging Face Space.
- Frontend (Next.js) is live on Vercel.
- All major routes wired end-to-end:
GET /health,GET /,GET /supabase/healthPOST /projects,GET /projects,GET /projects/{id},DELETE /projects/{id}POST /work/infer,POST /work/blueprintGET /documents/templates,POST /documents/renderGET /inference/history
- CORS constrained to the live Vercel deploy (
virt-foreman.vercel.app) plus subdomains and localhost. - X-Request-ID middleware on every response.
- HF Space secret recipes documented in
backend/README.md. - Legacy OpenRouter fields retained but ignored; primary NVIDIA
integrate chain (
DeepSeek V4 Flash+ fallbacks) is active. - Vision path uses
Llama-3.2-Vision-11B β 90B β Phi-4-multimodal. - PDF render pipeline (
pypdfium2 + Pillow) renders first page to PNG before VLM call, capped at 1536 px on longest edge. - Stub fallbacks for inference exhaustion β UI never dead-ends.
- Pytest suite covers schemas + Supabase column mapping (7 tests).
- All commits authored
dirboll@gmail.com(Vercel bot-check OK).
π‘ Manual steps remaining (~ 30 minutes)
Apply the Supabase delta schema
- Open https://supabase.com/dashboard/project/hjkubelrluueugdjsqyn/sql/new
- Paste contents of
backend/supabase/schema.sql - Click Run β confirm
inference_historyappears in the table editor.
Verify secrets on the HF Space
- https://huggingface.co/spaces/Dirbol/VirtForemanBackend/settings/secrets
SUPABASE_URLβSUPABASE_SECRET_KEY(orSUPABASE_KEY) βLLM_API_KEY(= NVIDIA integrate API key) β- Optional:
HF_TOKENfor monitoring
Vercel one-time connect (skipped in Termux)
- Vercel dashboard β "Add New Project" β "Import Git Repository"
- Pick
dirboll-commits/VirtForeman - Root directory: repo root (already Next.js-shaped)
- Env vars in Vercel project settings:
NEXT_PUBLIC_API_URL=https://dirbol-virtforemanbackend.hf.spaceNEXT_PUBLIC_APP_NAME=Virtual Foreman
Health checks
curl https://dirbol-virtforemanbackend.hf.space/healthβ 200curl https://dirbol-virtforemanbackend.hf.space/supabase/healthβ{configured:true, reachable:true, rows_in_projects_sample:1}curl https://virt-foreman.vercel.app/β 200, home page renders
End-to-end smoke (manual, in browser)
- Create project β /work, /blueprint, /documents chained actions.
- Verify each inference shows up under /history.
- Verify document download opens in Word / LibreOffice.
Run the regression suite
pip install -r requirements-dev.txt pytest tests/test_schemas.py tests/test_supabase_mapping.py -vExpected output:
7 passed.Production hardening (optional)
- Rate-limit per IP on
/work/inferand/work/blueprint. - Auth layer (Supabase Auth widgets or OIDC for the frontend).
- Email verification before document download.
- Rate-limit per IP on
π Deployment commands cheat-sheet
# Backend β HF Space
git push hf <branch>:main
# Frontend β Vercel (Vercel auto-deploys on push to origin/main)
git push origin <branch>:refs/heads/main --force
Both must succeed for a clean release. Roll back via Vercel "Promote previous deployment" / HF revert.
π Logs
- HF Space runtime: https://huggingface.co/spaces/Dirbol/VirtForemanBackend β "Logs" tab β "Container" stream.
- Vercel: project β "Logs" tab.
- Local sanity:
pytest tests/ -v.