Inspiration

Organizations work with large volumes of documents containing claims, declarations, policies, and supporting evidence. Reviewing these documents manually can be time-consuming, and simply asking an AI model to summarize them does not guarantee that the claims are actually supported by evidence.

I wanted to build a system that goes beyond summarization — a platform that can analyze documents, verify claims against available evidence, identify compliance risks, and produce reports that people can understand and investigate.

That idea became VerityAI.

What is VerityAI?

VerityAI is an AI-powered document verification and compliance intelligence platform that transforms uploaded documents into structured, traceable verification reports.

Users can upload documents, analyze extracted claims, review supporting evidence, identify gaps and risks, and access a detailed report with downloadable PDF delivery.

The central principle behind VerityAI is simple: AI can explain the results, but evidence and deterministic verification must remain the source of truth.

How I built it

I built VerityAI using a modular architecture with a Python FastAPI backend, React and TypeScript frontend, and PostgreSQL database.

The workflow consists of several stages:

  1. Document submission: Users upload documents for analysis.
  2. AI-powered claim extraction: Google Gemini extracts structured claims from submitted documents.
  3. Evidence retrieval: The verification engine searches for supporting evidence associated with each claim.
  4. Deterministic verification: Claims are evaluated using the application's evidence and policy logic rather than allowing an AI model to decide verification outcomes.
  5. Report generation: VerityAI creates a structured report containing findings, verification results, and evidence references.
  6. PayPal integration: Users can purchase access to the detailed report through PayPal Sandbox checkout. The backend verifies payment capture before granting report access.
  7. Gemini detailed reporting: After successful payment, Gemini generates an expanded narrative with an executive summary, claim-by-claim analysis, risk assessment, methodology, and recommendations.
  8. PDF delivery: The detailed report is available on the website and as a downloadable PDF.

What makes VerityAI different?

VerityAI separates AI-generated explanations from authoritative verification results.

Gemini helps extract claims and communicate complex findings in a readable way. However, verification statuses, evidence references, policy outcomes, and findings remain controlled by the deterministic backend.

This separation helps reduce the risk of AI-generated explanations changing the underlying verification results.

The platform also connects the verification workflow to a real payment experience using PayPal Sandbox. Detailed reports are unlocked only after backend-side payment verification, rather than trusting a frontend success message.

Challenges I faced

One of the biggest challenges was getting reliable structured output from Gemini. I had to handle schema validation, source-span preservation, provider errors, timeouts, and structured response parsing.

Another challenge was implementing PayPal Orders v2 correctly. Payment approval and payment capture are different stages, so the backend needed to verify the actual capture response, amount, currency, and order before granting access. I also addressed retries and idempotency to avoid duplicate entitlements.

Building secure report access was another important challenge. Report content and PDF downloads needed tenant-scoped authorization and active entitlement checks.

Finally, I worked on generating professional PDF reports while preserving the original deterministic verification results.

What I learned

Building VerityAI taught me that integrating AI into a real application requires much more than connecting an API.

I learned the importance of structured outputs, deterministic business logic, database integrity, secure payment verification, tenant isolation, automated testing, and handling unreliable external services.

Most importantly, I learned that trustworthy AI systems should make their results explainable and traceable rather than asking users to blindly trust generated answers.

Technology Stack

  • Backend: Python, FastAPI, SQLAlchemy, Pydantic
  • Frontend: React, TypeScript, Vite
  • Database: PostgreSQL
  • AI: Google Gemini API and Google GenAI SDK
  • Payments: PayPal Sandbox, Orders v2 API
  • Reports: PDF generation and private report artifact storage
  • Testing: Pytest, Vitest

Future Scope

VerityAI can be extended with production payment processing, PayPal webhooks, background report generation, cloud-based document storage, additional document formats, and integrations with external compliance and evidence sources.

The long-term goal is to make document verification more transparent, traceable, and accessible through a combination of AI and evidence-driven automation.

Built With

Share this project:

Updates

posted an update —

VerityAI is built!

I'm excited to share VerityAI, my project for the PayPal AI Hackathon 2026.

VerityAI combines Google Gemini and PayPal to make document verification and compliance reporting smarter and more transparent.

What I've built:

  • AI-powered claim extraction using Google Gemini.
  • Evidence-based document verification.
  • Deterministic compliance and risk evaluation.
  • PayPal Sandbox payment integration.
  • AI-generated detailed reports with downloadable PDFs.

Building this project was a great learning experience. I worked across the full stack, tackled real-world integration challenges, and learned how to combine generative AI with reliable backend verification.

A big milestone: successfully testing the complete workflow from document analysis to PayPal payment and Gemini-powered PDF report generation!

I'd love to hear your feedback.

PayPalAIHackathon #VerityAI #GoogleGemini #ArtificialIntelligence #Innovation

Submission history