Crime Navigator is a powerful full-stack web application that leverages machine learning and interactive visualizations to predict and analyze urban crime trends. Designed for public safety, the platform processes real-time and historical crime data from NCRB and empowers users, law enforcement, and policymakers to make data-driven decisions for a safer tomorrow.


- Role-based access with JWT
- AES-encrypted analytics and PDF exports
- HTTP-only cookies for session security
- Interactive charts using Chart.js and D3.js
- Bar, Line, Radar, and Heatmaps for exploring trends
- City-wise, year-wise, and crime-type filters
- Trained on 5.8M+ NCRB records from 19 Indian cities
- Random Forest Regressor (MAE: 2.49 | R²: 0.93)
- Predicts crime rate, case count, and severity label
- Live crime-related headlines via NewsAPI
- Region/category-based filtering
- Clickable news cards with source and timestamps
- Responsive frontend using React.js
- Admin, Analyst, and Public User modes
- Historical analysis + predictive overlays
- Node.js + Express.js (REST APIs)
- Flask (ML predictions with scikit-learn)
- MongoDB (crime records & user data)
- React.js (v18)
- Chart.js + D3.js
- Bootstrap, Axios
- Scikit-learn
- Pandas, NumPy
/CrimeNavigator
├── /client
│ ├── /components
│ └── /pages
├── /server
│ ├── /routes
│ ├── /middleware
│ └── /controllers
├── /ml_model
│ ├── model.pkl
│ ├── app.py (Flask)
│ └── predict_pipeline.py
├── /public
│ ├── /assets
├── /data
│ └── NCRB_Crime_Records.csv
├── package.json
├── requirements.txt
└── README.md
### 1. Clone the Repository
git clone https://github.com/avadheshgithub/Crime_Navigator-App.git
cd Crime_Navigator-App
### 2. Install Frontend Dependencies
cd client
npm install
### 3. Install Backend Dependencies
cd ../server
npm install
### 4. Setup Python Environment for ML
cd ../ml_model
pip install -r requirements.txt
### 5. Run the Application
# Start Flask (ML Backend)
python app.py
# In a new terminal, start Node.js Server
cd ../server
npm start
# In another terminal, start React Frontend
cd ../client
npm start