AI-powered academic certificate verification for Nigerian employers, schools, recruiters, and institutions.
VerifyNG was built by Team Finsense for Squad Hackathon 3.0, Challenge 01: Proof of Life. The product helps a user upload an academic document, pay a verification fee through Squad, and receive an explainable AI trust score with a verdict, confidence level, and risk flags.
- Frontend: https://verifyng-three.vercel.app
- Backend API: https://olatunjitobi-verifyng-api.hf.space
- Health check: https://olatunjitobi-verifyng-api.hf.space/health
- Repository: https://github.com/fisayo-dev/verifyng
The hackathon brief asks teams to build an AI system that helps people, businesses, or institutions verify, trust, or authenticate something where fraud or opacity is common. VerifyNG chooses the education domain: fake academic certificates, exam results, and altered scans.
Manual certificate verification is slow, expensive, and difficult to scale. Employers may need to contact institutions one by one, while applicants and HR teams wait days for a decision. VerifyNG provides a fast first-pass screening layer: it does not replace the institution of record, but it helps organizations identify high-risk documents before they spend time and money on manual review.
- A user opens the PWA and uploads a certificate or result image.
- The backend creates a verification job and starts a Squad checkout.
- The user pays the verification fee through Squad.
- Squad redirects/calls back to the backend with the transaction reference.
- The backend confirms the payment, uploads the file to Supabase Storage, and triggers the AI pipeline.
- The AI engine runs visual forensics, OCR/content validation, template matching, and a custom ML classifier.
- The frontend polls the result endpoint until the status is
COMPLETEorFAILED. - The user sees a trust score, verdict, confidence level, and explanation flags.
| Squad Hackathon Criterion | Weight | How VerifyNG Addresses It |
|---|---|---|
| AI Technical Depth | 30% | Four-layer verification engine: visual forensics, OCR/content validation, template/layout matching, and a custom NumPy ML classifier. |
| Squad API Integration | 20% | Squad checkout is the gatekeeper for verification. The AI does not run until payment is confirmed. |
| Problem Relevance and Domain Insight | 15% | Targets certificate/result fraud in Nigerian hiring and education workflows, a direct match for the guide's education verification domain. |
| Solution Design and Scalability | 15% | Stateless FastAPI backend, Supabase persistence/storage, Vercel PWA, Hugging Face deployment, idempotent payment handling, timeout-protected AI jobs. |
| Presentation and Demo | 15% | Live PWA and live API demonstrate upload, payment, callback, polling, and result display end to end. |
| Impact Potential Bonus | 10% | Pay-per-check model can expand into employer subscriptions, university partnerships, NYSC screening, and API verification for HR platforms. |
| Pillar | VerifyNG Implementation |
|---|---|
| AI Automation | The system automatically analyzes visual tampering, extracted text, certificate structure, and ML authenticity signals after payment. |
| Squad APIs | Squad payment initiation and callback/webhook flow sit in the critical path. No payment means no AI run. |
| Use of Data | The trust score is built from OCR confidence, ELA anomaly score, template fields, content validation, metadata signals, and classifier probability. |
| Financial Innovation | Certificate verification becomes a low-cost, payment-gated service that can support pay-per-use, subscriptions, and institutional bulk verification. |
VerifyNG is not a chatbot wrapper. The AI layer performs the verification work.
- Error Level Analysis checks compression inconsistencies that may indicate edits.
- Metadata checks detect missing or suspicious document metadata.
- Visual consistency scoring flags sharpness and pixel-level differences.
- Tesseract OCR extracts text from uploaded scans or images.
- The backend checks institution keywords, certificate language, candidate name patterns, year signals, and exam/result terminology.
- Low-quality scans still produce an interpretable outcome rather than silently failing.
- The template layer checks whether the OCR output resembles expected WAEC or certificate result structure.
- It scores expected fields such as candidate name, examination number, year, institution label, and grade-table evidence.
- A lightweight NumPy softmax classifier combines engineered features from the previous layers.
- Features include visual score, content score, template score, OCR confidence, ELA anomaly score, metadata suspicion, missing field count, and word count.
For deeper AI detail, see AI_TECHNICAL_DEPTH.md.
Every completed verification returns:
trust_score: 0-100 scoreverdict:LIKELY AUTHENTIC,REQUIRES MANUAL REVIEW,SUSPICIOUS, orLIKELY FORGEDconfidence:HIGH,MEDIUM, orLOWflags: human-readable reasons for the scorelayers_run: AI layers that successfully executed
This matters for responsible AI. The system does not claim perfect truth. It shows evidence, flags uncertainty, and supports manual review when confidence is not high enough.
Squad is central to the product, not a checkbox.
POST /api/verifycreates a verification job.- The backend calls Squad transaction initiation with:
- amount in kobo
- customer email
- transaction reference:
VNG-{verification_id} - callback URL
- verification metadata
- The frontend opens the returned
checkout_url. - Squad confirms payment through the callback/webhook path.
- The backend marks the payment confirmed and starts AI analysis.
- Squad controls access to the paid verification workflow.
- The business model depends on Squad, because verification compute runs only after payment.
- The same architecture can support B2B employer subscriptions, bulk checks, and virtual-account based institutional workflows.
The frontend depends on this schema. Do not change these fields without coordinating with the frontend.
Request:
Content-Type: multipart/form-data
file=<certificate image or PDF>Response:
{
"job_id": "uuid",
"checkout_url": "https://sandbox-pay.squadco.com/...",
"status": "PENDING_PAYMENT",
"poll_url": "https://olatunjitobi-verifyng-api.hf.space/api/result/{job_id}"
}Pending payment:
{
"verification_id": "uuid",
"status": "PENDING_PAYMENT",
"message": "Awaiting payment confirmation"
}Processing:
{
"verification_id": "uuid",
"status": "PROCESSING",
"message": "AI is analyzing your certificate..."
}Complete:
{
"verification_id": "uuid",
"status": "COMPLETE",
"trust_score": 87,
"verdict": "LIKELY AUTHENTIC",
"flags": [],
"confidence": "HIGH",
"layers_run": [
"visual_forensics",
"content_validation",
"template_layout_matching",
"custom_ml_classifier"
],
"report_url": null
}Failed:
{
"verification_id": "uuid",
"status": "FAILED",
"message": "Verification failed. Please contact support.",
"refund_eligible": true
}Handles the browser callback after Squad sandbox payment and redirects the user to:
https://verifyng-three.vercel.app/results/{verification_id}
Handles server-side Squad webhook payloads and queues verification analysis.
Manual testing endpoint. Requires:
X-API-Key: <API_KEY>This endpoint is for integration testing only. The demo flow should use Squad payment/callback.
User
-> VerifyNG PWA on Vercel
-> FastAPI backend on Hugging Face Spaces
-> Squad checkout
-> Squad callback/webhook
-> Supabase database + storage
-> AI pipeline
-> /api/result polling
-> Result UI
- Failure-first design: failed downloads, missing files, timeouts, and bad IDs resolve to controlled statuses instead of hanging forever.
- Stateless API: FastAPI stores state in Supabase, so the app process can be restarted without losing jobs.
- Idempotency: payment records are keyed by Squad reference to avoid double processing.
- Backpressure: AI pipeline has a 90-second timeout to protect demo/runtime stability.
- Security: API keys and Squad keys are environment secrets, not frontend code.
- Maintainability: endpoint contracts are tested and documented.
- Observability: backend logs show payment initiation, callback, file upload, pipeline start, and pipeline completion/failure.
- Next.js
- TypeScript
- Tailwind CSS
- Axios
- React Dropzone
- React PDF
- PWA manifest/icons
- Vercel
- FastAPI
- Uvicorn
- Supabase database
- Supabase Storage
- Hugging Face Spaces
- Squad API
- Tesseract OCR
- OpenCV
- Pillow
- NumPy
verifyng/
|-- backend/
| |-- app/
| | |-- main.py
| | |-- verifications.py
| | |-- payments.py
| | |-- result.py
| | |-- webhook.py
| | |-- pipeline.py
| | |-- ocr.py
| | |-- ela.py
| | |-- content_validator.py
| | |-- ai_depth.py
| | |-- ml_model.py
| | |-- database.py
| |-- requirements.txt
| |-- Dockerfile
|-- web/
| |-- app/
| |-- components/
| |-- lib/
| |-- types/
| |-- public/
| |-- package.json
|-- tests/
|-- AI_TECHNICAL_DEPTH.md
|-- README.md
python -m venv venv
venv\Scripts\activate
pip install -r backend\requirements.txt
uvicorn backend.app.main:app --reloadRequired backend environment variables:
SUPABASE_URL=
SUPABASE_KEY=
SUPABASE_SERVICE_ROLE_KEY=
SUPABASE_STORAGE_BUCKET=certificates
SQUAD_API_URL=https://sandbox-api-d.squadco.com
SQUAD_API_KEY=
WEBHOOK_URL=https://olatunjitobi-verifyng-api.hf.space/api/payment/callback
FRONTEND_URL=https://verifyng-three.vercel.app
API_KEY=
cd web
npm install
npm run devRequired frontend environment variable:
NEXT_PUBLIC_BACKEND_URL=https://olatunjitobi-verifyng-api.hf.space/api
Run backend tests:
venv\Scripts\python.exe -m unittest discover -s tests -vCurrent backend coverage includes:
/api/verifyresponse contract- Squad amount in kobo
- Squad checkout response parsing
- payment callback queueing
- result endpoint states
- manual trigger authorization
- Supabase missing-row handling
- storage signed URL handling
- duplicate upload prevention
- AI pipeline download failures
- AI pipeline timeout handling
- OCR and template matching
- custom ML classifier behavior
Run frontend checks:
cd web
npm install
npm run lint
npm run buildUse this flow for judges:
- Open the PWA.
- Upload a certificate/result image.
- Click verify.
- Show Squad checkout.
- Complete payment in Squad sandbox.
- Return to the results page.
- Explain the AI layers while the result is processing.
- Show the final trust score, verdict, confidence, flags, and layers run.
- Run a second upload with a suspicious/fake document to show score contrast.
The strongest demo moment is the contrast:
Clean certificate -> higher score -> LIKELY AUTHENTIC / manual review
Tampered certificate -> lower score -> SUSPICIOUS / LIKELY FORGED
VerifyNG can start as a pay-per-check verification service and grow into a B2B verification infrastructure product.
| Segment | Offer | Revenue Path |
|---|---|---|
| Individuals and small employers | Single verification | N500 per check |
| SMEs and recruiters | Monthly verification bundle | Subscription |
| Universities and exam bodies | Bulk verification dashboard/API | Institutional contract |
| HR platforms | Verification API | Usage-based API pricing |
Every paid verification can flow through Squad.
- VerifyNG gives a risk score, not an absolute legal declaration.
- Low confidence or suspicious outputs should be manually reviewed.
- Uploaded documents are used for the requested verification workflow.
- Secrets stay in backend/Hugging Face/Supabase environment variables.
- The system is designed to fail closed: if analysis cannot complete, the job is
marked
FAILEDand the frontend can show a refund/support path.
- Olatunji Tobiloba - AI pipeline, backend, Supabase, Hugging Face deployment
- Fisayo Obadina - PWA frontend, upload flow, result experience
- Divine Aghulor - Squad API integration, payment callback/webhook flow
VerifyNG turns certificate verification into a fast, payment-gated AI workflow. Squad powers the transaction layer, FastAPI coordinates the verification job, Supabase stores the state and uploaded file, and the AI pipeline produces an explainable trust score. The result is a live product that fits the Proof of Life challenge: it verifies documents where fraud is common, uses AI as the core trust engine, integrates Squad as a necessary part of the workflow, and can scale into a real verification business.
No payment. No verification. Squad is the gatekeeper.