TL;DR
Open Permit started as AFOG — a prototype built in 10 hours at a Mumbai hackathon. It used Google Gemini to ingest planning permits and generate legally-sound objection letters with proper citations. After winning the hackathon, it was accepted into the AARC Pre-Accelerator in Bangalore, rebranded, and expanded to 8+ countries. It now holds 200+ permits, 40 legal frameworks, and a funder database of 197 contacts.
The Problem
Communities lose battles against harmful development proposals — factory farms, polluting facilities, questionable zoning changes — not because they lack passion, but because they lack legal firepower. The advocacy pipeline is fundamentally broken.
Cost Barrier
Hiring lawyers to draft objection letters costs thousands per permit. NGOs with limited budgets can't scale this.
Time Barrier
Permit objection windows are often 21 days. Legal drafting takes weeks. The math doesn't work.
Knowledge Barrier
Legal citations vary by jurisdiction. What's valid in India differs from the UK, Ireland, or Australia.
Scale Barrier
NGOs can't monitor every permit in every region. Coverage is spotty. Bad actors exploit the gaps.
Origin: Code4Compassion Mumbai (10 Hours)
Built at the Code4Compassion hackathon in Mumbai, hosted by Open Paws and Electric Sheep. The original prototype — called AFOG (Automated Factory Farm Objection Generator) — was scoped tightly: ingest a planning permit, run it through Gemini, generate a letter, export it.
Ingest Permit Document
Upload PDF or paste permit text. Pipeline extracts key fields: location, type, applicant, deadline.
Gemini Analysis
Google Gemini processes the permit against the relevant legal framework, identifying objection grounds and applicable statutes.
Generate Objection Letter
Produces a legally-structured objection letter with jurisdiction-specific citations, formatted for the relevant planning authority.
Export and Submit
Download as PDF or Word. Recipient routing suggests the correct authority inbox based on permit type and location.
"We won the hackathon. The real question: could this scale beyond factory farms, beyond India, beyond a demo?"
Scaling Through AARC Pre-Accelerator
Open Permit was accepted into the AARC Pre-Accelerator in Bangalore. The rebrand from AFOG to Open Permit reflected reality: the technology was jurisdiction-agnostic and could handle any government permit. The name needed to reflect that broader civic intelligence vision.
Technical Architecture
Frontend → Next.js (TypeScript) — Vercel deployment Backend → Express.js API — Railway hosting Data Layer → Supabase (PostgreSQL) — permits, legal frameworks, users AI Layer → Google Gemini — permit analysis, letter generation, multi-lang NLP
Monorepo Structure
Frontend and backend live in the same repo under /apps. Shared types via a /packages/common workspace.
Graceful AI Degradation
If Gemini API is unavailable, the system falls back to template-based generation using pre-loaded legal frameworks.
Access Control
Supabase Row Level Security enforces per-user permit access. Admin panel gated behind role claims.
Legal Framework Store
40 jurisdiction-specific legal frameworks stored as structured JSON. Each includes applicable statutes, citation formats, and authority routing rules.
Claude Code's Role
Codebase Development
The entire Next.js + Express stack was built and iterated through Claude Code sessions — permit ingestion pipeline, Gemini integration, recipient routing system.
Pitch & Funder Materials
Every AARC Demo Day pitch deck iteration, the SFF grant framing, and funder database structure were developed through Claude Code.
Data Pipeline
CSV work for permit normalization, funder contacts, Brevo campaign structuring, and bulk recipient routing all ran through Claude Code sessions.
Legal Framework Expansion
Each new country's framework — researching jurisdiction requirements, drafting templates, validating citation formats — goes through Claude Code before entering the platform.
What's Next
- Infrastructure migration to Yotta (Indian sovereign cloud) following Supabase India block
- ALPN partnership for India-specific permit tracking and routing
- Expand to 15+ countries with dedicated legal framework parsers
- Automated permit detection pipeline — proactive monitoring, not just reactive generation
- NGO dashboard with bulk permit tracking and campaign management
- SFF grant application for sustainability-focused civic infrastructure funding
Key Lesson
Civic tech doesn't need to be slow, bureaucratic, or expensive to build. A 10-hour hackathon proved the core technology works. AARC proved it could scale. The constraint wasn't the code — it was building the legal framework library and reaching the right NGOs. Claude Code handled the code. The domain work was the real leverage.