Spaces:
Running
Running
Commit History
-
feat(frontend): v3.0 — project-first 3-step wizard
- Rewrite landing to health-badge + 4 entry tiles - /projects list (GET /projects), /projects/new form (POST /projects) - /projects/{id} 3-step wizard: - Step A BlueprintsPanel — multi-upload to project (POST /uploads/blueprint) - Step B DocumentationPanel — GET /dokumentatsiya + POST /extract-all with Cached badge when aggregate_sha256 matches last_summary, Run button otherwise - Step C SheetVisionPanel — POST /extract-sheets w/ (upload_id, page_no) pairs - /documents — template picker + .docx render & download (POST /documents/render) - /history — GET /inference/history with project_id chip filter - lib/api.ts: add v2.0 types & 6 new functions (listProjectUploads, projectDokumentatsiya, extractProjectAll, extractProjectSheetsV2, uploadBlueprintV2) + UploadRow/DokumentatsiyaResponse - Drop legacy /blueprint single-upload flow4308ec9
-
feat(uploads): v1.0.1 — ground-truth section + empty-page filter + stamp validator
Adds three reliability fixes to the D-light blueprint pipeline. No OCR was added — the fix is purely about not lying to the model. * project_section ground-truth - heuristic_section() scans the first ~80 lines for explicit phrasing ("Основной комплект чертежей: НВК", "Раздел проекта АР") and falls back to scanning for known tokens (АР/КЖ/КМ/НВК/ОВ/ВК/...). - extract_pages_text() aggregates to artifact.project_section. - /uploads/blueprint/{id}/extract-sheets injects this ground-truth into the VLM prompt as a hint, and falls back to it when the model returned nothing or something we couldn't validate — solves the "model returned АР but the doc is НВК" report. * empty-page filter - ExtractedPage.is_empty + EMPTY_PAGE_TEXT_THRESHOLD (60 chars). - extract-sheets skips empty pages from the VLM chain but surfaces them in sheets_index with title_guess="(пусто)" and notes the count in spec_summary so the UI doesn't think the page vanished. * stamp valid…84808f2
-
feat(frontend): two-step blueprint flow
Moves the Next.js sources (lib/, configs, package manifest) from the project root down into frontend/ so the FastAPI app/ tree doesn't collide with the App Router. vercel.json now points at frontend/package.json. UI: / short explainer + entry /blueprint two-step flow step 1 — upload PDF / image → server extracts native text on all pages → page list with stamp + title excerpts. "Сводка по тексту" button calls /uploads/blueprint/{id}/extract-text which LLM-summarises the whole document. step 2 — multi-select pages → "VLM по выбранным (N)" button calls /uploads/blueprint/{id}/extract-sheets which runs the real VLM chain per selected page with sibling text context. lib/api.ts adds typed wrappers for all 5 new endpoints (uploadBlueprint, getBlueprintStatus, getPagePreview, extractProjectText, extractProjectSheets) plus matching request and response types. Page preview rendered inline as a dat…6d57e0d
-
deploy: backend 2026-06-22T05:07:40Z
0c46399
-
feat(deploy): frontend push to GitHub + Vercel wiring
- frontend/.gitignore: Vercel-friendly excludes (node_modules, .next, IDE files) - frontend/vercel.json: env values now plain strings (NEXT_PUBLIC_API_URL= https://dirbol-virtforemanbackend.hf.space, APP_NAME=Virtual Foreman) so first deploy works without manual env-var injection on Vercel side - deploy.sh deploy_frontend: same pattern as backend * separate src + clone mktemp dirs * rsync_or_cp + find-wipe + git add -A * additionally bring in project-root .gitignore and .dockerignore Pushed to dirboll-commits/VirtForeman (main): 2c36e8a → 6799da6 → a35e505 → c9f1892 Clean tree, 18 files. Ready for Vercel connect. Note: Vercel auto-deploy hook requires the GitHub integration to be activated once on Vercel (manual "Connect Git Repo" step). Once active, every push to main triggers a build automatically. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>004ea40 -
Phases 2-5: full FastAPI backend, Pydantic OpenRouter client, docxtpl engine, Next.js UI, deploy.sh
Backend: - app/models: Pydantic schemas for Project, DailyWorkInput, TechStack (BY-context) - app/services/openrouter: async client w/ primary+fallback free models, required headers (Authorization, HTTP-Referer, X-Title), JSON response_format, Pydantic-validated structured outputs, tenacity retries - app/services/tech_stack_service: orchestrates OpenRouter call → TechStack model - app/services/document_engine: docxtpl wrapper, BY act templates (AOSR, OO, etc.) - app/services/supabase_service: optional persistence (graceful no-op if absent) - app/ai/prompts: GPT-style system prompt as chief engineer / head of PTO with strict JSON mandate and Belarusian SN/TKP knowledge - app/routers: /projects, /work/infer, /documents/render, /documents/templates - app/main: lifespan-managed OpenRouter HTTP client, CORSMiddleware - scripts/generate_templates: generates 4 .docx templates w/ Jinja2 tags - supabase/schema.sql: projects + acts_history tables w/ RLS Frontend (Next.js 14, App Router, T…51122e7 -
Phase 1: scaffold backend (FastAPI + Dockerfile) and frontend (Next.js + Vercel)
- backend/: FastAPI app skeleton with /health endpoint, pydantic-settings config - backend/Dockerfile: Python 3.11 slim, port 7860 for HF Spaces SDK - backend/requirements.txt: pinned deps (fastapi, pydantic, httpx, supabase, docxtpl) - backend/.env.example: env template (no secrets committed) - frontend/: Next.js 14 + Tailwind + TS, vercel.json with build env wiring - .gitignore: covers Python, Node, .env, HF, Vercel artifacts Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>93628d9