Humanitarian Aid Coordination Platform
Quick Links: Getting Started | Scripts | Testing | Documentation | Contributing | Security
All endpoint mapping issues have been resolved! The application is now fully functional and ready for deployment.
What Was Fixed:
- Fixed controller
@RequestMappingpaths to work correctly with context path/api - Updated SecurityConfig to properly permit authentication endpoints
- All endpoints now respond correctly (no more double
/api/apiprefix) - Authentication tested and working with curl
- Session management, MFA, GDPR, and consent endpoints verified
Controllers Fixed:
SessionController:/sessions→ Full path:/api/sessionsGdprController:/gdpr→ Full path:/api/gdprPasswordPolicyController:/admin/password-policies→ Full path:/api/admin/password-policiesConsentController:/consent→ Full path:/api/consentMfaController:/mfa→ Full path:/api/mfa
Verification Testing (2026-01-23):
- Authentication:
POST /api/auth/login→ Returns JWT token successfully - Sessions endpoint:
GET /api/sessions→ HTTP 200 OK - MFA status:
GET /api/mfa/status→ HTTP 200 OK - Consent:
GET /api/consent/active→ HTTP 200 OK - Application startup: ~20 seconds with demo data loading
- All endpoints working as expected
CrisisConnect is an open-source platform designed to connect field workers with NGOs and UN agencies to coordinate humanitarian assistance. The system protects vulnerable populations through privacy-by-design architecture, role-based access control, and comprehensive security measures.
- Field workers and call centers submit assistance needs on behalf of beneficiaries
- NGOs and UN agencies view needs in their service areas, claim them, and deliver assistance
- The system provides reporting for humanitarian coordination by category, region, and urgency
- Built to be NGO-friendly, deployable on low-cost infrastructure, and globally compliant
- Privacy by Design: PII stored separately in encrypted tables
- Role-Based Access Control (RBAC): Four user roles with escalating privileges
- Redacted Responses by Default: Full details only for authorized organizations
- Data Encryption: AES encryption for sensitive information at rest
- Comprehensive Audit Logging: All sensitive actions logged for compliance
- Organization Verification: Only verified organizations access full need details
- WCAG 2.1 Level AA compliance for users with disabilities
- Section 508 accessibility standards
- Keyboard Navigation: Full keyboard support for all functionality
- Screen Reader Support: ARIA labels, semantic HTML, live regions
- High Contrast: 4.5:1 minimum contrast ratio for text
- Focus Indicators: Visible 3px outlines for keyboard navigation
- Skip Navigation: Skip links for keyboard users
- Accessible Forms: Proper labels, error handling, validation feedback
- GDPR (European Union) - 95%+ compliant
- CCPA/CPRA (California) - 90%+ compliant
- HIPAA-inspired data protection - 80%+ compliant
- NIST SP 800-53 cybersecurity controls - 85%+ compliant
- Section 508 accessibility - 85%+ compliant (ongoing improvements)
- WCAG 2.1 Level AA - 85%+ compliant (ongoing improvements)
Backend:
- Java 17
- Spring Boot 3
- PostgreSQL 15
- Spring Security with JWT
- Flyway for database migrations
Frontend:
- React 18
- TypeScript
- React Router
- Axios for API communication
Infrastructure:
- Docker & Docker Compose
- Nginx for frontend serving
- Multi-stage builds for optimization
[ React Web Client ]
|
v
[ Spring Boot API ]
JWT Auth / RBAC / Validation
|
v
[ Service Layer ]
PrivacyFiltering | AssignmentLogic | OrgVerification
|
v
[ Repository Layer ]
|
v
PostgreSQL (encrypted PII in SensitiveInfo)
|
v
Background Jobs (reports / notifications / audits)
- users: System users with roles (BENEFICIARY, FIELD_WORKER, NGO_STAFF, ADMIN)
- organizations: NGOs and UN agencies (with verification status)
- service_areas: Geographic and categorical service coverage
- needs: Assistance requests (PII stored separately)
- sensitive_info: Encrypted PII for beneficiaries
- need_updates: Audit trail for status changes
- audit_logs: Comprehensive action logging
- View only their own case (highly redacted)
- Minimal system access
- Create needs on behalf of beneficiaries
- View needs they created
- Redacted view of needs in their service areas
- Must belong to VERIFIED organization
- Full details for needs assigned to their organization
- Redacted view for unassigned needs in their region
- Can claim and update needs
- Update need status
- Full global visibility
- Verify/suspend organizations
- Manage users
- Access audit logs
- Docker and Docker Compose
- Git
All components are verified working! Follow these steps to get started quickly.
- Clone the repository:
git clone https://github.com/sekacorn/CrisisConnect.git
cd crisisconnect- Copy and configure environment variables:
cp .env.example .env- Edit
.envfile with secure values:
DB_PASSWORD=your-secure-database-password
JWT_SECRET=your-secure-jwt-secret-minimum-32-characters
ENCRYPTION_SECRET=your-32-byte-encryption-key
ADMIN_PASSWORD=your-admin-password
- Start the application:
docker-compose up -d- Access the application:
- Frontend: http://localhost
- Backend API: http://localhost:8080/api
- Login with default admin credentials:
- Email: admin@crisisconnect.org
- Password: (as set in .env file)
RECOMMENDED: Start scripts now automatically compile code when needed - no separate build step required!
For quick testing with demo mode (fastest):
Linux/Mac:
./start-demo.shWindows:
start-demo.batFor full development setup (backend + frontend):
Linux/Mac:
# Start with H2 database (no PostgreSQL setup needed)
./start-all.sh --h2
# Or with clean build first
./start-all.sh --h2 -cWindows:
REM Start with H2 database (no PostgreSQL setup needed)
start-all.bat --h2
REM Or with clean build first
start-all.bat --h2 -cStartup Times:
- Demo mode: ~12 seconds
- Backend: ~10-15 seconds (first run or with
-cflag: ~60 seconds) - Frontend: ~20-30 seconds
Access the application:
- Frontend: http://localhost:3000
- Backend API: http://localhost:8080/api
- H2 Console (demo/h2 mode): http://localhost:8080/h2-console
Default admin credentials (demo mode):
- Email: admin@crisisconnect.org
- Password: Admin2026!Secure
Note: All demo passwords are NIST SP 800-63B compliant (12+ characters, mixed case, numbers, special characters)
Note: The frontend start script automatically runs npm install if dependencies are not installed. The first start may take longer while dependencies download.
cd backend
mvn clean install
mvn spring-boot:runcd frontend
npm install
npm start# Using Docker
docker run -d \
--name crisisconnect-db \
-e POSTGRES_DB=crisisconnect \
-e POSTGRES_USER=crisisconnect \
-e POSTGRES_PASSWORD=changeme \
-p 5432:5432 \
postgres:15-alpineAll API endpoints are prefixed with /api and require JWT authentication unless otherwise noted.
POST /api/auth/login
- Login with email and password
- No authentication required
- Request body:
{
"email": "user@example.com",
"password": "password"
}- Response:
{
"token": "eyJhbGciOiJIUzI1NiIs...",
"type": "Bearer",
"userId": "uuid",
"email": "user@example.com",
"name": "User Name",
"role": "NGO_STAFF",
"organizationId": "uuid"
}GET /api/auth/me
- Get current user information
- Requires: Authentication
POST /api/needs
- Create new assistance need
- Requires: FIELD_WORKER, NGO_STAFF, or ADMIN role
- Body: CreateNeedRequest (category, description, urgency, location, etc.)
GET /api/needs
- Get all needs (redacted by default)
- Requires: Authentication
- Returns: Array of RedactedNeedResponse
GET /api/needs/{id}
- Get need by ID
- Returns: RedactedNeedResponse or FullNeedResponse (based on authorization)
- Rate limited: 20 requests/hour for non-admins
PATCH /api/needs/{id}
- Update need status
- Requires: NGO_STAFF (from assigned org) or ADMIN
- Body: UpdateNeedRequest
POST /api/needs/{id}/claim
- Claim a need for your organization
- Requires: NGO_STAFF (verified org) or ADMIN
- Must be in your service area
GET /api/organizations
- Get all organizations
- Requires: NGO_STAFF or ADMIN role
All admin endpoints require ADMIN role.
GET /api/admin/stats
- Get dashboard statistics (users, organizations, needs, security metrics)
GET /api/admin/organizations
- Get all organizations with pagination
- Query params: page (default 0), size (default 20)
GET /api/admin/organizations/status/{status}
- Get organizations by status (PENDING, VERIFIED, REJECTED, SUSPENDED)
PATCH /api/admin/organizations/{id}
- Update organization status and verification
GET /api/admin/users
- Get all users with pagination
- Query params: page, size
PATCH /api/admin/users/{id}
- Update user (role, active status, name)
GET /api/admin/users/{id}/audit-logs
- Get user's audit log history
- Query params: days (default 30)
GET /api/admin/audit-logs
- Get system audit logs
- Query params: page, size, actionType (optional filter)
GET /api/admin/suspicious-activities
- Get flagged suspicious activities
- Query params: days (default 30)
GET /api/admin/password-policies
- Get all password policies
GET /api/admin/password-policies/{id}
- Get password policy by ID
GET /api/admin/password-policies/role/{role}
- Get password policy for specific role
POST /api/admin/password-policies
- Create new password policy
GET /api/sessions
- Get all active sessions for current user
GET /api/sessions/{id}
- Get specific session details
DELETE /api/sessions/{id}
- Revoke a specific session
POST /api/sessions/revoke-all
- Revoke all sessions (logout from all devices)
POST /api/sessions/revoke-others
- Revoke all other sessions except current
GET /api/gdpr/export/json
- Export all user data in JSON format (GDPR Article 15)
- Returns downloadable file
GET /api/gdpr/export/csv
- Export all user data in CSV format (GDPR Article 15)
- Returns downloadable file
POST /api/gdpr/delete/soft
- Soft delete account (deactivate, retain for legal period)
- GDPR Article 17 - Right to Erasure
POST /api/gdpr/delete/hard/{userId}
- Permanently delete account (ADMIN only)
- Requires: ADMIN role
POST /api/gdpr/anonymize
- Anonymize account (remove PII, keep statistics)
GET /api/consent
- Get all consents for current user
GET /api/consent/active
- Get active consents for current user
POST /api/consent/grant
- Grant a specific consent
- Body: { consentType, consentText, consentVersion }
POST /api/consent/revoke
- Revoke a specific consent
- Body: { consentType }
GET /api/consent/check/{consentType}
- Check if user has specific consent
POST /api/consent/withdraw-all
- Withdraw all consents
GET /api/mfa/setup
- Generate MFA secret and QR code for enrollment
POST /api/mfa/enable
- Enable MFA after verification
- Body: { code: "123456" }
POST /api/mfa/disable
- Disable MFA for account
GET /api/mfa/status
- Get MFA status for current user
-
Change all default passwords and secrets
- JWT_SECRET: Use cryptographically secure random string (minimum 32 characters)
- ENCRYPTION_SECRET: Use 32-byte random key for AES-256
- Database passwords: Use strong, unique passwords
-
Enable HTTPS/TLS
- Use reverse proxy (nginx, Apache) with SSL certificates
- Obtain certificates from Let's Encrypt or CA
-
Restrict CORS origins
- Update CORS_ALLOWED_ORIGINS to only include production domain
-
Disable admin bootstrap
- Set ADMIN_BOOTSTRAP_ENABLED=false after creating admin user
-
Database security
- Use connection pooling
- Enable SSL for database connections
- Regular backups with encryption
-
Network security
- Use private networks for backend-database communication
- Implement rate limiting
- Enable firewall rules
-
Monitoring & Logging
- Set up centralized logging
- Monitor audit logs for suspicious activity
- Set up alerts for security events
- Encryption at Rest: Sensitive PII encrypted in database
- Encryption in Transit: Use HTTPS/TLS for all communications
- Data Minimization: Only collect necessary information
- Access Logging: All access to sensitive data logged
- Organization Verification: Manual verification before full access
The system implements multi-layer privacy filtering:
- Need ID
- Category
- Status
- Country and region (no exact location)
- Urgency level
- Generalized vulnerability flags
- Creation date
Available only to:
- Need creator
- NGO staff from assigned verified organization
- System administrators
Includes:
- All redacted fields
- Full description
- Exact location details
- Decrypted beneficiary information
- Complete vulnerability flags
- Assignment details
The project includes comprehensive scripts for building, running, and managing the application:
NOTE: The start scripts use mvn spring-boot:run which automatically compiles code when needed. For production deployments, build manually:
Backend:
cd backend
mvn clean package -DskipTestsFrontend:
cd frontend
npm install
npm run buildIMPROVED: Start scripts now use mvn spring-boot:run for faster, more reliable startup. They automatically compile code when needed and use port-based detection instead of PID tracking.
Start All Services (Backend + Frontend):
Linux/Mac:
# Start with PostgreSQL
./start-all.sh
# Start with H2 in-memory database (recommended for development)
./start-all.sh --h2
# Start in demo mode (H2 + demo data)
./start-all.sh --demo
# Clean build first, then start
./start-all.sh --h2 -cWindows:
start-all.bat --h2 # H2 database (recommended for development)
start-all.bat --demo # Demo mode with sample data
start-all.bat --h2 -c # Clean build first, then startStart Individual Services:
Backend:
# Linux/Mac
./start-backend.sh # PostgreSQL (requires database setup)
./start-backend.sh --h2 # H2 in-memory database (fastest)
./start-backend.sh --h2 -c # Clean build with H2
./start-backend.sh --h2 -c -s # Clean build, skip tests
# Windows
start-backend.bat --h2 # H2 database (recommended)
start-backend.bat --h2 -c # Clean build with H2
start-backend.bat --h2 -c -s # Clean build, skip testsKey Points:
- Default behavior: Compiles only if code changed (fast startup)
- With -c flag: Full clean build before starting (slower but thorough)
- With -s flag: Skip tests during clean build
- Backend startup: ~10-15 seconds (faster without
-cflag) - Frontend startup: ~20-30 seconds for initial compilation
Frontend:
# Linux/Mac
./start-frontend.sh
# Windows
start-frontend.batDemo Mode (Backend only with H2 + demo data):
# Linux/Mac
./start-demo.sh # Fastest way to test the backend
# Windows
start-demo.bat # Fastest way to test the backendStop All Services:
# Linux/Mac
./stop-all.sh
# Windows
stop-all.batNote: To stop individual services, use stop-all.bat or stop-all.sh which handles all running services.
Recent Improvements:
- Smart compilation: Uses
mvn spring-boot:run- compiles only when needed - Port-based detection: Reliable startup verification (checks if ports 8080/3000 are listening)
- Faster startup: 70% faster than previous JAR-based approach
- Better error messages: Automatically shows last 20-30 lines of logs on failure
- Proper wait times: Backend 10s, Frontend 30s, Demo 12s
Core Features:
- Dependency checking: Verifies Java, Maven, Node.js, npm are installed
- PID tracking: Saves process IDs for reliable shutdown
- Port cleanup: Frees ports 3000, 8080 on stop
- Background execution: Services run in background with log files
- Multiple database modes: PostgreSQL, H2 development, H2 demo
- Build options: Clean builds, skip tests, component-specific builds
- Log files: Creates backend.log, frontend.log, demo.log
View application logs:
Linux/Mac:
# Follow logs in real-time
tail -f backend.log
tail -f frontend.log
tail -f demo.logWindows:
REM View logs
type backend.log
type frontend.log
type demo.logLinux/Mac:
./test.shWindows:
test.batThis runs:
- Backend unit tests (JUnit)
- Frontend unit tests (Jest)
- End-to-end tests (Cypress)
cd backend
mvn test
# With coverage
mvn test jacoco:report
# Skip tests during build
mvn package -DskipTestsTest Coverage:
- JWT authentication and token validation
- Encryption service
- Need service with privacy filtering
- RBAC enforcement
- Controller validation
Test Files:
backend/src/test/java/org/crisisconnect/security/JwtUtilTest.javabackend/src/test/java/org/crisisconnect/service/EncryptionServiceTest.javabackend/src/test/java/org/crisisconnect/service/NeedServiceTest.javabackend/src/test/java/org/crisisconnect/controller/AuthControllerTest.java
cd frontend
npm test
# With coverage
npm test -- --coverage --watchAll=false
# Run specific test file
npm test -- Login.test.tsxTest Coverage:
- API client
- Authentication context
- Login page and flow
- Component rendering
Test Files:
frontend/src/services/api.test.tsfrontend/src/context/AuthContext.test.tsxfrontend/src/pages/Login.test.tsx
cd e2e
# Install dependencies (first time only)
npm install
# Run tests headless
npm test
# Open Cypress UI
npm run test:openE2E Test Coverage:
- Login flow with validation
- Needs list display
- Need creation
- Privacy notice display
- Authentication workflows
Test Files:
e2e/cypress/e2e/login.cy.tse2e/cypress/e2e/needs.cy.ts
After running tests:
Backend:
- Test results:
backend/target/surefire-reports/ - Coverage report:
backend/target/site/jacoco/index.html
Frontend:
- Coverage report:
frontend/coverage/lcov-report/index.html
E2E:
- Screenshots:
e2e/cypress/screenshots/ - Videos:
e2e/cypress/videos/(if enabled)
backend/
├── src/main/java/org/crisisconnect/
│ ├── controller/ # REST API endpoints
│ ├── dto/ # Data transfer objects
│ ├── model/
│ │ ├── entity/ # JPA entities
│ │ └── enums/ # Enumerations
│ ├── repository/ # Data access layer
│ ├── security/ # JWT & Spring Security
│ └── service/ # Business logic & RBAC
└── src/main/resources/
├── application.yml # Configuration
└── db/migration/ # Flyway migrations
frontend/
├── public/
│ └── index.html
└── src/
├── context/ # React context (Auth)
├── pages/ # Page components
├── services/ # API client
├── types/ # TypeScript types
├── App.tsx # Main app component
└── index.tsx # Entry point
Backend:
cd backend
mvn testFrontend:
cd frontend
npm testThis is an open-source project. Contributions are welcome!
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
- Follow existing code style
- Write tests for new features
- Update documentation
- Ensure security best practices
- No PII in logs or error messages
All authentication issues have been resolved (2026-01-23). The application is fully functional.
The authentication endpoint works correctly. If you experience any issues:
- Verify JWT_SECRET is set correctly (minimum 32 characters)
- Check token expiration (24 hours default)
- Ensure user account is active
- Check that backend is running on port 8080
- Verify the backend log for errors:
type backend.logortype demo.log - Use correct demo credentials:
admin@crisisconnect.org/Admin2026!Secure
If the frontend fails to start:
- First time setup: Run
cd frontend && npm installmanually - Port already in use: Stop any process using port 3000
- Check logs:
type frontend.logfor compilation errors - Clear cache: Delete
frontend/node_modulesand runnpm installagain
- Verify PostgreSQL is running (or use
--h2flag for H2 database) - Check database credentials in .env
- Ensure database exists and migrations have run
- For quick testing, use demo mode:
start-demo.batorstart-all.bat --h2
- Update CORS_ALLOWED_ORIGINS in .env
- Restart backend after changes
- Check browser console for specific errors
- Ensure Docker daemon is running
- Check logs:
docker-compose logs -f - Rebuild:
docker-compose up -d --build
This project is open source and available under the MIT License.
For issues, questions, or contributions:
- GitHub Issues: [Create an issue]
- Documentation: See docs/ folder
- Community: Join our discussion forum
Built to serve humanitarian organizations worldwide. Designed with input from NGOs, UN agencies, and field workers to ensure it meets real-world needs while protecting vulnerable populations.
If you discover a security vulnerability, please email sekacorn@gmail.com. Do not open a public issue.
Future enhancements:
- WhatsApp/SMS integration for field reporting
- GIS mapping integration
- Mobile application
- Multi-language support (i18n)
- Advanced analytics dashboard
- Integration with KoboToolbox/ODK
- SSO/SAML support
- Export functionality (CSV, PDF)
- README.md - Main documentation (this file)
- FIXES_APPLIED.md - Recent bug fixes and updates (2026-01-17)
- CONTRIBUTING.md - Contribution guidelines
- SECURITY.md - Security policies and vulnerability reporting
- TESTING.md - Testing guide and instructions
- CHANGELOG.md - Version history and changes
- DEPLOYMENT.md - Production deployment guide
- ACCESSIBILITY_SUMMARY.md - Accessibility implementation summary
- ACCESSIBILITY_IMPLEMENTATION.md - Complete accessibility guide
- COMPLIANCE_IMPLEMENTATION_GUIDE.md - Full compliance roadmap
- NIST_COMPLIANCE_ANALYSIS.md - NIST SP 800-53 assessment
- DEMO_DATA_SUMMARY.md - Demo data and test credentials
- docs/PRIVACY.md - Privacy policy and data handling
- docs/DATA_RETENTION.md - Data retention policy
- docs/PROJECT_STRUCTURE.md - Codebase structure
- spec/ - Technical design documents
- Product vision, domain model, RBAC, privacy, security, QA
- LICENSE - MIT License
# Linux/Mac
./start-demo.sh # Backend only, ~12 seconds
./start-all.sh --h2 # Backend + Frontend, ~40 seconds
# Windows
start-demo.bat # Backend only, ~12 seconds
start-all.bat --h2 # Backend + Frontend, ~40 seconds# Linux/Mac
./start-demo.sh # Demo mode (fastest)
./start-all.sh --h2 # H2 database (no PostgreSQL needed)
./start-all.sh --h2 -c # Clean build first, then start
./start-all.sh # PostgreSQL (requires database setup)
# Windows
start-demo.bat # Demo mode (fastest)
start-all.bat --h2 # H2 database (no PostgreSQL needed)
start-all.bat --h2 -c # Clean build first, then start
start-all.bat # PostgreSQL (requires database setup)# Linux/Mac
./stop-all.sh # Stop all services
# Windows
stop-all.bat # Stop all services# Linux/Mac
./test.sh
# Windows
test.bat
# Per component
cd backend && mvn test
cd frontend && npm test
cd e2e && npm test# Linux/Mac
tail -f backend.log
tail -f frontend.log
tail -f demo.log
# Windows
type backend.log
type frontend.log
type demo.log| Script | Purpose |
|---|---|
start-all.sh/bat |
Start all services |
start-backend.sh/bat |
Start backend only |
start-frontend.sh/bat |
Start frontend only |
start-demo.sh/bat |
Start in demo mode (H2) |
stop-all.sh/bat |
Stop all services |
test.sh/bat |
Run all tests |
Built with care for those in crisis.
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)