Course project: Smart Disaster Response Management Information System — a web frontend for coordinating emergency reports, rescue teams, resources, hospitals, finance, approvals, MIS reporting, and audit trails. The UI is structured so you can plug in a REST API, database, and transaction/RBAC logic on the server side.
| Path | Description |
|---|---|
frontend/ |
React (JavaScript) SPA — dashboards, forms, role-based navigation |
Database Project.pdf |
Full project specification |
Project Rubric.pdf |
Marking breakdown |
- Node.js 18+ (LTS recommended)
- npm (comes with Node)
cd frontend
npm install
npm run devOpen the URL shown in the terminal (usually http://localhost:5173).
| Command | Purpose |
|---|---|
npm run dev |
Development server with hot reload |
npm run build |
Production build into frontend/dist/ |
npm run preview |
Serve the production build locally |
npm run lint |
ESLint |
Copy frontend/.env.example to frontend/.env and adjust:
| Variable | Meaning |
|---|---|
VITE_API_BASE_URL |
Backend base URL without a trailing slash (e.g. http://localhost:4000/api). Leave empty to stay in mock/demo mode. |
VITE_USE_MOCK_DATA |
true uses built-in demo data and mock login; set false when your API is ready. |
If VITE_API_BASE_URL is unset and mock mode is on, the app runs without a server so you can demo UI and roles.
- Implement endpoints that match your stack (Express, FastAPI, ASP.NET, etc.).
- Point
VITE_API_BASE_URLat your API root. - Set
VITE_USE_MOCK_DATA=false. - Extend or remap routes in
frontend/src/services/api.jsso paths match your server.
The HTTP client sends Authorization: Bearer <token> after login when a token is stored in session storage.
Suggested login response shape (adjust to taste):
{
"token": "<jwt-or-session-token>",
"user": {
"id": "...",
"name": "...",
"email": "...",
"roleId": "admin | operator | field | warehouse | finance"
}
}Role IDs must align with frontend/src/constants/roles.js for navigation and route guards.
- Emergency reporting — intake form + incident list (filters/search UI).
- Rescue teams — team type, location, status workflow display.
- Resources — warehouse-oriented inventory + low-stock emphasis.
- Hospitals — capacity-oriented summary table.
- Finance — transactions + summary strip (donations / expenses / procurement categories).
- Approvals — pending / approved / rejected workflow (mock actions until wired).
- MIS reports — charts and filters (sample data; swap for API-driven analytics).
- Audit log — sample audit entries (backend should append real rows).
- RBAC — sidebar and routes filtered by role (Administrator, Emergency Operator, Field Officer, Warehouse Manager, Finance Officer).
- React + Vite
- React Router
- Recharts (dashboards)
Follow your course instructions for ZIP naming, deadlines, and group membership as stated on Google Classroom and in Database Project.pdf.