DocuIntel
A live document extraction platform that I designed, built and deployed alone. Users name the fields they need, or let AI suggest them. The backend compiles those fields into a typed Pydantic model at runtime and hands it to the provider's native structured output, across six LLM providers, using the user's own encrypted key. People review and correct every record before export.
- Role
- Sole engineer, design to deployment
- Team
- Solo
- Timeline
- Nov 2025 – present
- Stack
- Next.js 16 · FastAPI · LangChain · Pydantic · Supabase · Cloud Run

Problem
Finance, legal and HR teams re-type values from invoices, contracts, resumes and tables. Template OCR fails when a vendor changes a layout, big document APIs only know fixed categories, and asking an LLM to 'return JSON' produces fences, missing keys and wrong types. A multi-user AI service also has to keep every user's API key isolated, and should not pay for everyone's inference.
Approach
Architecture
How the system fits together, in two views.
Decisions
- Runtime schemas over per-document modelsOver: Fixed extractors, free-form JSON promptsEvery user needs different fields. One code path serves any schema, with types enforced by the provider's own tool-calling or JSON-schema mode.Trade-offTypes are enforced, not correctness: a well-typed value can still be wrong, which is why a person reviews every record.
- Keys injected per requestOver: Global environment variablesEnvironment variables are process-wide, so concurrent users could overwrite each other's key. Constructor injection isolates each request and made adding providers trivial.
- No vector search in extractionOver: Chunk-and-retrieve RAGUsers want every value from the file they just uploaded, not similar chunks. Chunking can split a line item from its total; bounded uploads fit in a long-context window whole.
- A direct pipeline over the planned agent graphOver: LangGraph classifier with per-type extractorsUser-defined fields made document-type routing unnecessary, so the shipped system calls the model directly and keeps the human review step in the UI.Trade-offGave up automatic document-type routing and the planned automated confidence gate.
- Cloud Run and VercelOver: Render, Fly.io, RailwayCompared on cold starts, card requirements, RAM and cost. Cloud Run's free tier and scale-to-zero suit low, bursty traffic.
Technology
- Frontend
- Next.js 16, React 19, TypeScript, Tailwind CSS v4, shadcn/ui, Recharts
- Backend
- FastAPI, Python 3.11, Pydantic v2, pandas, pypdf, slowapi, uv
- AI
- LangChain across OpenAI, Anthropic, Gemini, Groq, Mistral and Cohere; LangSmith tracing
- Data & auth
- Supabase PostgreSQL, Auth, Storage, row-level security
- Security
- AES-256-GCM + PBKDF2 key storage, Cloudflare Turnstile, rate limits, upload sanitising
- Delivery
- Multi-stage Docker, Cloud Build → Cloud Run, Vercel, Cloudflare DNS, Resend SMTP
- Mobile
- SwiftUI, MVVM, Core Data
Outcome
Own product · 2025–2026Status
- PDF, Word, CSV, text, Markdown and image ingestion
- Manual schema builder and AI field suggestions (5–15 fields)
- Six-provider bring-your-own-key with encrypted storage
- Review grid with inline editing; CSV, JSON, XML and TXT export
- Templates, history, analytics and free-tier quotas
- Companion native iOS client (SwiftUI) on the same backend
- Salesforce and QuickBooks integrations (roadmap)
- Automatic document classification (early plan, dropped)
- Neo4j GraphRAG (experiments only, not user-facing)
My role
Built alone across both repositories, from product design to operations.
- Both extraction workflows: user-defined and AI-suggested fields
- FastAPI service, schema engine, loaders and CSV pipeline
- Next.js 16 app: review grid, export, analytics, landing page
- Supabase schema, migrations, RLS policies and quotas
- Key encryption, request isolation, upload hardening
- Native SwiftUI client
- Docker, Cloud Build CI/CD, Vercel, DNS and branded email


