This repository contains the Incident Report App, a robust MERN-stack application designed to report, track, and manage incidents efficiently. It supports both user and admin roles for submitting reports, updating statuses, and managing resolution processes.
- Submit incident reports with descriptions and evidence attachments.
- View status of previously submitted reports.
- Edit unresolved reports.
- View all submitted reports in tabular or filtered format.
- Update report status (e.g., "Pending", "In Progress", "Resolved", "Rejected").
- View user information in tabular format.
| Technology | Purpose |
|---|---|
| MongoDB | NoSQL database for reports and users |
| Express.js | RESTful APIs for backend operations |
| React.js | User interface |
| Node.js | Backend runtime |
| JWT | Role-based authentication & access control |
| Multer | File uploads (e.g., images/documents) |
| Bcrypt | Secure password encryption |
| Dotenv | Manage environment variables |
- Email format validation
- Multifactor authentication (MFA)
- Frontend + backend input validation
- Enforced password length and complexity
- Password reusability prevention
- Real-time password strength meter
- Password hashing with Bcrypt
- Data encryption in transit
- Brute force attack protection (rate limiting)
- Distinct user roles:
user,admin - Route guards for protected endpoints
- Token-based session handling (JWT)
- Secure refresh and access token flow
- Tracks login attempts and report actions (extendable to audit trail)
- HTTPS enforcement for secure communication
- Input sanitization to prevent XSS/SQL injection
- CSRF protection with tokens
- CORS policy management
- Clickjacking protection via Helmet middleware
- NoSQL injection prevention via strict query handling
- Node.js (v18+ recommended)
- npm or yarn
- MongoDB (Atlas or local)
- Git
git clone https://github.com/dilasha-ghimire/Incident-Report-App.git
cd server
# Install dependencies
npm install
# Setup environment variables
cp .env.example .env
# Start the server
npm run devRuns on:
🔗 http://localhost:5000
cd ../client
# Install dependencies
npm install
# Start the dev server
npm run devRuns on:
🌐 http://localhost:5173