CoolFace
Apppublic

ssd01/vera-diagnostic-engine

sourceHugging Faceupdated 6mo agoView on Hugging Face
0likes
App README

V.E.R.A.

Validation, Evaluation, & Review Assistant — A human-in-the-loop alignment MVP.

Monorepo

PathStack
web/Next.js 15 (App Router), Tailwind, Supabase, React Hook Form, @upstash/qstash
worker/FastAPI, LangGraph, Pydantic, QStash signature verification
supabase/schema.sqlPostgres schema for Supabase

Data flow

  1. 1.Client Profile form (web) inserts clients + tasks via Supabase, then publishes JSON to QStash URL group `client-data-input`.
  2. 2.QStash delivers to every URL registered in that group (e.g. your deployed `worker` /ingest endpoint).
  3. 3.Worker verifies Upstash-Signature, validates the body with Pydantic, runs the LangGraph: bootstrap → Gemma-2-9B extractor → Qwen strategist → Gemini judge → Supabase finalizer (task completed, ai_score, ai_critique).

If you already applied an older schema.sql, add the `vera_tasks_update_anon` policy (or equivalent) so the worker can update tasks with the anon key.

Environment variables

Use the names from your manifest (no hardcoded secrets in code):

  • —SUPABASE_URL, SUPABASE_ANON_KEY
  • —QSTASH_URL, QSTASH_TOKEN
  • —GEMINI_API_KEY, HUGGINGFACE_API_KEY

Worker webhook verification additionally needs signing keys from the QStash console (same project):

  • —QSTASH_CURRENT_SIGNING_KEY, QSTASH_NEXT_SIGNING_KEY

If those are unset, the worker logs a warning and skips signature verification (local dev only — enable keys before any public deployment).

Commands

bash
npm install
cd web && cp .env.example .env.local
npm run dev
bash
cd worker && cp .env.example .env
python -m venv .venv && source .venv/bin/activate
pip install -e .
uvicorn vera.main:app --reload --host 0.0.0.0 --port 8000

Apply supabase/schema.sql in the Supabase SQL editor, then register your public worker URL under the QStash URL group `client-data-input`.