Urban Reach is a modern web application designed to streamline urban management, reporting, and worker assignments. Built with React, Vite, Tailwind CSS, and Supabase, it provides tools for citizens and workers to interact, report issues, and manage city operations efficiently.
graph TB
subgraph "π Frontend Layer"
A[Web Application<br/>React + Vite + TypeScript]
B[Mobile Responsive UI<br/>TailwindCSS + Shadcn/ui]
C[Real-time Updates<br/>WebSocket Subscriptions]
end
subgraph "π Authentication Layer"
D[User Authentication<br/>OTP via Email]
E[Role-based Access<br/>Admin/Worker/Citizen]
F[Session Management<br/>JWT + localStorage]
end
subgraph "βοΈ Backend Services"
G[Supabase Backend<br/>PostgreSQL + Auth + Storage]
H[API Gateway<br/>RESTful + Real-time]
I[File Storage<br/>Image Compression]
end
subgraph "πΊοΈ External Services"
J[OpenStreetMap<br/>Geocoding Service]
K[Leaflet Maps<br/>Interactive Mapping]
L[Browser APIs<br/>GPS + Camera + Notifications]
end
A --> D
B --> E
C --> F
D --> G
E --> H
F --> I
G --> J
H --> K
I --> L
flowchart TD
START([User Visits Platform]) --> ROLE{Select User Role}
ROLE -->|Admin| ADMIN[Admin Portal<br/>@bennett.edu.in required]
ROLE -->|Worker| WORKER[Worker Portal<br/>+ Worker Details]
ROLE -->|Citizen| CITIZEN[Citizen Portal<br/>Standard Registration]
ADMIN --> EMAIL[Enter Email Address]
WORKER --> EMAIL
CITIZEN --> EMAIL
EMAIL --> OTP[π§ OTP Sent via Email<br/>Supabase Auth]
OTP --> VERIFY[Enter 6-digit OTP]
VERIFY --> VALID{OTP Valid?}
VALID -->|β No| ERROR[Show Error + Retry<br/>Max 3 attempts]
ERROR --> VERIFY
VALID -->|β
Yes| PROFILE[Create/Update Profile<br/>Set Role & Council ID]
PROFILE --> DASHBOARD{Route to Dashboard}
DASHBOARD -->|Admin| ADMIN_DASH[π Admin Dashboard<br/>Reports + Workers + Analytics]
DASHBOARD -->|Worker| WORKER_DASH[π§ Worker Dashboard<br/>Assigned Tasks + Map]
DASHBOARD -->|Citizen| CITIZEN_DASH[π€ Citizen Dashboard<br/>Submit + Track Reports]
style START fill:#e1f5fe
style ADMIN_DASH fill:#f3e5f5
style WORKER_DASH fill:#e8f5e8
style CITIZEN_DASH fill:#fff3e0
flowchart TD
CITIZEN_DASH[π€ Citizen Dashboard] --> SUBMIT[π Submit New Report]
SUBMIT --> FORM[π Report Form]
FORM --> DETAILS[Fill Report Details]
DETAILS --> TITLE[π Issue Title]
DETAILS --> CATEGORY[π·οΈ Category Selection<br/>Roads/Water/Electricity/etc.]
DETAILS --> DESC[π Detailed Description]
DETAILS --> PRIORITY[β οΈ Priority Level<br/>Low/Medium/High]
FORM --> LOCATION[π Location Selection]
LOCATION --> GPS_OR_MANUAL{GPS or Manual?}
GPS_OR_MANUAL -->|π°οΈ GPS| GPS_DETECT[Auto-detect Location<br/>Browser Geolocation API]
GPS_OR_MANUAL -->|βοΈ Manual| MANUAL_ADDR[Enter Address Manually]
GPS_DETECT --> GEOCODE[πΊοΈ Geocoding Service<br/>OpenStreetMap Nominatim]
MANUAL_ADDR --> GEOCODE
GEOCODE --> ADDR_VALID[β
Address Validation<br/>& Formatting]
FORM --> IMAGES[πΈ Optional Images]
IMAGES --> UPLOAD[π€ Image Upload<br/>Drag & Drop Interface]
UPLOAD --> COMPRESS[ποΈ Image Compression<br/>& Validation]
COMPRESS --> STORAGE[βοΈ Supabase Storage]
ADDR_VALID --> VALIDATE[π Form Validation]
STORAGE --> VALIDATE
TITLE --> VALIDATE
CATEGORY --> VALIDATE
DESC --> VALIDATE
PRIORITY --> VALIDATE
VALIDATE --> VALID_CHECK{All Fields Valid?}
VALID_CHECK -->|β No| SHOW_ERRORS[β Show Validation Errors]
SHOW_ERRORS --> FORM
VALID_CHECK -->|β
Yes| SUBMIT_DB[πΎ Submit to Database<br/>Create Report Record]
SUBMIT_DB --> REPORT_NUM[π’ Generate Report Number<br/>Auto-increment ID]
REPORT_NUM --> AUTO_ASSIGN[π€ Auto-assign Worker<br/>Based on Category & Availability]
AUTO_ASSIGN --> NOTIFY[π’ Send Notifications]
NOTIFY --> CITIZEN_NOTIFY[π§ Notify Citizen<br/>Report Submitted Successfully]
NOTIFY --> WORKER_NOTIFY[π Notify Assigned Worker<br/>New Task Available]
NOTIFY --> ADMIN_NOTIFY[π Update Admin Dashboard<br/>New Report Counter]
CITIZEN_NOTIFY --> SUCCESS[β
Success Page<br/>Show Report Number]
SUCCESS --> TRACK[π Track Report Status<br/>Real-time Updates]
style SUBMIT fill:#4caf50
style SUCCESS fill:#8bc34a
style NOTIFY fill:#ff9800
flowchart TD
ADMIN_DASH[π Admin Dashboard] --> VIEW_REPORTS[π View All Reports]
VIEW_REPORTS --> FILTER[π Filter & Search]
FILTER --> BY_STATUS[π By Status<br/>Pending/In Progress/Resolved]
FILTER --> BY_CATEGORY[π·οΈ By Category<br/>Roads/Water/etc.]
FILTER --> BY_PRIORITY[β οΈ By Priority Level]
FILTER --> BY_DATE[π
By Date Range]
VIEW_REPORTS --> SELECT_REPORT[π Select Report]
SELECT_REPORT --> REPORT_DETAIL[π Report Detail View]
REPORT_DETAIL --> VIEW_INFO[π View Information]
VIEW_INFO --> REPORT_DATA[π Report Details<br/>Title, Description, Location]
VIEW_INFO --> IMAGES_GALLERY[πΌοΈ Images Gallery<br/>Evidence Photos]
VIEW_INFO --> MAP_LOCATION[πΊοΈ Location on Map<br/>Interactive Leaflet Map]
VIEW_INFO --> STATUS_HISTORY[π Status Timeline<br/>Complete Audit Trail]
REPORT_DETAIL --> ASSIGNMENT{Current Status?}
ASSIGNMENT -->|π Pending| ASSIGN_WORKER[π· Assign Worker]
ASSIGNMENT -->|π€ Assigned| VIEW_WORKER[π View Current Worker<br/>Performance & Contact]
ASSIGNMENT -->|π In Progress| MONITOR[π Monitor Progress<br/>Real-time Updates]
ASSIGNMENT -->|β
Resolved| REVIEW[π Review Resolution<br/>Citizen Feedback]
ASSIGN_WORKER --> WORKER_FILTER[π Filter Available Workers]
WORKER_FILTER --> BY_SPECIALTY[π οΈ By Specialty Match<br/>Category-specific Skills]
WORKER_FILTER --> BY_WORKLOAD[π By Current Workload<br/>Capacity Management]
WORKER_FILTER --> BY_PERFORMANCE[β By Performance Rating<br/>Historical Success Rate]
WORKER_FILTER --> BY_LOCATION[π By Proximity<br/>Distance from Issue]
WORKER_FILTER --> SELECT_WORKER[π· Select Best Worker]
SELECT_WORKER --> CONFIRM_ASSIGN[β
Confirm Assignment]
CONFIRM_ASSIGN --> UPDATE_STATUS[π Update Report Status<br/>Pending β Assigned]
UPDATE_STATUS --> UPDATE_WORKLOAD[π Update Worker Workload<br/>Increment Task Counter]
UPDATE_WORKLOAD --> SEND_NOTIFICATIONS[π’ Send Notifications]
SEND_NOTIFICATIONS --> WORKER_NOTIFICATION[π Notify Worker<br/>New Task Assigned]
SEND_NOTIFICATIONS --> CITIZEN_NOTIFICATION[π§ Notify Citizen<br/>Worker Assigned to Issue]
SEND_NOTIFICATIONS --> HISTORY_LOG[π Create Status History<br/>Audit Trail Entry]
VIEW_WORKER --> REASSIGN[π Reassign Option]
REASSIGN --> ASSIGN_WORKER
ADMIN_DASH --> BULK_OPS[β‘ Bulk Operations]
BULK_OPS --> BULK_SELECT[βοΈ Multi-select Reports]
BULK_SELECT --> BULK_STATUS[π Bulk Status Update]
BULK_SELECT --> BULK_EXPORT[π€ Bulk Data Export<br/>CSV/Excel Format]
BULK_SELECT --> BULK_ASSIGN[π₯ Bulk Worker Assignment]
ADMIN_DASH --> ANALYTICS[π Analytics Dashboard]
ANALYTICS --> REPORT_STATS[π Report Statistics<br/>Trends & Patterns]
ANALYTICS --> WORKER_PERFORMANCE[β Worker Performance<br/>Metrics & Rankings]
ANALYTICS --> COUNCIL_INSIGHTS[ποΈ Council-level Insights<br/>Area-wise Analysis]
style ADMIN_DASH fill:#9c27b0
style ASSIGN_WORKER fill:#2196f3
style SEND_NOTIFICATIONS fill:#ff9800
style ANALYTICS fill:#4caf50
flowchart TD
WORKER_DASH[π§ Worker Dashboard] --> VIEW_TASKS[π View Assigned Tasks]
VIEW_TASKS --> TASK_CATEGORIES[π Task Categories]
TASK_CATEGORIES --> NEW_TASKS[π New Assignments<br/>Recently Assigned]
TASK_CATEGORIES --> IN_PROGRESS[π In Progress Tasks<br/>Currently Working On]
TASK_CATEGORIES --> PENDING_REVIEW[β³ Pending Review<br/>Awaiting Feedback]
TASK_CATEGORIES --> COMPLETED[β
Completed Tasks<br/>Successfully Resolved]
VIEW_TASKS --> PERFORMANCE[π Performance Metrics]
PERFORMANCE --> CURRENT_LOAD[π Current Workload<br/>Active Tasks Count]
PERFORMANCE --> COMPLETION_RATE[β Completion Rate<br/>Success Percentage]
PERFORMANCE --> AVG_TIME[β±οΈ Average Completion Time<br/>Efficiency Metric]
PERFORMANCE --> RATING[π Performance Rating<br/>Overall Score]
VIEW_TASKS --> SELECT_TASK[π Select Task]
SELECT_TASK --> TASK_DETAIL[π Task Detail View]
TASK_DETAIL --> VIEW_TASK_INFO[π View Task Information]
VIEW_TASK_INFO --> REPORT_INFO[π Report Details<br/>Issue Description & Category]
VIEW_TASK_INFO --> LOCATION_MAP[πΊοΈ Location & Directions<br/>GPS Navigation Ready]
VIEW_TASK_INFO --> EVIDENCE_PHOTOS[πΈ Evidence Images<br/>Issue Documentation]
VIEW_TASK_INFO --> CITIZEN_CONTACT[π Citizen Contact Info<br/>Communication Details]
VIEW_TASK_INFO --> TASK_HISTORY[π Task History<br/>Previous Status Updates]
TASK_DETAIL --> UPDATE_STATUS[π Update Task Status]
UPDATE_STATUS --> STATUS_OPTIONS{Current Status?}
STATUS_OPTIONS -->|π Acknowledged| START_WORK[βΆοΈ Start Work<br/>Status: In Progress]
STATUS_OPTIONS -->|π In Progress| PROGRESS_OPTIONS[π οΈ Progress Options]
STATUS_OPTIONS -->|Any Status| ADD_NOTES[π Add Work Notes<br/>Document Actions Taken]
PROGRESS_OPTIONS --> NEED_INFO[β Request Information<br/>Status: Pending Info]
PROGRESS_OPTIONS --> COMPLETE_TASK[β
Mark Complete<br/>Status: Resolved]
PROGRESS_OPTIONS --> CANNOT_FIX[β Cannot Fix<br/>Status: Closed]
PROGRESS_OPTIONS --> ESCALATE[β¬οΈ Escalate Issue<br/>Status: Escalated]
START_WORK --> RECORD_START[β° Record Start Time<br/>Performance Tracking]
COMPLETE_TASK --> RECORD_COMPLETION[β±οΈ Record Completion Time<br/>Calculate Duration]
CANNOT_FIX --> CLOSURE_REASON[π Document Closure Reason<br/>Detailed Explanation]
ESCALATE --> ESCALATE_ADMIN[π’ Notify Admin<br/>Requires Higher Authority]
ADD_NOTES --> WORK_DESCRIPTION[π Describe Actions Taken<br/>Detailed Work Log]
ADD_NOTES --> PROGRESS_PHOTOS[πΈ Add Progress Photos<br/>Before/After Evidence]
ADD_NOTES --> ISSUE_NOTES[β Note Any Issues<br/>Complications or Discoveries]
UPDATE_STATUS --> VALIDATE_INPUT[π Validate Status Update<br/>Check Required Fields]
VALIDATE_INPUT --> SUBMIT_UPDATE[π€ Submit Status Update]
SUBMIT_UPDATE --> UPDATE_DATABASE[πΎ Update Database<br/>Save Status Change]
UPDATE_DATABASE --> CREATE_HISTORY[π Create History Entry<br/>Audit Trail Record]
CREATE_HISTORY --> UPDATE_METRICS[π Update Worker Metrics<br/>Performance Calculation]
UPDATE_METRICS --> SEND_NOTIFICATIONS[π’ Send Notifications]
SEND_NOTIFICATIONS --> CITIZEN_UPDATE[π§ Notify Citizen<br/>Progress Update]
SEND_NOTIFICATIONS --> ADMIN_UPDATE[π Update Admin Dashboard<br/>Real-time Status]
SEND_NOTIFICATIONS --> REALTIME_SYNC[π Real-time Sync<br/>Live Dashboard Updates]
TASK_DETAIL --> MAP_INTEGRATION[πΊοΈ Map Features]
MAP_INTEGRATION --> VIEW_LOCATION[π View Task Location<br/>Interactive Map]
MAP_INTEGRATION --> GET_DIRECTIONS[π§ Get Directions<br/>Navigation to Site]
MAP_INTEGRATION --> REPORT_GPS[π‘ Report GPS Issues<br/>Location Problems]
WORKER_DASH --> MOBILE_OPTIMIZED[π± Mobile Optimizations]
MOBILE_OPTIMIZED --> CAMERA_CAPTURE[πΈ Camera Capture<br/>Quick Photo Upload]
MOBILE_OPTIMIZED --> OFFLINE_MODE[πΆ Offline Mode<br/>Limited Connectivity Support]
MOBILE_OPTIMIZED --> PUSH_NOTIFICATIONS[π Push Notifications<br/>Real-time Alerts]
style WORKER_DASH fill:#4caf50
style UPDATE_STATUS fill:#2196f3
style SEND_NOTIFICATIONS fill:#ff9800
style COMPLETE_TASK fill:#8bc34a
style ESCALATE fill:#f44336
flowchart TD
TRIGGER[β‘ System Event Triggers] --> EVENT_TYPES[π Event Types]
EVENT_TYPES --> STATUS_CHANGE[π Status Change<br/>Report Progress Update]
EVENT_TYPES --> WORKER_ASSIGNMENT[π· Worker Assignment<br/>New Task Allocation]
EVENT_TYPES --> NEW_REPORT[π New Report Created<br/>Citizen Submission]
EVENT_TYPES --> ESCALATION[β¬οΈ Report Escalation<br/>Issue Requires Attention]
EVENT_TYPES --> COMPLETION[β
Task Completion<br/>Work Finished]
STATUS_CHANGE --> NOTIFICATION_ENGINE[π§ Notification Engine]
WORKER_ASSIGNMENT --> NOTIFICATION_ENGINE
NEW_REPORT --> NOTIFICATION_ENGINE
ESCALATION --> NOTIFICATION_ENGINE
COMPLETION --> NOTIFICATION_ENGINE
NOTIFICATION_ENGINE --> CHECK_PREFERENCES[βοΈ Check User Preferences<br/>Notification Settings]
CHECK_PREFERENCES --> USER_PREFS[π€ User Preference Database<br/>Email/Push/In-app Settings]
USER_PREFS --> EMAIL_CHECK{π§ Email Enabled?}
EMAIL_CHECK -->|β
Yes| EMAIL_PROCESS[π¬ Process Email Notification]
EMAIL_CHECK -->|β No| SKIP_EMAIL[βοΈ Skip Email]
EMAIL_PROCESS --> EMAIL_TEMPLATE[π Email Template Processing<br/>Dynamic Content Generation]
EMAIL_TEMPLATE --> SUPABASE_EMAIL[π§ Supabase Email Function<br/>SMTP Delivery]
USER_PREFS --> PUSH_CHECK{π± Push Notifications?}
PUSH_CHECK -->|β
Yes| PUSH_PROCESS[π Process Push Notification]
PUSH_CHECK -->|β No| SKIP_PUSH[βοΈ Skip Push]
PUSH_PROCESS --> BROWSER_PERMISSION[π Browser Permission Check<br/>Notification API Access]
BROWSER_PERMISSION --> NATIVE_NOTIFICATION[π² Show Native Notification<br/>Browser/Mobile Alert]
USER_PREFS --> INAPP_CHECK{π± In-App Notifications?}
INAPP_CHECK -->|β
Yes| INAPP_PROCESS[π Process In-App Notification]
INAPP_CHECK -->|β No| SKIP_INAPP[βοΈ Skip In-App]
INAPP_PROCESS --> CREATE_RECORD[πΎ Create Notification Record<br/>Database Storage]
CREATE_RECORD --> REALTIME_BROADCAST[π‘ Supabase Realtime Broadcast<br/>Live WebSocket Update]
REALTIME_BROADCAST --> NOTIFICATION_PROVIDER[π§ Notification Provider Context<br/>React Global State]
NOTIFICATION_PROVIDER --> UPDATE_UI[π Update UI Components<br/>Real-time Interface Updates]
UPDATE_UI --> NOTIFICATION_CENTER[π Notification Center<br/>In-App Message List]
UPDATE_UI --> BADGE_COUNTER[π΄ Notification Badge<br/>Unread Count Display]
UPDATE_UI --> TOAST_POPUP[π Toast Notifications<br/>Temporary Pop-up Messages]
NOTIFICATION_CENTER --> MARK_READ[ποΈ Mark as Read Functionality<br/>User Interaction]
NOTIFICATION_CENTER --> NOTIFICATION_HISTORY[π Notification History<br/>Message Archive]
NOTIFICATION_ENGINE --> REALTIME_DASHBOARD[π Real-time Dashboard Updates]
REALTIME_DASHBOARD --> COUNTER_UPDATES[π’ Update Counters<br/>Live Statistics]
REALTIME_DASHBOARD --> LIST_REFRESH[π Refresh Lists<br/>Dynamic Content Update]
REALTIME_DASHBOARD --> STATUS_INDICATORS[π¦ Status Indicators<br/>Visual State Changes]
REALTIME_DASHBOARD --> WORKER_ASSIGNMENTS[π· Worker Assignment Display<br/>Live Task Updates]
SUPABASE_EMAIL --> DELIVERY_STATUS[π¬ Email Delivery Status<br/>Success/Failure Tracking]
NATIVE_NOTIFICATION --> USER_INTERACTION[π User Interaction<br/>Click/Dismiss Handling]
MARK_READ --> UPDATE_PREFERENCES[βοΈ Update User Preferences<br/>Learning from User Behavior]
style NOTIFICATION_ENGINE fill:#ff9800
style REALTIME_BROADCAST fill:#2196f3
style EMAIL_PROCESS fill:#4caf50
style PUSH_PROCESS fill:#9c27b0
style INAPP_PROCESS fill:#00bcd4
graph TB
subgraph "π₯ User Layer"
CITIZENS[π€ Citizens<br/>Report Issues & Track Progress]
WORKERS[π· Workers<br/>Handle Tasks & Update Status]
ADMINS[π¨βπΌ Admins<br/>Manage System & Analytics]
end
subgraph "π Presentation Layer"
REACT[βοΈ React 18 + TypeScript<br/>Component-based UI]
ROUTER[π§ React Router<br/>Client-side Navigation]
STATE[π State Management<br/>React Query + Context API]
UI[π¨ UI Framework<br/>TailwindCSS + Shadcn/ui]
end
subgraph "π§ Business Logic Layer"
AUTH[π Authentication Logic<br/>OTP + Role-based Access]
WORKFLOWS[π Workflow Management<br/>Report Lifecycle]
NOTIFICATIONS[π Notification System<br/>Multi-channel Delivery]
GEOCODING[πΊοΈ Location Services<br/>GPS + Address Resolution]
end
subgraph "π External Services"
OSM[πΊοΈ OpenStreetMap<br/>Geocoding + Address Data]
LEAFLET[πΊοΈ Leaflet Maps<br/>Interactive Mapping]
BROWSER[π Browser APIs<br/>GPS + Camera + Notifications]
end
subgraph "βοΈ Backend Services"
SUPABASE[β‘ Supabase Platform]
DATABASE[ποΈ PostgreSQL Database<br/>Structured Data + RLS]
STORAGE[π¦ File Storage<br/>Image Management]
REALTIME[π‘ Real-time Engine<br/>WebSocket Subscriptions]
FUNCTIONS[βοΈ Edge Functions<br/>Email + Automation]
end
subgraph "π Data Layer"
REPORTS[π Reports Table<br/>Issue Management]
USERS[π₯ Users & Profiles<br/>Role Management]
WORKERS_DB[π· Workers Table<br/>Skill & Workload Tracking]
NOTIFICATIONS_DB[π Notifications<br/>Message History]
HISTORY[π Status History<br/>Audit Trail]
end
CITIZENS --> REACT
WORKERS --> REACT
ADMINS --> REACT
REACT --> AUTH
ROUTER --> WORKFLOWS
STATE --> NOTIFICATIONS
UI --> GEOCODING
AUTH --> SUPABASE
WORKFLOWS --> DATABASE
NOTIFICATIONS --> REALTIME
GEOCODING --> OSM
SUPABASE --> REPORTS
DATABASE --> USERS
STORAGE --> WORKERS_DB
REALTIME --> NOTIFICATIONS_DB
FUNCTIONS --> HISTORY
GEOCODING --> LEAFLET
NOTIFICATIONS --> BROWSER
style CITIZENS fill:#fff3e0
style WORKERS fill:#e8f5e8
style ADMINS fill:#f3e5f5
style SUPABASE fill:#00d4aa
style REACT fill:#61dafb
- π Multi-Role Authentication: Secure OTP-based login for Citizens, Workers, and Admins
- π Intelligent Report Management: Submit, track, and manage municipal issues with automatic worker assignment
- π· Worker Task System: Specialized worker dashboards with performance tracking and workload management
- πΊοΈ Advanced Location Services: GPS integration, interactive maps, and geocoding for precise issue location
- π± Real-time Notifications: Multi-channel notifications (email, push, in-app) with user preferences
- π Analytics & Insights: Comprehensive dashboards with performance metrics and trend analysis
- β‘ Bulk Operations: Efficient data export, bulk status updates, and batch processing
- πΈ Media Management: Image upload with compression, galleries, and evidence documentation
- π Live Updates: Real-time synchronization across all user interfaces using WebSocket technology
- Frontend: React 18 + TypeScript, Vite, TailwindCSS + Shadcn/ui
- Backend: Supabase (PostgreSQL + Auth + Storage + Real-time + Functions)
- Mapping: Leaflet + OpenStreetMap Nominatim for geocoding
- State Management: React Query + Context API
- Authentication: Supabase Auth with OTP email verification
- Real-time: WebSocket subscriptions for live updates
- File Handling: Supabase Storage with image compression
- Deployment: Vercel with optimized build configuration
Visit the live application: https://urban-reach-1.vercel.app/
- Citizen Portal:
/auth/citizen- Use any email for testing - Worker Portal:
/auth/worker- Requires worker registration - Admin Portal:
/auth/admin- Requires @bennett.edu.in email
urban-reach/
βββ π src/
β βββ π components/ # Reusable UI components
β β βββ ui/ # Shadcn/ui base components
β β βββ AuthForm.tsx # Authentication interface
β β βββ ReportsMap.tsx # Interactive mapping
β β βββ WorkerAssignment.tsx # Worker allocation system
β β βββ StatusUpdate.tsx # Task status management
β β βββ NotificationCenter.tsx # Real-time notifications
β β βββ ImageUpload.tsx # File upload with compression
β βββ π pages/ # Application page components
β β βββ Dashboard.tsx # Admin overview
β β βββ CitizenDashboard.tsx # Citizen interface
β β βββ WorkerDashboard.tsx # Worker task management
β β βββ SubmitReport.tsx # Issue submission form
β β βββ ReportDetail.tsx # Detailed report view
β βββ π hooks/ # Custom React hooks
β β βββ useGeocoding.ts # Location services
β β βββ useRealtimeSubscription.ts # Live updates
β β βββ useNetworkStatus.ts # Connectivity monitoring
β βββ π lib/ # Utility libraries
β β βββ geocoding.ts # Address resolution
β β βββ notifications.ts # Message handling
β β βββ storage.ts # File management
β β βββ error-handling.ts # Error management
β βββ π integrations/ # External service integrations
β βββ supabase/ # Database & auth configuration
βββ π supabase/ # Backend configuration
β βββ π migrations/ # Database schema evolution
β βββ π functions/ # Edge functions (email automation)
β βββ config.toml # Supabase project settings
βββ π public/ # Static assets
βββ π docs/ # Documentation files
- Node.js 18+ and npm/yarn
- Supabase account and project
- Modern web browser with WebSocket support
-
Clone the repository:
git clone https://github.com/ydvSajal/urban-reach.git cd urban-reach -
Install dependencies:
npm install
-
Environment Configuration: Create
.env.localfile with Supabase credentials:VITE_SUPABASE_URL=your_supabase_project_url VITE_SUPABASE_PUBLISHABLE_KEY=your_supabase_anon_key
-
Database Setup: Run the included migrations to set up the database schema:
npx supabase db reset
-
Start development server:
npm run dev
-
Open in browser: Navigate to
http://localhost:8080
profiles- User information with role-based access controlreports- Municipal issue submissions with full lifecycle trackingworkers- Worker profiles with specialization and performance metricscouncils- Municipal council management (Bennett University)notifications- Multi-channel notification system with preferencesreport_status_history- Complete audit trail for all status changesworker_specialties- Skill categorization for optimal task assignment
- Row Level Security (RLS) for data protection and privacy
- Automated triggers for performance calculation and auto-assignment
- Real-time subscriptions for live dashboard updates
- Comprehensive indexing for optimal query performance
We welcome contributions to Urban Reach! Here's how you can help:
- Fork the repository and create a feature branch
- Follow the existing code style and use TypeScript
- Add tests for new features and ensure existing tests pass
- Update documentation for any API or workflow changes
- Submit a pull request with a clear description of changes
- ESLint configuration for code consistency
- TypeScript for type safety and better development experience
- Component testing with React Testing Library
- Comprehensive error handling and user feedback
- π§ Feature Development: New workflows and user interface improvements
- π Bug Fixes: Issue resolution and performance optimizations
- π Documentation: Guides, tutorials, and API documentation
- π§ͺ Testing: Unit tests, integration tests, and user acceptance testing
- π¨ UI/UX: Design improvements and accessibility enhancements
- Geocoding Service Guide - Location services implementation
- Supabase Email Setup - Email notification configuration
- Performance Optimizations - System optimization strategies
- Implementation Summary - Detailed feature breakdown
- Supabase Documentation - Backend services
- React Query Guide - Data fetching and caching
- TailwindCSS - Utility-first styling
- Leaflet Maps - Interactive mapping
- Row Level Security (RLS) enforced at database level
- Role-based access control with strict permission boundaries
- Input validation and sanitization for all user data
- Secure file upload with type validation and size limits
- Environment variable protection for sensitive credentials
- Code splitting with lazy-loaded routes for faster initial load
- Image compression for optimal storage and bandwidth usage
- Optimistic updates for immediate user feedback
- Real-time synchronization with minimal data transfer
- Mobile optimization with responsive design and touch interfaces
- π± Mobile App Development - Native iOS and Android applications
- π€ AI-Powered Features - Intelligent issue categorization and priority detection
- π Advanced Analytics - Predictive modeling and trend analysis
- π Multi-language Support - Internationalization for broader accessibility
- π Third-party Integrations - Government databases and mapping services
This project is licensed under the MIT License - see the LICENSE file for details.
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: Contact the development team for enterprise inquiries
ποΈ Built for Smart Cities | π Powered by Modern Web Technology | π‘ Open Source Innovation
Making urban management more efficient, transparent, and citizen-friendly.