A comprehensive MERN stack application for predicting and monitoring forest fire risks using machine learning algorithms and real-time data analysis.
- Real-time Fire Risk Prediction - Advanced ML algorithms to predict fire probability
- Interactive Dashboard - Visualize fire risk data with charts and maps
- Alert System - Automated notifications for high-risk areas
- Historical Data Analysis - Track fire patterns and trends over time
- User Authentication - Secure login and user management
- Responsive Design - Works seamlessly across all devices
- React 18 with TypeScript
- Vite for fast development and building
- React Router for navigation
- Context API for state management
- CSS3 with modern styling
- Node.js with Express.js
- MongoDB with Mongoose ODM
- JWT for authentication
- bcryptjs for password hashing
- CORS for cross-origin requests
- Rate limiting and security middleware
- Nodemon for development
- Git for version control
- Vercel for frontend deployment
- Node.js (v18 or higher)
- MongoDB (local or MongoDB Atlas)
- Git
-
Clone the repository
git clone https://github.com/immansha/forest-fire.git cd forest-fire/BlazeFix/project -
Install frontend dependencies
npm install
-
Install backend dependencies
cd server npm install cd ..
-
Environment Setup
Create a
.envfile in theserverdirectory:MONGODB_URI=your_mongodb_connection_string JWT_SECRET=your_jwt_secret_key PORT=9999
-
Start the development servers
Frontend (from BlazeFix/project):
npm run dev
Backend (from BlazeFix/project/server):
npm run dev
export default { server: { proxy: { '/api': 'http://localhost:9999' } } }
The server runs on port 9999 by default and connects to MongoDB using the connection string in your .env file.
- Frontend: Optimized with Vite for fast HMR and builds
- Backend: Implements rate limiting and efficient database queries
- Database: Indexed queries for faster data retrieval
Happy Coding! π