Validator validates verdicts from the Verifier by performing independent web searches and evidence gathering.
# Install dependencies
npm install
# Setup environment
cp .env.example .env
# Edit .env with your credentials
# Run validator
npm run devSee VALIDATOR.md for complete architecture and implementation details.
validator/
├── src/
│ ├── db/ # Database client and schema
│ ├── llm/ # LLM agents (query enhancer, result judge)
│ ├── search/ # SearchAPI.io integration
│ ├── env.ts # Environment config
│ ├── validator.ts # Core validation logic
│ ├── utils.ts # Utility functions
│ └── index.ts # Main entry point
├── drizzle/ # Database migrations
├── QUERY_ENHANCER_PROMPT.md # Query enhancement prompt
├── RESULT_JUDGE_PROMPT.md # Result judgment prompt
├── .env.example # Environment template
└── VALIDATOR.md # Architecture docs
POSTGRES_URL- PostgreSQL connection stringSEARCHAPI_API_KEY- SearchAPI.io API keyOPENROUTER_API_KEY- OpenRouter API key for LLM agentsNODE_TLS_REJECT_UNAUTHORIZED- Set to0for self-signed certsPORT- Server port (default: 3000)NODE_ENV- Environment (development/production)
npm run dev # Run with hot reload
npm run build # Compile TypeScript
npm start # Run compiled version
npm run typecheck # Type checking
npm run lint # Lint code
npm run test # Run tests