0xarchit commited on
Commit
53be399
Β·
1 Parent(s): 71638d4

refactor readme.md

Browse files
Files changed (2) hide show
  1. .github/workflows/docker-publish.yml +1 -1
  2. README.md +493 -41
.github/workflows/docker-publish.yml CHANGED
@@ -55,7 +55,7 @@ jobs:
55
  type=semver,pattern={{version}}
56
  type=semver,pattern={{major}}.{{minor}}
57
  type=semver,pattern={{major}}
58
- type=sha,prefix={{branch}}-
59
  type=raw,value=latest,enable={{is_default_branch}}
60
 
61
  - name: Build and push Docker image
 
55
  type=semver,pattern={{version}}
56
  type=semver,pattern={{major}}.{{minor}}
57
  type=semver,pattern={{major}}
58
+ type=sha,prefix=sha-
59
  type=raw,value=latest,enable={{is_default_branch}}
60
 
61
  - name: Build and push Docker image
README.md CHANGED
@@ -1,8 +1,8 @@
1
  ---
2
- title: citytrack
3
- emoji: πŸŒ†
4
- colorFrom: green
5
- colorTo: blue
6
  sdk: docker
7
  app_port: 7860
8
  pinned: true
@@ -10,76 +10,517 @@ pinned: true
10
 
11
  # CityTrack
12
 
13
- > **Governance at the Speed of Software**
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
 
15
- CityTrack is an AI-powered urban issue reporting and management platform that transforms how cities handle infrastructure problems. Citizens report issues with AI validation, and autonomous agents route them to the right departments in real-time.
 
16
 
17
- ## Quick Overview
18
 
19
- **The Problem:** Traditional city issue reporting systems are slow, manual, and prone to duplicates.
 
 
20
 
21
- **The Solution:** CityTrack uses AI agents to instantly validate, deduplicate, and intelligently route urban issuesβ€”turning citizens into real-time sensors for city infrastructure.
 
 
22
 
23
- ## Key Features (MVP)
24
 
25
- - πŸ“Έ **Live Camera Capture:** Mandatory camera verification to prevent fake reports
26
- - πŸ“ **GPS Validation:** High-precision location data (< 10m accuracy)
27
- - πŸ€– **AI Issue Classification:** Automatic detection of potholes, debris, and damaged infrastructure
28
- - πŸ”„ **Smart Deduplication:** Groups similar reports and prevents redundant tickets
29
- - πŸ‘· **Worker Dashboard:** Task list with instant notifications and routing
30
- - πŸ“± **Citizen Tracking:** Real-time updates on report status
31
 
32
- ## Getting Started
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33
 
34
  ### Prerequisites
 
35
  - Node.js 20+
36
  - Python 3.11+
37
  - Docker & Docker Compose
38
- - PostgreSQL with PostGIS extension
 
39
 
40
  ### Installation
41
 
42
  ```bash
 
43
  git clone https://github.com/0xarchit/CityTrack.git
44
  cd CityTrack
45
 
46
- docker-compose up -d
 
 
47
 
 
 
48
  npm install
49
- pip install -r requirements.txt
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
50
  ```
51
 
52
  ### Running the Project
53
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
54
  ```bash
55
- docker-compose up
 
 
 
 
56
 
57
- npm run dev # Frontend
58
- python main.py # Backend
59
  ```
60
 
61
- ## Tech Stack
 
 
 
 
 
 
 
 
 
 
 
 
 
62
 
63
- - **Backend:** FastAPI, Python, SQLAlchemy, PostgreSQL
64
- - **Frontend:** Next.js, Tailwind CSS
65
- - **Mobile:** React Native, Expo
66
- - **AI/ML:** YOLOv8 (Issue Detection)
67
- - **Authentication:** Supabase
68
- - **Infrastructure:** Docker
69
 
70
- ## The Autonomous Pipeline
 
 
 
 
 
71
 
72
- 1. **Vision Agent** β†’ Validates and classifies uploaded images
73
- 2. **Geo-Dedup Agent** β†’ Merges duplicate reports in the same area
74
- 3. **Priority Agent** β†’ Assigns urgency levels based on context
75
- 4. **Routing Agent** β†’ Matches issues to departments and workers
76
- 5. **Notification Agent** β†’ Sends updates to all stakeholders
77
 
78
- ## Contributing
79
 
80
- We welcome contributions! Please read [CONTRIBUTING.md](.github/CONTRIBUTING.md) for details on our code of conduct and the process for submitting pull requests.
 
 
 
 
81
 
82
- ## Team
 
 
 
 
 
 
 
 
83
 
84
  Built by **BitBots** at IIIT Una, HackTheThrone 2026
85
 
@@ -90,6 +531,17 @@ Built by **BitBots** at IIIT Una, HackTheThrone 2026
90
  | Developer | Pushpendra Sharma | [@synapticpush](https://github.com/synapticpush) |
91
  | Developer | Deepti Yadav | [@DeeptiYadav10648](https://github.com/DeeptiYadav10648) |
92
 
93
- ## License
 
 
 
 
 
 
 
 
 
 
 
94
 
95
- This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
 
1
  ---
2
+ title: CityTrack
3
+ emoji: πŸ™οΈ
4
+ colorFrom: blue
5
+ colorTo: green
6
  sdk: docker
7
  app_port: 7860
8
  pinned: true
 
10
 
11
  # CityTrack
12
 
13
+ ```text
14
+ ______ _ _ _______ _
15
+ / _____(_) | |__ __| | |
16
+ | | _| |_ _ _ | |_ __ __ _ ___ | | _____ _ __
17
+ | | | | __| | | | | | '__/ _` |/ __|| |/ / _ \ '__|
18
+ | |_____ | | |_| |_| | | | | | (_| | (__ | < __/ |
19
+ \______||_|\__|\__, | |_|_| \__,_|\___||_|\_\___|_|
20
+ _/ |
21
+ |___/
22
+ ```
23
+
24
+ <div align="center">
25
+
26
+ ![Repo Size](https://img.shields.io/github/repo-size/0xarchit/CityTrack?style=for-the-badge&color=2ecc71)
27
+ ![Last Commit](https://img.shields.io/github/last-commit/0xarchit/CityTrack?style=for-the-badge&color=3498db)
28
+ ![Issues](https://img.shields.io/github/issues/0xarchit/CityTrack?style=for-the-badge&color=e74c3c)
29
+ ![Pull Requests](https://img.shields.io/github/issues-pr/0xarchit/CityTrack?style=for-the-badge&color=9b59b6)
30
+
31
+ </div>
32
+
33
+ **"Governance at the Speed of Software."**
34
+
35
+ ## ❏ Overview
36
+
37
+ CityTrack is an autonomous, event-driven operating system for smart cities that transforms civil infrastructure maintenance from reactive to proactive. Unlike traditional 311 systems that rely on manual triage, CityTrack leverages AI agents to instantly detect, validate, and route urban issues - such as potholes, illegal dumping, and damaged signage - without human fatigue or bias. By using citizens as real-time sensors and autonomous agents as the nervous system, CityTrack ensures city-scale, self-healing infrastructure.
38
+
39
+ ## ❏ System Internals: The "Issue Packet"
40
+
41
+ Every interaction in CityTrack starts with an **Issue Packet** - an immutable, atomic unit of civic data.
42
+
43
+ **Components:**
44
+ - **Evidence:** Primary visual proof (Image/Video) captured via mandatory live camera
45
+ - **Context:** High-precision GPS (less than 10m accuracy), Compass Heading, and Device Metadata
46
+ - **Intent:** User-provided description, enhanced by NLP
47
+
48
+ ### Anti-Fraud Enforcement
49
+
50
+ CityTrack implements a "Spot-Check" protocol to ensure data integrity at the source:
51
+
52
+ 1. **Live Camera Only:** The mobile app restricts gallery access. Users MUST capture photos live, preventing the repurposing of old or internet images.
53
+ 2. **GPS Precision Lock:** Submission is blocked unless GPS accuracy is better than 10 meters.
54
+ 3. **Identity Binding:** All reports are cryptographically linked to a verified Google Identity (Supabase Auth).
55
+
56
+ ## ❏ The Problem
57
+
58
+ Traditional urban governance is plagued by:
59
+
60
+ - **Manual Bottlenecks:** Every report sits in a queue waiting for human categorization
61
+ - **Redundancy:** Multiple citizens report the same issue, creating duplicate tickets and wasting resources
62
+ - **Data Black Holes:** Citizens rarely receive feedback on their reports, leading to civic frustration
63
+ - **Subjective Prioritization:** Urgent issues on main roads are often treated the same as minor issues in quiet alleys
64
+
65
+ ## ❏ The Solution: CityTrack
66
+
67
+ CityTrack introduces the **"Issue Packet"** - an immutable unit of data containing visual evidence, GPS metadata, and intent. This packet triggers an autonomous chain reaction across a specialized agent pipeline.
68
+
69
+ ### System Architecture
70
+
71
+ ```mermaid
72
+ graph TD
73
+ A[Citizen Mobile App] -->|Issue Packet| B[FastAPI Backend]
74
+ B --> C[Event Bus]
75
+
76
+ subgraph "Autonomous Agent Pipeline"
77
+ C --> D[Vision Agent]
78
+ D -->|Annotated Data| E[Geo-Deduplicate Agent]
79
+ E -->|Clustered Info| F[Priority Agent]
80
+ F -->|Urgency Level| G[Routing Agent]
81
+ G -->|Assignment| H[Notification Agent]
82
+ end
83
+
84
+ H --> I[Worker Dashboard]
85
+ H --> J[Admin Portal]
86
+ H --> K[Citizen Updates]
87
+
88
+ subgraph "Data Layer"
89
+ L[(PostgreSQL)]
90
+ M[(Supabase Storage)]
91
+ end
92
+
93
+ D -.-> M
94
+ E -.-> L
95
+ ```
96
+
97
+ ## ❏ The Autonomous Pipeline
98
+
99
+ The system acts as a nervous system where agents react to the "Issue Packet" in real-time.
100
+
101
+ ### Stage 1: The Senses (Input & Validation)
102
+
103
+ **Vision Agent: The "Eyes"**
104
+ - Uses a fine-tuned YOLOv8s model to scan incoming images
105
+ - **Rejection:** Automatically discards irrelevant images (e.g., selfies, blurry photos)
106
+ - **Classification:** Identifies defects (Pothole, Debris, Graffiti) with confidence scores
107
+
108
+ **Geo-Temporal Deduplication Agent: The "Memory"**
109
+ - **Clustering:** Uses bounding box queries and haversine distance calculation to find similar reports within X meters and Y hours
110
+ - **Merging:** Instead of creating duplicates, it merges reports into a single "Cluster", increasing its urgency score
111
+
112
+ ### Stage 2: The Brain (Decision Making)
113
+
114
+ **Priority Agent: The "Judge"**
115
+ - **Context Awareness:** Combines Vision Confidence + Location Context (e.g., "Near School") + Repeat Count
116
+ - **SLA Setting:** Assigns dynamic deadlines (e.g., 4 hours for Critical)
117
 
118
+ **Routing Agent: The "Dispatcher"**
119
+ - **Logic:** Matches issue category to Department (Roads vs Sanitation) and assigns to specific workers based on geolocation and load
120
 
121
+ ### Stage 3: The Enforcers (Execution)
122
 
123
+ **SLA Watchdog Agent: The "Timekeeper"**
124
+ - **AI Monitoring:** Analyzes the context of delayed issues, not just the timer
125
+ - **Escalation:** Triggers warnings at 50% and 20% remaining time
126
 
127
+ **Notification Agent: The "Messenger"**
128
+ - **Omnichannel:** Pushes updates to the Citizen (App) and Worker (Task List) simultaneously
129
+ - **Email Notifications:** Sends email notifications to respective stakeholders
130
 
131
+ ## ❏ Client Ecosystem
132
 
133
+ ### 1. Citizen Mobile App (The Sensors)
134
+ *Built with React Native + Expo (TypeScript)*
 
 
 
 
135
 
136
+ - **Offline-First:** Caches reports locally and syncs when connection returns (Beta)
137
+ - **Real-Time Tracking:** Server-driven events update the "Processing" screen live as agents complete their tasks
138
+ - **Gamification:** Civic points for verified reports (Planned)
139
+
140
+ ### 2. Admin Command Center (The Control)
141
+ *Built with Next.js 16 (App Router) + Tailwind CSS*
142
+
143
+ - **Role-Based Access Control (RBAC):**
144
+ - Super Admin: System configuration
145
+ - Department Admin: Department-level oversight
146
+ - Worker Dashboard: Task submission and resolution
147
+ - **Visual Intelligence:** Heatmaps and density plots to identify crumbling infrastructure zones
148
+
149
+ ### 3. Worker Interface (The Hands)
150
+ *Mobile-First Web View*
151
+
152
+ - **Task List:** Simple, priority-sorted list of jobs
153
+ - **Navigation:** One-tap deep link to Google Maps
154
+ - **Proof of Resolution:** Workers cannot close a ticket without uploading a photo. The Vision Agent verifies this photo against the original to confirm the fix.
155
+
156
+ ## ❏ Technical Architecture
157
+
158
+ ### Modular Monolith Structure
159
+
160
+ The codebase is structured to scale from a Monolith to Microservices easily.
161
+
162
+ ```text
163
+ /
164
+ β”œβ”€β”€ Backend/ # The Core Logic (FastAPI + Async SQLAlchemy)
165
+ β”‚ β”œβ”€β”€ agents/ # The Brain: 7 Autonomous Agents
166
+ β”‚ β”‚ β”œβ”€β”€ vision/ # Vision Agent (YOLOv8)
167
+ β”‚ β”‚ β”œβ”€β”€ geoDeduplicate/ # Geo-Temporal Deduplication
168
+ β”‚ β”‚ β”œβ”€β”€ priority/ # Priority Assignment
169
+ β”‚ β”‚ β”œβ”€β”€ routing/ # Department & Worker Routing
170
+ β”‚ β”‚ β”œβ”€β”€ sla/ # SLA Monitoring & Watchdog
171
+ β”‚ β”‚ β”œβ”€β”€ escalation/ # Escalation Management
172
+ β”‚ β”‚ └── notification/ # Omnichannel Notifications
173
+ β”‚ β”œβ”€β”€ api/ # Stateless REST Endpoints
174
+ β”‚ β”‚ └── routes/ # Admin, Worker, Issue Routes
175
+ β”‚ β”œβ”€β”€ core/ # Shared Infrastructure
176
+ β”‚ β”‚ β”œβ”€β”€ config.py # Configuration Management
177
+ β”‚ β”‚ β”œβ”€β”€ events.py # Event Bus System
178
+ β”‚ β”‚ β”œβ”€β”€ flow_tracker.py # Pipeline Orchestration
179
+ β”‚ β”‚ └── schemas.py # Pydantic Models
180
+ β”‚ β”œβ”€β”€ database/ # Database Layer
181
+ β”‚ β”‚ β”œβ”€β”€ models.py # SQLAlchemy Models
182
+ β”‚ β”‚ β”œβ”€β”€ connection.py # DB Connection Pool
183
+ β”‚ β”‚ └── migrations/ # SQL Migrations
184
+ β”‚ β”œβ”€β”€ orchestration/ # Agent Base Classes & Workflow Managers
185
+ β”‚ └── services/ # External Services
186
+ β”‚ β”œβ”€β”€ email.py # Email Service
187
+ β”‚ β”œβ”€β”€ geocoding.py # Geocoding Service
188
+ β”‚ └── vision.py # Vision Processing
189
+ β”œβ”€β”€ User/ # Citizen Mobile App (Expo/React Native)
190
+ β”‚ β”œβ”€β”€ src/
191
+ β”‚ β”‚ β”œβ”€β”€ screens/ # App Screens
192
+ β”‚ β”‚ β”œβ”€β”€ components/ # Reusable Components
193
+ β”‚ β”‚ β”œβ”€β”€ services/ # API Services
194
+ β”‚ β”‚ └── navigation/ # Navigation Setup
195
+ β”‚ └── android/ # Android Build Configuration
196
+ β”œβ”€β”€ Frontend/ # Admin & Worker Portals (Next.js 16)
197
+ β”‚ β”œβ”€β”€ app/ # App Router Pages
198
+ β”‚ β”‚ β”œβ”€β”€ admin/ # Admin Dashboard
199
+ β”‚ β”‚ β”œβ”€β”€ worker/ # Worker Dashboard
200
+ β”‚ β”‚ └── user/ # Citizen Portal
201
+ β”‚ └── components/ # Shared Components
202
+ └── static/ # Static page for agentic pipeline preview
203
+ └── requestly/ # Requestly export file for requestly api testing
204
+ ```
205
+
206
+ ## ❏ Technology Stack
207
+
208
+ ### Backend
209
+ - **Framework:** FastAPI (Python 3.11+)
210
+ - **ORM:** SQLAlchemy 2.0 (Async)
211
+ - **Database:** PostgreSQL 18
212
+ - **Geospatial:** Haversine distance calculation for coordinate-based queries
213
+ - **Task Queue:** Background tasks with FastAPI BackgroundTasks
214
+ - **Authentication:** Supabase Auth
215
+
216
+ ### AI/ML
217
+ - **Vision Model:** YOLOv8s (Fine-tuned for urban defects)
218
+ - **Training:** Custom dataset of 2000+ labeled urban issue images
219
+ - **Inference:** Real-time on CPU with optimized preprocessing
220
+
221
+ ### Frontend
222
+ - **Web Framework:** Next.js 16 (App Router)
223
+ - **Styling:** Tailwind CSS
224
+ - **State Management:** React Hooks + Context API
225
+ - **Data Fetching:** Native Fetch API with caching
226
+
227
+ ### Mobile
228
+ - **Framework:** React Native with Expo SDK 54
229
+ - **Language:** TypeScript
230
+ - **Navigation:** React Navigation
231
+ - **Storage:** Async Storage + Expo Secure Store
232
+
233
+ ### Infrastructure
234
+ - **Authentication:** Supabase Auth (Google OAuth)
235
+ - **Storage:** Supabase Storage (Image uploads)
236
+ - **Deployment:** Docker + Docker Compose
237
+ - **CI/CD:** GitHub Actions
238
+ - **Container Registry:** GitHub Container Registry (GHCR)
239
+
240
+ ## ❏ Getting Started
241
 
242
  ### Prerequisites
243
+
244
  - Node.js 20+
245
  - Python 3.11+
246
  - Docker & Docker Compose
247
+ - PostgreSQL 15+
248
+ - Android SDK (for mobile development)
249
 
250
  ### Installation
251
 
252
  ```bash
253
+ # Clone the repository
254
  git clone https://github.com/0xarchit/CityTrack.git
255
  cd CityTrack
256
 
257
+ # Backend Setup
258
+ cd Backend
259
+ pip install -r requirements.txt
260
 
261
+ # Frontend Setup
262
+ cd ../Frontend
263
  npm install
264
+
265
+ # Mobile App Setup
266
+ cd ../User
267
+ npm install
268
+ ```
269
+
270
+ ### Environment Configuration
271
+
272
+ Create `.env` files in respective directories:
273
+
274
+ **Backend/.env**
275
+ ```env
276
+ # Database Configuration
277
+ DATABASE_URL=postgresql://user:password@localhost:5432/citytrack
278
+
279
+ # Supabase Configuration
280
+ SUPABASE_URL=your_supabase_url
281
+ SUPABASE_KEY=your_supabase_service_role_key
282
+ SUPABASE_BUCKET=your_bucket_name
283
+ SUPABASE_JWT_SECRET=your_jwt_secret
284
+
285
+ # Supabase S3 Storage Configuration
286
+ SUPABASE_S3_ENDPOINT=your_s3_endpoint
287
+ SUPABASE_S3_REGION=your_s3_region
288
+ SUPABASE_S3_ACCESS_KEY=your_s3_access_key
289
+ SUPABASE_S3_SECRET_KEY=your_s3_secret_key
290
+
291
+ # Google OAuth Configuration
292
+ GOOGLE_CLIENT_ID=your_google_client_id
293
+ PROJECT_ID=your_google_project_id
294
+ GOOGLE_CLIENT_SECRET=your_google_client_secret
295
+
296
+ # Email Configuration
297
+ SENDER_EMAIL=noreply@yourdomain.com
298
+ ADMIN_EMAIL=admin@yourdomain.com
299
+ RESEND_API_KEY=your_resend_api_key
300
+
301
+ # AI/ML Configuration
302
+ GEMINI_API_KEY=your_gemini_api_key
303
+ ```
304
+
305
+ **Frontend/.env.local**
306
+ ```env
307
+ # API Configuration
308
+ NEXT_PUBLIC_API_URL=http://localhost:8000
309
+
310
+ # Supabase Configuration
311
+ NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
312
+ NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
313
+ ```
314
+
315
+ **User/.env**
316
+ ```env
317
+ # API Configuration
318
+ EXPO_PUBLIC_API_BASE_URL=http://localhost:8000
319
+
320
+ # Supabase Configuration
321
+ EXPO_PUBLIC_SUPABASE_URL=your_supabase_url
322
+ EXPO_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
323
+
324
+ # Google OAuth Configuration
325
+ EXPO_PUBLIC_GOOGLE_CLIENT_ID=your_google_client_id
326
  ```
327
 
328
  ### Running the Project
329
 
330
+ **Using Docker (Recommended):**
331
+ ```bash
332
+ docker compose up
333
+ ```
334
+
335
+ **Manual Setup:**
336
+ ```bash
337
+ # Terminal 1 - Backend
338
+ cd Backend
339
+ uvicorn api.app:app --host 0.0.0.0 --port 8000 --reload
340
+
341
+ # Terminal 2 - Frontend
342
+ cd Frontend
343
+ npm run dev
344
+
345
+ # Terminal 3 - Mobile App
346
+ cd User
347
+ npm start
348
+ ```
349
+
350
+ ### Building for Production
351
+
352
+ **Backend Docker Image:**
353
+ ```bash
354
+ docker build -t citytrack-backend .
355
+ ```
356
+
357
+ **Frontend:**
358
+ ```bash
359
+ cd Frontend
360
+ npm run build
361
+ npm start
362
+ ```
363
+
364
+ **Mobile App (Android):**
365
+ ```bash
366
+ cd User/android
367
+ ./gradlew assembleRelease
368
+ ```
369
+
370
+ ## ❏ Key Features
371
+
372
+ ### Core Functionality
373
+ - ❏ **Anti-Fraud Reporting:** Mandatory live camera and high-precision GPS lock to prevent fake reports
374
+ - ❏ **AI-Powered Validation:** Automatic classification and spam detection using YOLOv8
375
+ - ❏ **Smart Deduplication:** Geospatial clustering to merge similar reports
376
+ - ❏ **Dynamic Priority Assignment:** Context-aware urgency levels with SLA enforcement
377
+ - ❏ **Intelligent Routing:** Automatic department and worker assignment
378
+ - ❏ **Real-Time Tracking:** Live progress updates for citizens
379
+ - ❏ **Proof of Resolution:** Workers must upload "After" photos to close tickets
380
+
381
+ ### Admin Features
382
+ - ❏ **Geospatial Heatmaps:** Visual density plots to identify problem areas
383
+ - ❏ **Department Management:** Create and manage city departments
384
+ - ❏ **Worker Administration:** Onboard and assign workers to departments
385
+ - ❏ **Manual Review Queue:** Review AI decisions and provide feedback
386
+ - ❏ **Analytics Dashboard:** Real-time metrics and historical trends
387
+
388
+ ### Worker Features
389
+ - ❏ **Priority Task List:** Auto-sorted by urgency and proximity
390
+ - ❏ **One-Tap Navigation:** Direct integration with Google Maps
391
+ - ❏ **Evidence Upload:** Mandatory before-and-after photo comparison
392
+ - ❏ **Task History:** Complete audit trail of resolved issues
393
+
394
+ ## ❏ Agent Pipeline Details
395
+
396
+ ### Input & Validation Layer
397
+
398
+ **Vision Agent**
399
+ - Scans images using fine-tuned YOLOv8 model
400
+ - Detects objects: potholes, garbage, debris, damaged infrastructure
401
+ - Rejects spam: selfies, irrelevant content, low-quality images
402
+ - Classifies issues with confidence scores
403
+ - Annotates images with bounding boxes
404
+
405
+ **Geo-Temporal Deduplication Agent**
406
+ - Uses bounding box queries on indexed latitude/longitude columns
407
+ - Applies haversine distance calculation to find nearby reports
408
+ - Checks for duplicates within configurable radius and time window
409
+ - Merges duplicate reports into clusters
410
+ - Increases urgency score for repeated reports
411
+ - Maintains report history and relationships
412
+
413
+ ### Decision Making Layer
414
+
415
+ **Priority Agent**
416
+ - Assigns severity levels: CRITICAL, HIGH, MEDIUM, LOW
417
+ - Considers multiple factors:
418
+ - AI confidence score
419
+ - Location context (near schools, hospitals, main roads)
420
+ - Report clustering (multiple reports = higher priority)
421
+ - Historical data (recurring issues in same location)
422
+ - Sets dynamic SLA deadlines based on severity
423
+ - Provides justification for priority assignment
424
+
425
+ **Routing Agent**
426
+ - Matches issue category to correct department
427
+ - Selects optimal worker based on:
428
+ - Geographic proximity
429
+ - Current workload
430
+ - Specialization
431
+ - Availability
432
+ - Balances resource allocation across the city
433
+ - Handles department-specific routing rules
434
+
435
+ ### Execution & Follow-up Layer
436
+
437
+ **SLA Watchdog Agent**
438
+ - Monitors all active issues against SLA deadlines
439
+ - Triggers warnings at 50% and 20% remaining time
440
+ - Analyzes context of delays (holidays, weather, resource constraints)
441
+ - Provides early warning system for potential SLA breaches
442
+
443
+ **Escalation Agent**
444
+ - Handles overdue issues automatically
445
+ - Reassigns to supervisors or alternate workers
446
+ - Increases issue priority
447
+ - Flags for administrative review
448
+ - Maintains transparency in escalation chain
449
+
450
+ **Notification Agent**
451
+ - Sends real-time updates via multiple channels:
452
+ - In-app push notifications
453
+ - Email notifications
454
+ - SMS (planned)
455
+ - Notifies citizens of status changes
456
+ - Alerts workers of new assignments
457
+ - Informs admins of escalations
458
+ - Supports templated messages with dynamic content
459
+
460
+ ## ❏ Deployment
461
+
462
+ ### Docker Deployment
463
+
464
+ The project includes a complete Docker setup for production deployment:
465
+
466
  ```bash
467
+ # Build and run with Docker Compose
468
+ docker compose up -d
469
+
470
+ # View logs
471
+ docker compose logs -f
472
 
473
+ # Stop services
474
+ docker compose down
475
  ```
476
 
477
+ ### GitHub Actions CI/CD
478
+
479
+ Automated workflows for:
480
+ - Docker image building and pushing to GHCR
481
+ - Deployment to production (completed)
482
+ - Automated testing (planned)
483
+
484
+ ## ❏ Roadmap & Future Vision
485
+
486
+ ### Phase 1: The Foundation (Completed)
487
+ - ❏ Autonomous Agent Pipeline (Vision, Geo, Priority, Routing, etc.)
488
+ - ❏ Cross-Platform Ecosystem (Citizen App, Admin Portal, Worker View)
489
+ - ❏ Real-time notifications and tracking
490
+ - ❏ Anti-fraud mechanisms
491
 
492
+ ### Phase 2: Intelligence Enhancement (In Progress)
493
+ - ❏ Predictive Maintenance: Using historical data to predict infrastructure failures
494
+ - ❏ Automated Testing: Comprehensive test suite
495
+ - ❏ Multi-City Support: Tenant-based architecture
496
+ - ❏ Civic Reputation System: Leaderboards for top contributors
 
497
 
498
+ ### Phase 3: Scale & Gamification (Planned)
499
+ - ❏ Advanced Analytics: ML models for pattern recognition
500
+ - ❏ Incentive Programs: Tax credits or transit passes for verified reporting
501
+ - ❏ Public API: Third-party integrations
502
+ - ❏ Mobile SDK: White-label solution for other cities
503
+ - ❏ IoT Integration: Direct feeds from smart bins, streetlights, and sensors
504
 
505
+ ## ❏ Contributing
 
 
 
 
506
 
507
+ We welcome contributions! Please read our contributing guidelines:
508
 
509
+ 1. Fork the repository
510
+ 2. Create a feature branch (`git checkout -b feature/AmazingFeature`)
511
+ 3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
512
+ 4. Push to the branch (`git push origin feature/AmazingFeature`)
513
+ 5. Open a Pull Request
514
 
515
+ ### Development Guidelines
516
+
517
+ - Follow PEP 8 for Python code
518
+ - Use TypeScript for all new frontend code
519
+ - Write descriptive commit messages
520
+ - Add tests for new features
521
+ - Update documentation as needed
522
+
523
+ ## ❏ Team
524
 
525
  Built by **BitBots** at IIIT Una, HackTheThrone 2026
526
 
 
531
  | Developer | Pushpendra Sharma | [@synapticpush](https://github.com/synapticpush) |
532
  | Developer | Deepti Yadav | [@DeeptiYadav10648](https://github.com/DeeptiYadav10648) |
533
 
534
+ ## ❏ License
535
+
536
+ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
537
+
538
+ ## ❏ Acknowledgments
539
+
540
+ - YOLOv8 by Ultralytics for object detection
541
+ - Supabase for authentication and storage
542
+ - FastAPI for the robust backend framework
543
+ - Next.js and React Native teams for excellent frameworks
544
+
545
+ ---
546
 
547
+ **CityTrack** - Transforming urban governance through autonomous AI agents.