VeraCivic
A legal and civic assistant for Nigerians: ask in English, Pidgin, Yoruba, Hausa or Igbo and get the Act and Section that applies, word for word.
Most Nigerians can't easily find out what the law actually says about their own lives. The primary sources exist, but they're written for lawyers; the accessible sources are strangers online who are often confidently wrong. The gap isn't information, it's trustworthy, readable, grounded answers. Vera Civic exists to close that gap: ask a plain question, in English, Pidgin, Yoruba, Hausa or Igbo, and get an answer you can trace back to the statute it came from.
Vera is a retrieval-first system, not a chatbot with opinions. Every turn is classified before anything else runs: a gate decides what kind of question this is and catches safety situations first. The agent is a LangGraph reasoning engine on FastAPI; it is the only service that asks the retrieval API what the law says, and the retrieval API is the only thing allowed to answer. That corpus, held in Qdrant, keeps two kinds of knowledge deliberately separate:
- an authoritative, slow-changing law corpus (the Constitution, Acts, case law and regulatory sources) that can be cited as fact
- a fast-moving news index, built from publisher RSS excerpts, that is always attributed and never treated as settled law
Choosing the right source for each kind of question, authority versus freshness, is a design rule the routing and retrieval are held to, not an afterthought.
The hard part of a system like this is not generating text, it's refusing to make things up. A law answer is lawyer-grade or it doesn't ship: the provision first, a pinpoint citation, and the verbatim text on request. The model's own memory is never allowed to be a source.
Before an answer reaches a user it passes a faithfulness gate:
- the answer is broken into atomic claims
- each claim is verified against the retrieved evidence
- the answer only ships if it clears the grounded-score threshold
That gate is backed by eval suites of in-scope civic questions, out-of-corpus negatives the system should decline, and adversarial red-team prompts, so quality regressions surface as failing checks instead of reaching users. Citation fabrication and false-premise anchoring were the two failure modes the red-teaming kept finding, and the two the evals are built around. Because the agent reads live web content and user uploads, all of that text is treated as data, never as instructions; uploads are extracted in a sandbox and scanned before anything reads them.
Vera dispenses information to vulnerable people, so safety isn't a feature bolted on top, it's encoded in the product. The safety and danger path, covering emergencies, abuse and life-safety resources, is always free, unmetered and never behind sign-in. Verified helplines and emergency resources are only ever surfaced when confirmed, never guessed. Vera never tells a reader they are "overdue", "in breach" or have "missed" something; a phrase screen in both the agent and the API enforces that. Minors get their own lanes: Classroom only, no web, no free-text messaging with adults.
I designed and built the whole platform end to end, as six services:
- web: the main site and dashboard on
Next.js,ReactandTailwind, with a backend-for-frontend that proxies to the other services - accounts: auth, billing and user data on
Fastify,TypeScript,DrizzleandPostgres; phone-number sign-in with SMS OTP, 2FA,Paystackbilling, family links, age verification, data export and erasure - agent: the
PythonLangGraphreasoning engine, with every model call metered into a cost ledger - api: retrieval and the corpus,
FastAPIoverQdrant; statutes, case law, the regulatory hub, news crawlers and citation resolution - classroom: a learning app for schools, with lessons, paths, study groups and classes
- admin: a staff console for school verification, licences and moderation
Service-to-service calls use an internal token; anything that writes on a user's behalf acts with that user's own token. Conversations and reports are sealed at rest. Models are chosen per lane: a paid Gemini lane by default, chosen deliberately so user data is never used for training, with other providers behind config for specific lanes and Gemini only for minors. It runs self-hosted behind a reverse proxy, with development and production services deploying from their own branches, and a local review gate (typecheck, lint, the full test suite, mutation spot-checks) in front of every merge. Schema migrations, flag flips and production releases are the only steps that need my explicit go.
Plans are Free, Plus and Business on a free core. The corpus is tracked as an inventory of what Vera has, has partially, and is still missing, and the sourcing is done ethically: robots.txt is respected, bot walls are never bypassed, and news comes from publisher feeds as short attributed excerpts.
Live at veracivic.com.