Skip to content

9059Rohith/Disaster_Mangement

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Sure! Here's a basic README.md file for your AI Disaster Management App (Disaster Guard) project. It covers setup instructions for both backend and frontend, and can be expanded as needed:


``

🌐 Disaster Guard - AI Disaster Management App

An AI-powered platform to report, monitor, and manage disaster-related data in real-time. This application consists of a Node.js + Express backend, a Vite + React frontend, and MongoDB for the database.


📁 Project Structure

ai-disaster-management/
├── backend/
│   ├── config/
│   ├── middleware/
│   ├── models/
│   ├── routes/
│   ├── .env
│   └── server.js
├── frontend/
│   ├── public/
│   ├── src/
│   └── vite.config.js
└── README.md

⚙️ Backend Setup

1. Navigate to backend folder

cd backend

2. Install dependencies

npm install

3. Add .env file

Create a .env file in the backend/ directory:

PORT=5000
NODE_ENV=development
MONGODB_URI=your-mongodb-uri-here

4. Run backend server

npm start

By default, the server runs on http://localhost:5000


💻 Frontend Setup

1. Navigate to frontend folder

cd ../frontend

2. Install dependencies

npm install

3. Add .env file (optional for API URL)

VITE_API_URL=http://localhost:5000/api

4. Start development server

npm run dev

5. Build for production

npm run build

This will create the dist/ folder, which will be used by the backend to serve the frontend in production.


🚀 Deployment (Full Stack)

Ensure your backend is set to serve static files in production:

// Inside backend/server.js
if (process.env.NODE_ENV === 'production') {
  app.use(express.static(path.join(__dirname, '../frontend/dist')));
  app.get('*', (req, res) => {
    res.sendFile(path.resolve(__dirname, '../frontend/dist', 'index.html'));
  });
}

📦 Technologies Used

  • Frontend: React, Vite, Tailwind CSS,Next js
  • Backend: Node.js, Express.js
  • Database: MongoDB
  • Other Tools: Dotenv, CORS, Mongoose

👥 Features

  • 🔐 User authentication (login/register)
  • ⚠️ Real-time disaster alert reporting
  • 📍 Resource tracking (supplies, shelters, etc.)
  • 🛰️ Integration with external disaster-related APIs
  • 📊 Admin dashboard (optional)

🧑‍💻 Author

Made by D.ROHITH KUMAR


📃 License

This project is licensed under the MIT License.


---

Let me know if you want to add screenshots, a contributing section, or deployment instructions for Render/Netlify/Vercel.


About

Disaster Guard is a full-stack web app that helps monitor and respond to natural disasters using real-time weather data, citizen reports, and a centralized admin dashboard. Built with React, Node.js, and MongoDB, it supports efficient disaster management and decision-making.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors