City Issue Reporter - Mobile App
A React Native + Expo mobile application for citizens to report city infrastructure issues with AI-powered classification and real-time tracking.
Features
Authentication
- Google OAuth only via Supabase Auth
- Secure session management with auto-refresh
- No anonymous reporting (prevents spam)
Anti-Fraud Protection
- Mandatory GPS: Camera access blocked until GPS is enabled on device
- GPS Precision Lock: Captures blocked until GPS accuracy < 10 meters
- Live Camera Only: No gallery access - photos must be captured in real-time
- Location Verification: Continuous GPS monitoring during capture session
Issue Reporting
- Live camera capture with frame guides
- Real-time GPS accuracy indicator
- AI-powered classification visualization
- Status: VisionAgent β GeoAgent β PriorityAgent β RoutingAgent β NotificationAgent
Issue Tracking
- View all your reported issues
- Filter by status (Reported, In Progress, Resolved)
- Detailed issue view with:
- Original vs AI-annotated image toggle
- Priority and status badges
- Confidence score visualization
- Location details
- Status timeline
Profile & Gamification
- Civic badges and contribution stats
- Report history stats
- Settings management
Tech Stack
- Framework: React Native + Expo (SDK 54)
- Language: TypeScript
- Auth: Supabase + Google OAuth
- Camera: expo-camera
- Location: expo-location
- Navigation: @react-navigation/native
- Styling: Custom dark theme with glassmorphism
Prerequisites
- Node.js 18+
- npm or yarn
- Expo CLI
- Expo Go app on your device (for testing)
- Google OAuth configured in Supabase
Installation
cd User
npm install
Configuration
Update Supabase credentials in
src/config/supabase.ts:SUPABASE_URL: Your Supabase project URLSUPABASE_ANON_KEY: Your Supabase anon key
Configure Google OAuth in Supabase Dashboard:
- Enable Google provider
- Add your OAuth client credentials
Update
app.jsonwith your bundle identifiers if needed
Running the App
Development
npx expo start
iOS Simulator
npx expo start --ios
Android Emulator
npx expo start --android
Physical Device
Scan the QR code with Expo Go app
Project Structure
src/
βββ components/
β βββ ui/
β β βββ Button.tsx # Gradient button with variants
β β βββ Card.tsx # Glass/gradient card component
β βββ issues/
β βββ IssueCard.tsx # Issue list item component
βββ config/
β βββ supabase.ts # Supabase client configuration
βββ context/
β βββ AuthContext.tsx # Auth state management
βββ navigation/
β βββ AppNavigator.tsx # Navigation structure
βββ screens/
β βββ auth/
β β βββ LoginScreen.tsx # Google OAuth login
β βββ capture/
β β βββ CaptureScreen.tsx # Camera with GPS enforcement
β β βββ ProcessingScreen.tsx # AI agent progress
β βββ home/
β β βββ HomeScreen.tsx # Dashboard
β βββ issues/
β β βββ MyIssuesScreen.tsx # Issue list
β β βββ IssueDetailScreen.tsx # Issue details
β βββ profile/
β βββ ProfileScreen.tsx # User profile
βββ services/
β βββ issueService.ts # API communication
β βββ locationService.ts # GPS utilities
βββ theme/
β βββ index.ts # Colors, typography, spacing
βββ types/
βββ index.ts # TypeScript interfaces
API Integration
The app connects to the Backend API at:
- Development:
http://10.0.2.2:8000(Android emulator) - Update
API_BASE_URLinsrc/config/supabase.tsfor other environments
Backend Endpoints Used
POST /issues/stream- Create issue with background processingGET /issues- List issues with paginationGET /issues/{id}- Get issue detailsGET /flow/flow/{id}- SSE stream for agent progress
Building for Production
EAS Build (Recommended)
npx eas build --platform all
Local Build
npx expo run:android
npx expo run:ios
License
Part of the Autonomous City Issue Resolution Agent project.