How slslz/veil-ai works
Private AI Verification turns a verifier’s natural-language requirement into a reviewed eligibility policy, adapts supported criteria for a Midnight proof flow, and returns a qualified/not-qualified result without exposing applicant values. The graph separates the policy API, browser experience, and private verification runtime. README documents the overall flow, but marks the final policy-to-execution connection as in progress; that link is shown as unverified. Some runtime modules are represented by their exact file paths, though their full implementations were not sampled.
Main entry points: mainAPI.ts Verification execution · policy.controller.ts Parse policy handler · policy-parser.ts AI policy parser · App.jsx Describe, review, result UI
Components 17
Verifier experience
- Describe, review, result UI
frontend/src/App.jsx
Policy interpretation API
- Express API
backend/api/app.ts - Policy parse route
backend/api/routes/policy.routes.ts - Parse policy handler
backend/api/controllers/policy.controller.ts - AI policy parser
backend/ai/policy-parser.ts - Structured AI client
backend/ai/ai-client.ts
Private verification
- Public criteria adapter
backend/midnight/policy-to-criteria.ts - Verification execution
mainAPI.ts - Eligibility circuit runtime
managed/eligibility/contract/index.js - Private age/income witness
witness.ts - Verification bridge
verificationBridge.ts
Policy foundations
- Policy semantics validator
backend/utils/policy-validator.ts - Policy schemas
backend/schemas/policy.schema.ts - Policy types
backend/types/policy.ts
Other components
- Verifier / applicant
- AI LLM provider
- Midnight proof infrastructure
Connections 19
- Verifier / applicant → Describe, review, result UI: enters requirement
README.md - Describe, review, result UI → Express API: requests policy parse
README.md - Express API → Policy parse route: routes policy requests
backend/api/app.ts - Policy parse route → Parse policy handler: dispatches parse
backend/api/routes/policy.routes.ts - Parse policy handler → AI policy parser: parses requirement
backend/api/controllers/policy.controller.ts - AI policy parser → Structured AI client: generates structured policy
backend/ai/policy-parser.ts - Structured AI client → AI LLM provider: requests structured output
- AI policy parser → Policy schemas: validates AI output
backend/ai/policy-parser.ts - AI policy parser → Policy semantics validator: checks policy semantics
backend/ai/policy-parser.ts - Parse policy handler → Policy semantics validator: validates policy semantics
backend/api/controllers/policy.controller.ts - Parse policy handler → Public criteria adapter: adapts policy criteria
backend/api/controllers/policy.controller.ts - Describe, review, result UI → Verification execution: starts verification
- Public criteria adapter → Verification execution: hands off criteria
- Verification execution → Eligibility circuit runtime: invokes circuit
mainAPI.ts - Verification execution → Private age/income witness: supplies private witness
mainAPI.ts - Eligibility circuit runtime → Private age/income witness: requests private values
managed/eligibility/contract/index.js - Verification execution → Verification bridge: used by bridge
verificationBridge.ts - Eligibility circuit runtime → Midnight proof infrastructure: runs proof flow
- Verification execution → Describe, review, result UI: returns result