A comprehensive Flask-based web application for tracking, reporting, and visualizing crime incidents across India. Features real-time alerts, zone-based crime analytics, route safety recommendations, and predictive crime forecasting.
✅ Crime Reporting System - Users can report crimes with location, type, and description
✅ Live Zone Alerts - Real-time crime alerts for specific geographic zones
✅ Crime Dashboard - Interactive visualizations and statistics
✅ Route Safety Checker - Check safety of travel routes between zones
✅ Crime Predictions - Forecasted crime trends (2021-2027)
✅ Admin Panel - Manage crimes, zones, and users
✅ Zone-based Mapping - Color-coded zones (Red/Yellow/Green) for safety levels
✅ User Authentication - Secure login and registration system
✅ SQLite Database - Pre-populated with India-wide crime data
Crime-Shield-Alert-Map/
├── app.py # Main Flask application
├── setup_db.py # Database initialization script
├── crime_data.db # SQLite database
├── requirements.txt # Python dependencies
├── templates/ # HTML templates
│ ├── index.html # Home page
│ ├── login.html # Admin login
│ ├── admin_dashboard.html # Admin control panel
│ ├── report_crime.html # Crime reporting form
│ ├── alert.html # Live alerts display
│ ├── route_safety.html # Route checker
│ ├── prediction_charts.html # Crime forecasts
│ ├── crime_dashboard.html # Statistics dashboard
│ └── map_view.html # Interactive map
├── static/ # Static files
│ ├── style.css # Styling
│ ├── script.js # JavaScript functionality
│ ├── india_zones.geojson # Geographic data
│ └── image/ # Images and icons
├── .gitignore # Git ignore rules
├── README.md # This file
└── LICENSE # MIT License
- Python 3.8+
- pip (Python package manager)
- Git
1. Clone the repository
git clone https://github.com/Ambicalanka/-Crime-Shield-Alert-Map.git
cd "Crime Shield Alert Map"2. Create a virtual environment
# Windows
python -m venv .venv
.venv\Scripts\activate
# macOS/Linux
python3 -m venv .venv
source .venv/bin/activate3. Install dependencies
pip install -r requirements.txt4. Initialize the database
python setup_db.py5. Run the application
python app.py6. Open in browser
Navigate to: http://localhost:5000
- Go to Home Page to view crime statistics
- Click "Report Crime" to submit a crime incident
- Use "Route Safety" to check travel safety between zones
- View "Live Alerts" for real-time crime notifications
- Check "Crime Dashboard" for detailed analytics
- Login at
/admin_loginwith admin credentials - Access Admin Dashboard to manage:
- Add/Edit/Delete zones
- Add/View crimes
- Manage user accounts
- View Crime Statistics and trends
| Technology | Purpose |
|---|---|
| Flask | Web framework (Python) |
| SQLite | Database management |
| HTML/CSS | Frontend UI |
| JavaScript | Interactive features |
| Pandas | Data analysis |
| GeoJSON | Geographic data format |
- crimes - Crime incident records
- zones - Geographic zones/regions
- users - User accounts
- admins - Administrator accounts
- Pre-loaded with India-wide crime statistics
- Data covering 28 states and 8 union territories
- Crime data from 2021-2024
| Endpoint | Method | Description |
|---|---|---|
/ |
GET | Home page |
/report_crime |
GET/POST | Report a crime |
/route-safety |
GET/POST | Check route safety |
/dashboard |
GET | Crime statistics |
/api/crime-stats |
GET | Get crime data (JSON) |
/admin_login |
GET/POST | Admin login |
This project demonstrates:
- ✅ Flask web application development
- ✅ SQLite database design and queries
- ✅ User authentication and authorization
- ✅ Data visualization and analytics
- ✅ Geospatial data handling
- ✅ HTML/CSS/JavaScript integration
- ✅ RESTful API design
- Prediction accuracy depends on historical data quality
- GeoJSON rendering requires proper browser support
- Database size may impact performance with large datasets
- Machine learning-based crime prediction
- Mobile app (iOS/Android)
- Real-time notification system
- Integration with law enforcement APIs
- Advanced data analytics with ML models
- Multi-language support
- Cloud deployment (AWS/Heroku)
Contributions are welcome! To contribute:
- Fork the repository
- Create a feature branch (
git checkout -b feature/YourFeature) - Commit changes (
git commit -m 'Add YourFeature') - Push to branch (
git push origin feature/YourFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
You are free to:
- Use this project for personal or commercial purposes
- Modify and distribute the code
- Use it in private or public projects
Ambica
GitHub: @Ambicalanka
For issues, questions, or suggestions:
- Open an issue on GitHub
- Check existing issues before creating new ones
- Provide detailed descriptions and error messages
- Flask documentation and community
- India geographic data sources
- Open-source community for tools and libraries
- Initial release
- Core features implemented
- Database populated with sample data
- Admin panel functionality
Last Updated: July 14, 2026
Status: Active Development ✅