CrisisConnect is a comprehensive web application designed to streamline emergency service requests and coordination. Built using the MERN stack (MongoDB, Express.js, React.js, Node.js), CrisisConnect provides a user-friendly platform for requesting emergency assistance such as fire, police, hospital, and medical support.
- Introduction
- Features
- System Requirements
- Installation
- Usage
- API Endpoints
- Database Schema
- Security Considerations
- Future Enhancements
- Contributing
CrisisConnect aims to provide a seamless and efficient platform for users to request and receive emergency assistance. The application supports four types of emergency services: fire, police, hospital, and medical support. Users can register, log in, and request help, while administrators can view and manage these requests in real-time.
- User registration and login system
- Dashboard for requesting fire, police, hospital, and medical support
- Location-based emergency service requests
- Real-time admin panel for managing requests
- Live chat system for user-admin communication
- Donation system via QR code scanning
- Email notifications for request confirmations
- Node.js
- MongoDB
- Express
- React
- npm (Node Package Manager)
- A web browser (e.g., Google Chrome, Mozilla Firefox)
-
Clone the repository: ``` git clone https://github.com/BiswajitRakshit7781/CrisisConnect-Emergency-Service-Provider.git ```
-
Navigate to the project directory: ``` cd CrisisConnect ```
-
Install server dependencies: ``` cd server npm install ```
-
Install client dependencies: ``` cd ../client npm install ```
-
Set up environment variables:
- Create a .env file in the server directory and configure the necessary environment variables (e.g., database URI, JWT secret).
-
Start the development server:
- Start the backend server: ``` cd server npm start ```
- Start the frontend development server: ``` cd ../client npm start ```
-
Registration:
- Navigate to the registration page.
- Fill in personal details including name, email, phone number, and password.
- Submit the registration form.
-
Login:
- Navigate to the login page.
- Enter email and password.
- Submit the login form to access the dashboard.
-
Dashboard:
- After logging in, the user is directed to the dashboard.
- The dashboard presents four emergency support options: Fire, Police, Hospital, and Medical.
-
Requesting Help:
- Click on the desired emergency service button.
- Choose whether help is needed at the current location or the home location.
- Confirm the request.
-
Confirmation:
- Users will receive a confirmation email once the request is processed.
-
Login:
- Admins log in via the admin login page using their credentials.
-
View Requests:
- The admin dashboard displays a list of user requests.
-
Manage Requests:
- Admins can contact the nearest emergency service (police station, fire brigade, hospital, medical shop) based on the user’s location.
- After dispatching help, the admin updates the request status.
- Users can contact admins through the live chat system for real-time assistance.
- Users can donate to CrisisConnect by scanning the provided QR code.
- POST /api/users/register: Register a new user
- POST /api/users/login: User login
- GET /api/users/:id: Get user details
- POST /api/requests: Create a new request
- GET /api/requests: Get all requests (Admin only)
- GET /api/requests/:id: Get request details
- PUT /api/requests/:id: Update request status (Admin only)
- POST /api/admin/login: Admin login
- GET /api/chat: Get chat messages
- POST /api/chat: Send a chat message
- name: String
- email: String
- phone: String
- password: String (hashed)
- homeLocation: String
- userId: ObjectId (reference to User)
- type: String (fire, police, hospital, medical)
- location: String
- status: String (pending, dispatched, completed)
- createdAt: Date
- username: String
- password: String (hashed)
- userId: ObjectId (reference to User)
- message: String
- timestamp: Date
- Passwords are hashed using bcrypt.
- JWT is used for authentication and authorization.
- SSL should be implemented for secure data transmission.
- Input validation and sanitization to prevent XSS and SQL injection attacks.
- Mobile app version for Android and iOS.
- Integration with real-time GPS services for accurate location tracking.
- Enhanced admin dashboard with analytics.
- Multi-language support for wider accessibility.
Contributions are welcome! Please fork the repository and submit pull requests for any enhancements or bug fixes.