Inspiration
Every year, people miss out on government benefits they actually qualify for — not because they're ineligible, but because the system around them is confusing. They don't know which benefit applies to their situation, which office to go to, how long they'll wait once they get there, or whether their paperwork is even ready. This hits first-time applicants, elderly citizens, and anyone unfamiliar with bureaucratic processes the hardest. We wanted to build something that turns "I don't know where to start" into "I'm approved."
What it does
CivicFlow AI lets a citizen describe their situation in plain language and guides them through the rest of the journey:
- Life Event Detection — free text like "I recently need childcare support" is classified into a benefit category using TF-IDF + Logistic Regression.
- Benefit Matching & Priority Ranking — eligibility is decided by transparent, deterministic rules (age, income, family size, employment) — never by the AI. A separate ML model only ranks the benefits a citizen has already qualified for.
- Queue / Wait-Time Prediction — predicts expected wait time and crowd level at nearby offices, shown on a live map.
- Document Readiness Check — OCR + a text classifier scan an uploaded document and flag missing paperwork before a citizen makes a trip.
How we built it
- Backend: FastAPI, SQLAlchemy, PostgreSQL, scikit-learn for the four ML models, Tesseract OCR for document scanning.
- Frontend: Next.js, React, Tailwind CSS, and Leaflet for the live service map.
- Deployment: Vercel (frontend) and Render (backend + database), both fully live.
Each ML model is trained on its own dedicated script with synthetic sample data, so the whole pipeline can be retrained and audited end-to-end.
Challenges we ran into
- Model/version drift between local and production. Our ML models were pickled with one scikit-learn version but loaded with another in production, which silently broke predictions until we rebuilt the training pipeline to match the deployed environment exactly.
- Keeping AI out of the actual eligibility decision. It was tempting to let the model "decide" who qualifies, but we deliberately kept that logic rule-based and deterministic, with AI only ranking and predicting — never gatekeeping.
- Wiring a multi-service deployment together (separate frontend and backend hosts, CORS, environment variables, trusted host configuration) under a tight timeline.
Accomplishments that we're proud of
A fully working, fully deployed, end-to-end AI pipeline — not just a local prototype — covering four distinct ML models behind one coherent citizen-facing experience.
What we learned
How much of "responsible AI" in a real product is architecture, not just model choice — deciding where the AI sits in the decision flow matters as much as how accurate it is.
What's next for CivicFlow AI
Real hospital/office search instead of a fixed demo list, more benefit programs and regions, and a case-worker view so humans can review and override AI-ranked priorities directly.
Built With
- fastapi
- joblib
- leaflet.js
- next.js
- pandas
- postgresql
- react
- render
- scikit-learn
- sqlalchemy
- tailwind-css
- tesseract-ocr
- vercel
Log in or sign up for Devpost to join the conversation.