How mohammad-zaben/human_rights_monitor works
Human Rights Monitor is a FastAPI backend for submitting and managing human-rights incident reports, victims and witnesses, cases, and user accounts. The principal workflow is an API client submitting a report or case; the relevant route validates the payload, stores uploaded evidence, generates an identifier, and persists the record in MongoDB. Authenticated users can query and update records, while case workflows include lawyer assignment and status tracking. README capabilities for users and victim/witness resources are represented, though their route implementations were not sampled.
Main entry points: database.py MongoDB access · main.py FastAPI app · cases.py Case management · incident_report.py Incident reports
Components 21
API entry and auth
- FastAPI app
app/main.py - Auth routes
app/routes/auth.py - Token validation
app/auth/oauth.py - JWT utilities
app/auth/jwt.py - Password hashing
app/auth/hashing.py
Monitoring records
- Case management
app/routes/cases.py - Case schema
app/models/cases.py - Incident reports
app/routes/incident_report.py - Report schema
app/models/incident_report.py - Evidence uploads
app/routes/evidence.py - Incident data schema
app/models/incident_report.py
Users and people
- User management
app/routes/users.py - User schema
app/models/users.py - Victim witness records
app/routes/victim_witness.py - Victim witness schema
app/models/victim_witness.py
Persistence and evidence
- MongoDB access
app/database.py - ID generation
app/services/id_genarator.py - Cloudinary setup
app/services/cloudinary_config.py
Other components
- API client
- MongoDB
- Cloudinary
Connections 30
- API client → FastAPI app: sends requests
- FastAPI app → Auth routes: routes auth
- FastAPI app → User management: routes users
- FastAPI app → Case management: routes cases
- FastAPI app → Incident reports: routes reports
- FastAPI app → Victim witness records: routes people
- FastAPI app → MongoDB access: connects at startup
- Auth routes → MongoDB access: reads users
- Auth routes → Password hashing: verifies password
- Auth routes → JWT utilities: creates token
- Token validation → JWT utilities: verifies token
- Case management → Token validation: validates identity
- Incident reports → Token validation: validates identity
- User management → Token validation: validates identity
- Victim witness records → Token validation: validates identity
- Case management → Case schema: validates cases
- Incident reports → Report schema: validates reports
- Case management → Evidence uploads: stores uploads
- Incident reports → Evidence uploads: stores uploads
- Case management → ID generation: generates case ID
- Incident reports → ID generation: generates report ID
- Case management → MongoDB access: reads and writes
- Incident reports → MongoDB access: reads and writes
- User management → MongoDB access: reads and writes
- Victim witness records → MongoDB access: reads and writes
- Evidence uploads → MongoDB access: stores metadata
- ID generation → MongoDB access: updates counters
- MongoDB access → MongoDB: queries
- Cloudinary setup → Cloudinary: configures integration
- Evidence uploads → Cloudinary setup: may use