A secure, GDPR-compliant web application for managing military hearing loss compensation claims with comprehensive security features and production-ready deployment configuration.
- Data Encryption: AES-256-GCM encryption for all PII data
- Authentication: JWT with refresh tokens, 2FA support
- Rate Limiting: Comprehensive endpoint protection
- Input Validation: XSS, SQL injection, and MongoDB injection prevention
- Security Headers: Full Helmet.js implementation with HSTS, CSP, etc.
- Audit Logging: Complete audit trail with Winston
- GDPR Compliant: Data encryption, anonymization, and retention policies
- Node.js 18+
- MongoDB 5.0+
- SSL certificates (for production)
- Clone the repository:
git clone https://github.com/your-org/mod-hearing-help.git
cd mod-hearing-help
- Install dependencies:
# Backend
cd backend
npm install
# Frontend
cd ../frontend
npm install
- Configure environment:
cd ../backend
cp .env.example .env
# Edit .env with your configuration
- Generate secure keys:
# Generate JWT secret
node -e "console.log('JWT_SECRET=' + require('crypto').randomBytes(32).toString('hex'))"
# Generate encryption key
node -e "console.log('ENCRYPTION_KEY=' + require('crypto').randomBytes(32).toString('hex'))"
- Start development servers:
# Backend (Terminal 1)
cd backend
npm run dev
# Frontend (Terminal 2)
cd frontend
npm start
mod-hearing-help/
βββ backend/
β βββ config/ # Configuration files
β βββ middleware/ # Express middleware
β βββ models/ # Mongoose models
β βββ routes/ # API routes
β βββ services/ # Business logic
β βββ utils/ # Utility functions
β βββ server.js # Main server file
βββ frontend/
β βββ public/ # Static assets
β βββ src/
β β βββ components/ # React components
β β βββ pages/ # Page components
β β βββ services/ # API services
β β βββ styles/ # CSS styles
β βββ package.json
βββ DEPLOYMENT.md # Production deployment guide
βββ .env.example # Environment template
βββ README.md
All sensitive configuration is stored in environment variables:
- Database credentials
- JWT secrets
- API keys
- Encryption keys
- At Rest: AES-256-GCM encryption for PII
- In Transit: HTTPS/TLS 1.2+ required
- IP Anonymization: GDPR-compliant IP handling
- Session Security: Secure, httpOnly, sameSite cookies
- User login with email/password
- Password verification with bcrypt (12 rounds)
- JWT token generation (15min expiry)
- Refresh token for session extension
- Optional 2FA verification
POST /api/auth/login
- User authenticationPOST /api/submissions/submit
- Form submissionGET /api/health
- Health check
GET /api/dashboard/*
- Dashboard data (requires auth)POST /api/auth/logout
- User logoutGET /api/submissions/:id
- Get submission details
- Real-time submission tracking
- IP location tracking
- Status management
- Export to Excel/CSV
- Google Sheets integration
- WebSocket live updates
npm test
npm run lint
npm audit
cd backend/scripts
node migrate-reference-numbers.js
See DEPLOYMENT.md for detailed production deployment instructions.
npm install -g pm2
pm2 start ecosystem.config.js
pm2 save
pm2 startup
Key environment variables required:
NODE_ENV=production
PORT=5009
MONGODB_URI=mongodb://...
JWT_SECRET=[256-bit hex]
ENCRYPTION_KEY=[32-byte hex]
CORS_ORIGIN=https://yourdomain.com
- Logs: Located in
/logs
directory - PM2 Monitor:
pm2 monit
- Health Check:
GET /api/health
- Response Time: < 200ms average
- Concurrent Users: 1000+ supported
- Database Pooling: 10 connections
- Rate Limiting: 100 req/15min per IP
- Fork the repository
- Create feature branch (
git checkout -b feature/AmazingFeature
) - Commit changes (
git commit -m 'Add AmazingFeature'
) - Push to branch (
git push origin feature/AmazingFeature
) - Open Pull Request
This project is proprietary and confidential. All rights reserved.
For issues or questions:
- Technical Support: support@modhearinghelp.co.uk
- Security Issues: security@modhearinghelp.co.uk
- β GDPR Compliant
- β UK Data Protection Act 2018
- β FCA Guidelines
- β Military Data Handling Standards
Version: 1.0.0
Last Updated: September 2025
Security Audit: Passed β