A civic clarity engine and issue reporting tool for the City of Kingston.
🏆 Built at QHacks 2026
🔗 Devpost: https://devpost.com/software/veritas-gbqc0h
🎥 Demo Video: https://youtu.be/sJOm-jkIVQA?si=msw0Yb2wF1ZL6zJ1
- RAG-Powered Q&A: Ask questions about city services with mandatory citations
- Issue Reporting: Report potholes, noise complaints, and other civic issues with photos and map locations
- AI-Assisted Triage: Automatic severity assessment and department routing
- Dashboard: Map and list views of all reported issues
- Multilingual Support: Available in English and French, with extensible i18n architecture
- Accessibility: Large text mode, high contrast, and dark mode
- Trust Layer: Tamper-evident audit logging with optional Solana blockchain anchoring
- Framework: Next.js 14 (App Router)
- Styling: Tailwind CSS + shadcn/ui
- Database: SQLite + Drizzle ORM
- AI: Google Gemini 1.5 Flash
- Maps: Leaflet + OpenStreetMap
- Blockchain: Solana devnet (optional)
- Node.js 18+
- A Gemini API key from Google AI Studio
-
Install dependencies:
npm install
-
Set up environment variables:
cp .env.example .env
Edit
.envand add your Gemini API key:GEMINI_API_KEY=your_gemini_api_key_here -
Seed the document database (for Q&A):
npm run seed:docs
-
Seed demo reports (optional):
npm run seed:reports
-
Start the development server:
npm run dev
veritas/
├── src/
│ ├── app/ # Next.js App Router pages
│ │ ├── page.tsx # Home page
│ │ ├── ask/ # Q&A interface
│ │ ├── report/ # Report submission
│ │ ├── dashboard/ # Reports dashboard
│ │ └── api/ # API routes
│ ├── components/ # React components
│ ├── lib/ # Core libraries
│ │ ├── db.ts # Database connection
│ │ ├── rag.ts # RAG pipeline
│ │ ├── gemini.ts # Gemini client
│ │ ├── triage.ts # AI triage
│ │ ├── audit.ts # Hash chain logging
│ │ └── solana.ts # Blockchain anchoring
│ └── data/ # Content and seed data
├── drizzle/ # Database schema
├── scripts/ # Seeding scripts
└── public/uploads/ # Uploaded photos
| Method | Endpoint | Purpose |
|---|---|---|
| POST | /api/ask |
RAG Q&A |
| POST | /api/reports |
Create report |
| GET | /api/reports |
List reports |
| GET | /api/reports/[id] |
Get single report |
| POST | /api/triage |
AI triage |
| POST | /api/upload |
Upload photo |
| POST | /api/translate |
Translate text |
| POST | /api/anchor |
Anchor hash to Solana |
To enable blockchain anchoring:
- Create a Solana devnet wallet
- Get devnet SOL from the faucet
- Add to
.env:SOLANA_PRIVATE_KEY=your_base58_private_key SOLANA_ENABLED=true
- Home page: Modern branding with two CTAs
- Q&A: Ask "When is my garbage day?" - see citations
- Multilingual: Toggle to French, ask same question
- Report: Submit a pothole with photo and map pin
- Triage: See AI-suggested severity and department
- Dashboard: View reports on map, use filters
- Accessibility: Toggle large text and high contrast
- "When is my garbage day?"
- "How do I report a pothole?"
- "What are the noise bylaw hours?"
- "How do I get a parking permit?"
MIT