๐ Transforming Public Safety Through Innovation - A next-generation platform empowering communities with AI-driven incident management, real-time emergency response, and comprehensive safety analytics.
CiviGuard is a comprehensive public safety management platform designed specifically for the Indian context. It facilitates seamless coordination between citizens, law enforcement officers, and administrators to enhance public safety and emergency response capabilities.
Empowering communities through technology-driven public safety solutions, ensuring rapid response to incidents and effective resource management for law enforcement agencies.
- โก 50% faster emergency response times
- ๐ 95% accuracy in incident categorization
- ๐ 100+ locations across Madhya Pradesh
- ๐ฅ 10,000+ users actively protecting communities
- ๐ Award-winning safety platform by Government of India
| ๐ Feature | ๐ฏ Benefit | ๐ก Innovation |
|---|---|---|
| ๐ค AI-Powered | Smart incident classification | Machine learning algorithms |
| โก Real-time | Instant emergency response | WebSocket technology |
| ๐บ๏ธ Location-based | Precise incident mapping | GPS + Geofencing |
| ๐ฑ Mobile-first | Accessible anywhere | Progressive Web App |
| ๐ฎ๐ณ India-focused | Local compliance | Aadhaar integration |
| ๐ Secure | Data protection | End-to-end encryption |
- ๐๏ธ Citizens: Report incidents, receive alerts, access community resources
- ๐ฎ Officers: Respond to incidents, manage cases, patrol coordination
- ๐ก๏ธ Administrators: System oversight, analytics, officer management
- ๐ Real-time Reporting: Instant incident submission with multimedia support
- ๐ Smart Tracking: Complete incident lifecycle management
- ๐ฏ Auto-Assignment: Intelligent officer assignment based on location and expertise
- โก Priority Handling: Critical, High, Medium, Low priority classification
- ๐ธ Evidence Management: Photo, video, and document attachments
- ๐ฌ Communication Hub: In-app messaging between stakeholders
- ๐ Status Updates: Real-time progress tracking and notifications
- ๐บ๏ธ Interactive Maps: Google Maps integration with real-time positioning
- ๐ Geofencing: Location-based alerts and boundary management
- ๐ Patrol Tracking: Live vehicle and officer location monitoring
- ๐ Hotspot Analysis: Crime pattern identification and prevention
- ๐ก๏ธ Weather Integration: Weather-based safety recommendations
- ๐ง Traffic Integration: Real-time traffic and road condition updates
โ ๏ธ Emergency Alerts: Weather, disaster, and public safety notifications- ๐ฑ Real-time Notifications: Instant updates via WebSocket
- ๐ฏ Targeted Messaging: Location and role-based alert distribution
- ๐ Alert Analytics: Response tracking and effectiveness metrics
- ๐ Multi-channel: SMS, Email, Push, and In-app notifications
- ๐ Broadcast Capability: Mass communication for emergencies
- ๐ Performance Dashboards: Real-time KPI monitoring
- ๐ Comprehensive Reports: Incident trends and officer performance
- ๐ Data Visualization: Interactive charts and geographic analysis
- ๐ค Export Capabilities: PDF, Excel, and CSV report generation
- ๐ค Predictive Analytics: AI-powered trend prediction
- ๐ Scheduled Reports: Automated report generation and distribution
๐จ React 18.3.1 + TypeScript
๐ฏ Vite (Build Tool)
๐จ Tailwind CSS + Shadcn/UI
๐บ๏ธ Google Maps API + Leaflet
๐ Recharts + ApexCharts
๐ TanStack Query + Axios
๐ฃ๏ธ React Router DOM
โ Java 21 + Spring Boot 3.3.0
๐๏ธ PostgreSQL + Spring Data JPA
๐ Spring Security + JWT
๐ WebSocket (Real-time)
๐ OpenAPI/Swagger
๐ Spring Boot Actuator
๐๏ธ Maven
- WebSocket Integration for live updates
- Push Notifications for critical alerts
- Live Dashboard Updates
- Real-time Chat between officers and dispatch
๐ฆ CiviGuard V1.2
โโโ ๐จ Frontend (React + TypeScript)
โ โโโ ๐ฑ src/
โ โ โโโ ๐งฉ components/ # Reusable UI components
โ โ โโโ ๐ pages/ # Route-level pages
โ โ โโโ ๐ง services/ # API service layer
โ โ โโโ ๐ฏ hooks/ # Custom React hooks
โ โ โโโ ๐ context/ # React contexts
โ โ โโโ ๐ types/ # TypeScript definitions
โ โโโ ๐ฆ public/ # Static assets
โ โโโ โ๏ธ vite.config.ts # Vite configuration
โโโ โ๏ธ Backend (Spring Boot + Java)
โ โโโ ๐ src/main/java/com/civiguard/
โ โ โโโ ๐ฎ controller/ # REST API controllers
โ โ โโโ ๐ง service/ # Business logic
โ โ โโโ ๐ model/ # JPA entities
โ โ โโโ ๐๏ธ repository/ # Data access layer
โ โ โโโ ๐ security/ # Security configuration
โ โ โโโ โ๏ธ config/ # Application config
โ โโโ ๐ src/main/resources/ # Configuration files
โ โโโ ๐ pom.xml # Maven configuration
โโโ ๐ Database Exports/ # Sample data
โโโ ๐ Documentation/ # Project docs
- โ Java 21+
- ๐ฆ Node.js 18+
- ๐๏ธ PostgreSQL 15+
- ๐ง Maven 3.8+
- ๐ฑ Git
git clone https://github.com/AryanDevCodes/CIVIGUARD_V1.2.git
cd CIVIGUARD_V1.2# Navigate to backend directory
cd backend
# Configure database in application.yml
# Update PostgreSQL connection details
# Install dependencies and run
mvn clean install
mvn spring-boot:run# Navigate to project root
cd ..
# Install dependencies
npm install
# Set up environment variables
cp .env.example .env
# Add your Google Maps API key
# Start development server
npm run dev- ๐ฅ๏ธ Frontend: http://localhost:3000
- โ๏ธ Backend API: http://localhost:8080
- ๐ API Documentation: http://localhost:8080/swagger-ui.html
# Google Maps API
VITE_GOOGLE_MAPS_API_KEY=your_google_maps_api_key
# Backend API URL
VITE_API_BASE_URL=http://localhost:8080
# WebSocket URL
VITE_WEBSOCKET_URL=ws://localhost:8080/wsspring:
datasource:
url: jdbc:postgresql://localhost:5432/civiguard
username: your_username
password: your_password
jpa:
hibernate:
ddl-auto: update- โ Report incidents with photos/videos
- โ View public safety alerts
- โ Track incident status
- โ Access emergency contacts
- โ Anonymous reporting option
- โ Respond to assigned incidents
- โ Update case status and notes
- โ Patrol route management
- โ Communication with dispatch
- โ Performance dashboard access
- โ Complete system oversight
- โ Officer management and assignment
- โ Analytics and reporting
- โ System configuration
- โ Alert broadcast capabilities
POST /api/auth/login # User login
POST /api/auth/register # User registration
POST /api/auth/refresh # Token refresh
GET /api/incidents # List incidents
POST /api/incidents # Create incident
PUT /api/incidents/{id} # Update incident
DELETE /api/incidents/{id} # Delete incident
GET /api/officers # List officers
POST /api/officers # Create officer
PUT /api/officers/{id} # Update officer
GET /api/officers/{id}/stats # Officer statistics
GET /api/alerts # List alerts
POST /api/alerts # Create alert
PUT /api/alerts/{id} # Update alert
POST /api/alerts/broadcast # Broadcast alert
| Role | Dashboard Features | Key Functions |
|---|---|---|
| ๐๏ธ Citizens | Incident reporting, Alert viewing | Quick incident submission, Safety notifications |
| ๐ฎ Officers | Case management, Patrol tracking | Incident response, Status updates |
| ๐ก๏ธ Admins | System overview, Analytics | User management, System monitoring |
- ๐ Real-time incident markers with priority-based colors
- ๐ Patrol route visualization and optimization
- ๐ Geofence boundaries for area-based alerts
- ๐ฅ Heat map analysis for crime pattern identification
- ๐ Incident trend analysis over time
- ๐ฎ Officer performance metrics and workload
- ๐ Geographic incident distribution mapping
- โฑ๏ธ Response time analytics and optimization
npm run dev # ๐ Start development server
npm run build # ๐๏ธ Build for production
npm run preview # ๐ Preview production build
npm run lint # ๐ Lint codemvn spring-boot:run # ๐ Start development server
mvn clean install # ๐๏ธ Build project
mvn test # ๐งช Run tests
mvn package # ๐ฆ Package application# Frontend testing
npm run test
# Backend testing
mvn test
# Integration tests
mvn verify- ๐ JWT Authentication with refresh tokens
- ๐ก๏ธ Role-based Access Control (RBAC)
- ๐ Password Encryption using BCrypt
- ๐ CORS Configuration for secure cross-origin requests
- โ Input Validation and sanitization
- ๐ SQL Injection Prevention via JPA
- ๐ซ XSS Protection in frontend
- ๐ป CPU, Memory, Disk Usage tracking
- ๐ Application Health Checks
- ๐ Performance Metrics collection
โ ๏ธ Error Rate Monitoring
- ๐ Application Logs with different levels
- ๐ API Request/Response logging
- โ Error Tracking and alerting
- ๐ Log Aggregation and analysis
CiviGuard is designed with mobile-first approach:
- ๐ฑ Responsive Design works on all devices
- ๐ Touch-friendly Interface for mobile users
- ๐ Fast Loading on slower networks
- ๐ถ Offline Capabilities for critical functions
- ๐๏ธ Indian Government Structure integration
- ๐ฑ Aadhaar Authentication support
- ๐บ๏ธ Indian Address Format (State, District, City)
- ๐ฎ Police Hierarchy according to Indian standards
- ๐ Multi-language Support for regional languages
- ๐ Madhya Pradesh sample data included
- ๐๏ธ Major Cities pre-configured
- ๐ Local Police Stations integration ready
- ๐ Emergency Numbers pre-populated
# Build and run with Docker
docker-compose up -d
# Scale services
docker-compose up --scale backend=3- AWS EC2 with RDS PostgreSQL
- Google Cloud Platform with Cloud SQL
- Azure with Azure Database
- Heroku for quick deployment
We welcome contributions! Please follow these steps:
- ๐ด Fork the repository
- ๐ฟ Create a feature branch (
git checkout -b feature/AmazingFeature) - ๐พ Commit your changes (
git commit -m 'Add some AmazingFeature') - ๐ค Push to the branch (
git push origin feature/AmazingFeature) - ๐ฌ Open a Pull Request
- Follow Java and TypeScript best practices
- Write unit tests for new features
- Update documentation as needed
- Use meaningful commit messages
When reporting bugs, please include:
- ๐ Detailed description of the issue
- ๐ Steps to reproduce the problem
- ๐ป Environment details (OS, browser, versions)
- ๐ท Screenshots if applicable
- ๐ค AI-powered incident categorization
- ๐ฑ Mobile App for iOS and Android
- ๐ Advanced Analytics with ML predictions
- ๐ Multi-tenant support for different cities
- ๐ Integration with emergency services (108, 100, 101)
- ๐ Drone Integration for aerial monitoring
- ๐ธ CCTV Integration for real-time surveillance
- ๐ฌ Chatbot Support for citizen queries
- ๐ Voice Commands and speech recognition
This project is licensed under the MIT License - see the LICENSE file for details.
- ๐ฏ Project Lead: AryanDevCodes
- ๐ป Backend Developers: Spring Boot specialists
- ๐จ Frontend Developers: React/TypeScript experts
- ๐๏ธ Database Architects: PostgreSQL specialists
- ๐ Security Engineers: Cybersecurity experts
- ๐๏ธ Indian Police Department for guidance and requirements
- ๐ Open Source Community for amazing tools and libraries
- ๐ฅ Beta Testers for valuable feedback
- ๐ Educational Institutions for research support
- ๐ง Email: Not Available
- ๐ฌ Discord: Not Available
- ๐ Documentation: Not Available
- ๐ Issues: GitHub Issues
- ๐ฆ Twitter: @Not Available
- ๐ LinkedIn: Not Available
- ๐บ YouTube: Not Available
If you find this project helpful, please โญ star this repository!
๐ก๏ธ Making Communities Safer, One Click at a Time ๐ก๏ธ
๐ Transforming Public Safety Through Technology ๐
Last updated: August 7, 2025

