rahulanugula/ResQ---AI

GitHub: rahulanugula/ResQ---AI

ResQ AI 是一个基于 FastAPI、MongoDB 和 Gemini AI 构建的全栈应急灾害响应平台,通过实时报警、AI 事件分类和智能资源调度来提升灾害管理效率。

Stars: 0 | Forks: 0

# 🚨 ResQ AI – 智能灾害与应急资源分配平台 ResQ AI 是一个面向市民、应急响应调度员和事故指挥官的 AI 驱动应急管理平台。由 **Google Gemini 1.5 Flash** 提供多模态应急分析支持,并由 **OSRM** 提供实时调度路由支持。 ## ⚡ 快速开始(一键启动) 只需双击 **`run_app.bat`** 或在终端中运行: ``` run_app.bat ``` 这将自动在您的浏览器中启动 **FastAPI 后端(端口 8000)** 和 **前端 Web 应用(端口 5500)**! ## 🔐 演示凭据 您可以使用登录页面 (`login.html`) 上任意一个一键 **演示登录** 按钮快速登录,或使用以下凭据: | 角色 | 邮箱 | 密码 | Dashboard | | :--- | :--- | :--- | :--- | | **市民** | `citizen@demo.resqai` | `Demo@1234` | `citizen.html` | | **调度员** | `operator@demo.resqai` | `Demo@1234` | `operator.html` | | **管理员** | `admin@demo.resqai` | `Demo@1234` | `admin.html` | ## 🏗️ 架构与功能 ``` ResQ AI/ ├── frontend/ # Dark theme UI (Bootstrap 5, Glassmorphism CSS, Vanilla JS) │ ├── index.html # Public Landing Page with interactive stats & hero │ ├── login.html # Auth portal with 1-click demo accounts │ ├── register.html # Citizen & Operator registration │ ├── citizen.html # Citizen emergency reporting dashboard │ ├── report.html # Multi-step emergency submission (Image & Voice AI) │ ├── status.html # Real-time incident timeline & dispatch tracking │ ├── operator.html # Emergency dispatch & live map command center │ ├── admin.html # System administration, user & resource manager │ ├── analytics.html # Interactive Chart.js emergency metrics & KPIs │ ├── hospitals.html # Hospital finder with bed availability & location │ └── css/ # Main design system & landing page CSS ├── backend/ # FastAPI Backend Architecture │ ├── main.py # Entry point & automated startup seeding │ ├── database.py # MongoDB client with in-memory dev database fallback │ ├── config.py # Pydantic environment configuration │ ├── routes/ # REST endpoints (auth, emergencies, resources, hospitals, analytics, admin) │ ├── ai/ # Gemini AI emergency parser & OSRM route optimization │ ├── middleware/ # JWT auth & RBAC permissions │ └── services/ # WebSocket manager for real-time live feed updates ├── start_backend.bat # Launches FastAPI server with dependencies ├── start_frontend.bat # Serves frontend static files on port 5500 └── run_app.bat # 1-Click full-stack launcher ``` ## 🤖 AI 与实时功能 - **多模态应急分析 (Gemini 1.5 Flash):** 自动提取事故分类、严重程度(危急/高/中/低)、优先级评级 (P1-P4)、2-3 句话的摘要以及翻译。 - **实时调度路由 (OSRM):** 计算最快路线、距离(公里)以及前往应急现场的调度预计到达时间 (ETA)。 - **实时 Feed WebSockets:** 无需刷新页面即可向调度员和市民推送实时更新。 - **内存回退模式:** 开箱即用,无需运行本地 MongoDB 实例即可立即工作。 ## 🛠️ 手动开发设置 ### 1. 后端设置 ``` cd backend pip install -r requirements.txt python -m uvicorn main:app --reload --port 8000 ``` 交互式 API 文档位于:**`http://localhost:8000/docs`** ### 2. 前端设置 ``` cd frontend python -m http.server 5500 ``` 在浏览器中打开 **`http://localhost:5500`**。
标签:AI辅助分析, AV绕过, FastAPI, Gemini大模型, MongoDB, 全栈Web应用, 后端开发, 灾害应急管理, 资源调度, 逆向工具