Inspiration

In Vietnam, citizens must hand-deliver physical documents to government offices and wait 5–7 days with zero visibility into their status. Staff manually re-type handwritten content, classify documents by eye, and physically carry folders between departments. We wanted to show how AI can transform this painful process into something fast, transparent, and accessible.

What it does

CivicLens is a full-stack platform with two mobile apps and an AI-powered backend. Government staff scan physical documents with their phone camera; Qwen VL models extract Vietnamese handwritten text via OCR and automatically classify documents (birth certificates, IDs, complaints, etc.) into structured templates. Case-based dossiers bundle all required documents with intelligent slot validation — the AI verifies each uploaded document actually matches its assigned slot. Dossiers then route automatically through configurable department workflows with four-tier security classification. Meanwhile, citizens authenticate via VNeID and track their submissions through a real-time visual timeline with push notifications.

How we built it

Backend: Python 3.12, FastAPI, SQLAlchemy 2 (async), Celery for AI task queues, PostgreSQL 16 with Row-Level Security
AI Pipeline: Alibaba Cloud dashscope SDK — Qwen VL OCR for text extraction, Qwen 3.5 Flash for classification and template filling, Qwen3 VL Plus for vision-based slot validation
Mobile Apps: Flutter 3.24+ — separate staff and citizen apps sharing a common Dart API client package
Infrastructure: Docker Compose, Alibaba Cloud ECS + RDS + OSS + Redis, Terraform for reproducible deployment

Challenges we ran into

Our biggest challenge was making the entire experience feel seamless. Behind a simple mobile workflow, the system had to coordinate document capture, AI extraction, dossier completeness checks, citizen identity linking, and cross-department routing without overwhelming staff.
Another challenge was automatically linking ID documents to the right citizen account. We wanted staff to stop typing ID numbers manually, so we had to make the identity-linking flow reliable enough to find or create the right citizen record directly from scanned documents

Accomplishments that we're proud of

End-to-end AI pipeline: scan → OCR → classify → extract fields → validate slot match → route — all automated with human-in-the-loop override
Auto-citizen-linking: when a CCCD (national ID card) is scanned, the system automatically extracts the ID number via OCR and links the citizen to the dossier — no manual data entry needed
Real-time citizen tracking with VNeID authentication and push notifications
Four-tier security classification (Unclassified → Top Secret) enforced at database level with PostgreSQL RLS

What we learned

AI works best as an assistant, not a replacement — every AI decision in our system can be overridden by staff. We also learned that government workflows need extreme flexibility: every district has slightly different processes, so our configurable case-type + routing-step system was essential.

What's next for CivicLens

Offline-first scanning with background sync for rural areas with poor connectivity
Multi-language OCR support for ethnic minority documents
Analytics dashboard for department heads to track processing times and bottlenecks
Integration with Vietnam's real VNeID identity platform

Built With

Share this project:

Updates

Submission history