# Fire_agent_front **Repository Path**: WJLGraph/fire_agent_front ## Basic Information - **Project Name**: Fire_agent_front - **Description**: 在我毕业可视化系统基础上修改成agent项目 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-08-31 - **Last Updated**: 2026-11-08 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # FlameSentry · Smart Fire-Risk Early Warning & Multi-Agent Collaboration Platform — Frontend (fire_agent_front) > **Current version**: v1.0.1 (including post-v1.0.1 iterations: frontend structure refactor / visual system v2 / 2D-3D map migration / knowledge-base original-file reading / security hardening & streaming reliability — see [10. Version History](#10-version-history)) > This repository is the frontend of "FlameSentry — Smart Fire-Risk Early Warning & Multi-Agent Collaboration Platform" (deployed name: **焰哨多Agent与可视化平台**), built with **Vue 3 + Vite + OpenLayers + Three.js + ECharts + Element Plus**. > Backend: [fire_agent_back](https://gitee.com/WJLGraph/Fire_agent_back) (FastAPI + PostgreSQL/PostGIS + LangChain/LangGraph) > The full system design document is `整体实现.md` in the backend repository. > **Live demo**: https://wjl2004.ffuf.cn/ or https://8.156.67.47/login > **Demo account**: test / 123456 > **GitHub**: https://github.com/wjl-cong/fire_agent (Stars welcome) --- ## Table of Contents 1. [Overview](#1-overview) 2. [Tech Stack](#2-tech-stack) 3. [Project Structure](#3-project-structure) 4. [Page-by-Page Features](#4-page-by-page-features) 5. [Frontend API Modules ↔ Backend Endpoints](#5-frontend-api-modules--backend-endpoints) 6. [Requirements](#6-requirements) 7. [Quick Start](#7-quick-start) 8. [Build & Deployment](#8-build--deployment) 9. [FAQ](#9-faq) 10. [Version History](#10-version-history) --- ## 1. Overview A front-end/back-end separated SPA with **8 page routes** covering the whole fire-risk workflow: | Page | Route | Access | Capabilities | | ---- | ----- | ------ | ------------ | | Login / Register | `/login` | Public | JWT login, register-and-login, `?redirect=` return | | Situation Dashboard | `/dashboard` | Auth | Historical fire points / predicted risk / prefecture boundaries / heatmap / clustering / draw & measure / export PNG + 4 charts; one-click 2D/3D switch (Three.js digital twin); left AI fire-image recognition rail (vision model + history + Markdown rendering + speech) | | Smart Query | `/smart-query` | Auth | Natural language → intent parsing → summary / table / chart / map four-way linkage; query history persisted server-side (dedup by text); voice input auto-execute + summary playback | | Knowledge Base | `/knowledge-base` | Auth | Document upload & management + RAG Q&A (streaming typewriter + non-streaming fallback) + citations + full-text reader + PDF inline preview / original download; voice question + answer playback | | Agent Center | `/agent-center` | Auth | Multi-agent pipeline with SSE node-level progress + HITL approval (approve / edit / reject) + full task replay + capability panel; voice task submission + report playback | | Report Center | `/report-center` | Auth | Report list / detail / type filter / model badge / export Markdown / HTML / print to PDF (soft delete); report speech playback | | Profile | `/profile` | Auth | Sidebar avatar entry, change email / password | | Admin | `/admin` | **admin only** | Overview / datasource / model access (4 providers + AMD 5 capability classes + Bailian free-tier catalog + quota snapshot) / agent parameters / logs / users | **Highlights**: - **Agent identity across the UI**: DataAgent pipeline status and VisionAgent rail on the dashboard, QueryAgent parse panel on smart query, RagAgent retrieval panel in the knowledge base, ReportAgent badge in the report center. - **3D digital-twin dashboard**: `components/map/Map3D.vue` (Three.js) — extruded prefecture polygons + side light-sweep shader + bezier flight lines + screen-space clustered fire columns (40px greedy clustering mirrored to the 2D OpenLayers cluster behaviour). - **SSE streaming + HITL**: `openTaskStream` consumes node-level progress over `fetch` with an `Authorization` header (auto fallback to task detail on disconnect; the first `report_snapshot` frame restores what the current run has already produced); report drafts require human approval before being finalized into the report center. - **Unified HTTP kernel**: every request goes through `api/http.js` (auto Bearer, 401 logout redirect, envelope parsing, upload progress, stream reading). - **Dual theme + visual system v2**: `gis-theme.css` tokens + `theme-v2.css`, `html.dark` toggle applied before first paint; `localStorage.fire_agent_theme_v2 = 'off'` rolls back to the legacy visual layer. - **End-to-end voice**: `utils/speech.js` records PCM via Web Audio API and encodes WAV in the browser (ASR), and plays TTS audio blobs. - **Graceful degradation**: dashboard falls back to local JSON when backend APIs fail; no blank screens. - **Single source of risk levels**: 5-level fire-risk colours and copy live in `utils/riskLevel.js` and match the backend thresholds exactly. --- ## 2. Tech Stack | Category | Technology | Version | Purpose | | -------- | ---------- | ------- | ------- | | Framework | Vue 3 (Composition API) | ^3.5.13 | All pages use `