This is an in-house document validation tool built for Corgi Insurance, an AI-powered insurance provider for renters and startups. Created during the Corgi Hackathon on Wesley's machine (since Kent forgot his laptop 🧠), this tool streamlines policy intake by filtering out low-quality document submissions in-browser.
- 📄 Accepts PDF or image uploads of rental insurance policies
- 🔍 Runs client-side OCR using
Tesseract.jsandpdfjs-dist - 🧠 Uses regex to validate key required fields:
- Tenant Liability
- Insured Party
- Insured Address
- Insurance Carrier
- Policy Code
- ✅ If most fields are matched, sends to Google Gemini for final PII check
- ❌ If not, it prompts for a clearer re-upload or manual field entry
- No server needed — 100% client-side validation
- Automatically calculates a confidence score out of 100%
- Allows drag-and-drop uploads or camera photo capture
- Friendly UI that adapts based on result confidence
- Manual field entry fallback for missing data
- Gemini API integration for final doc verification
- React.js (CRA)
- Tesseract.js
- pdfjs-dist
- Google Gemini API (
v1beta)
"tesseract.js": "^4.1.1",
"pdfjs-dist": "^3.4.120",
"react": "^18.2.0",
"react-scripts": "5.0.1"git clone https://github.com/yourusername/corgi-policy-uploader
cd corgi-policy-uploader
npm install
npm start
Make sure to set REACT_APP_GEMINI_API_KEY in your environment or replace it in the file if testing locally.
- Built in < 24 hours at the Corgi Hackathon
- Coded entirely on Wesley's laptop
- No AI was used for field detection — just regex + OCR
- Only used AI (Gemini) at the final step for optional PII checks
- 🥂 This was part of a YC AI Startup School After Party, hosted on the night of June 16 and lasted into the 17th
