{"id":28670958,"url":"https://github.com/slfagrouche/safeguard","last_synced_at":"2026-04-21T16:41:20.604Z","repository":{"id":276929218,"uuid":"927457229","full_name":"slfagrouche/SafeGuard","owner":"slfagrouche","description":"Real-time crisis monitoring platform for conflict zones and disaster areas. FastAPI + React + MongoDB + OpenAI GPT-4o.","archived":false,"fork":false,"pushed_at":"2026-04-15T04:22:24.000Z","size":435,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-15T06:21:55.670Z","etag":null,"topics":["agent","ai","aws-ec2","aws-lambda","aws-s3","crisis-monitoring","django","fastapi","leaflet","mongodb","non-profit","openai","react","real-time","rest-api","shadcn-ui","tailwindcss","websocket"],"latest_commit_sha":null,"homepage":"https://safeguard-neon.vercel.app/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/slfagrouche.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-02-05T01:37:27.000Z","updated_at":"2026-04-15T04:22:28.000Z","dependencies_parsed_at":"2025-04-08T08:36:09.418Z","dependency_job_id":null,"html_url":"https://github.com/slfagrouche/SafeGuard","commit_stats":null,"previous_names":["slfagrouche/safeguard"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/slfagrouche/SafeGuard","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slfagrouche%2FSafeGuard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slfagrouche%2FSafeGuard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slfagrouche%2FSafeGuard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slfagrouche%2FSafeGuard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/slfagrouche","download_url":"https://codeload.github.com/slfagrouche/SafeGuard/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slfagrouche%2FSafeGuard/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32101134,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-21T11:25:29.218Z","status":"ssl_error","status_checked_at":"2026-04-21T11:25:28.499Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent","ai","aws-ec2","aws-lambda","aws-s3","crisis-monitoring","django","fastapi","leaflet","mongodb","non-profit","openai","react","real-time","rest-api","shadcn-ui","tailwindcss","websocket"],"created_at":"2025-06-13T18:38:44.853Z","updated_at":"2026-04-21T16:41:20.595Z","avatar_url":"https://github.com/slfagrouche.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SafeGuard\nReal-time crisis monitoring and alert platform. Track incidents, coordinate emergency response, and get AI-powered safety guidance across conflict zones and humanitarian crises worldwide.\n\n**Live:** [safeguard-neon.vercel.app](https://safeguard-neon.vercel.app/)\n\n\u003cimg width=\"1728\" height=\"997\" alt=\"image\" src=\"https://github.com/user-attachments/assets/37172509-5d70-46a1-add2-8c0a27e71370\" /\u003e\n\u003cimg width=\"1720\" height=\"1000\" alt=\"image\" src=\"https://github.com/user-attachments/assets/6437b2dd-c9b0-48af-87b7-d268cd587515\" /\u003e\n\u003cimg width=\"1607\" height=\"994\" alt=\"image\" src=\"https://github.com/user-attachments/assets/3eb42054-8fe2-4254-934a-781dc1cb2a38\" /\u003e\n\n## What it does\n\n- **Interactive crisis map** with real-time incident tracking, severity indicators, and marker clustering (Leaflet + WebSocket)\n- **5 specialized AI agents** (General, Medical, Situational, Recommendation, Map Intelligence) powered by GPT-4o with tool calling\n- **Emergency services** directory with one-tap calling for 15+ countries\n- **Incident reporting** with geolocation, image upload, and community verification/flagging\n- **Admin dashboard** for incident triage, subscriber management, and analytics\n- **Real-time updates** via WebSocket push for new incidents\n\n## Architecture\n\n```\nFrontend (React + Tailwind + Leaflet)  --\u003e  Vercel\n     |\n     v\nBackend (FastAPI + Motor)              --\u003e  Railway\n     |\n     v\nMongoDB (Atlas / Railway)              --\u003e  Railway\n```\n\n**Backend:** FastAPI with async MongoDB (Motor), JWT auth, rate limiting, structured logging, CORS hardening\n\n**Frontend:** React 19, Tailwind CSS, shadcn/ui (Radix), Leaflet maps with clustering, Recharts analytics\n\n**AI:** OpenAI GPT-4o with function calling, 5 agent types with domain-specific system prompts and knowledge base (30+ country/first-aid guides)\n\n## Tech stack\n\n| Layer | Tech |\n|-------|------|\n| Frontend | React 19, Tailwind, shadcn/ui, Leaflet, Recharts |\n| Backend | Python 3.12, FastAPI, Motor (async MongoDB), Pydantic |\n| AI | OpenAI GPT-4o, tool calling, RAG over local knowledge base |\n| Database | MongoDB |\n| Auth | JWT (HttpOnly cookies), bcrypt password hashing |\n| Infra | Docker, Railway (backend + DB), Vercel (frontend) |\n| Real-time | WebSocket (Starlette) |\n\n## Quick start\n\n```bash\n# Backend\ncd backend\ncp .env.example .env        # fill in your keys\npip install -r requirements.txt\nuvicorn server:app --reload\n\n# Frontend\ncd frontend\ncp .env.example .env\nyarn install \u0026\u0026 yarn start\n```\n\n## API\n\n| Method | Endpoint | Description |\n|--------|----------|-------------|\n| POST | `/api/auth/login` | Login (returns JWT cookie) |\n| GET | `/api/auth/me` | Current user |\n| GET | `/api/incidents/` | List all incidents |\n| POST | `/api/report/` | Report new incident |\n| POST | `/api/incidents/{id}/flag/` | Flag incident |\n| POST | `/api/ai/chat/` | AI chat (async, returns task ID) |\n| GET | `/api/ai/status/{id}/` | Poll AI task result |\n| GET | `/api/resources/` | List resources |\n| GET | `/api/emergency/regions/` | Emergency numbers by region |\n| WS | `/ws/incidents` | Real-time incident feed |\n\n## Security\n\n- JWT auth with HttpOnly secure cookies\n- bcrypt password hashing\n- Per-endpoint rate limiting\n- CORS restricted to known origins in production\n- No secrets in codebase (env-only configuration)\n- Input validation on all endpoints\n- Admin-only routes with role-based access\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslfagrouche%2Fsafeguard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fslfagrouche%2Fsafeguard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslfagrouche%2Fsafeguard/lists"}