diff --git a/frontend/app/alerts/page.tsx b/frontend/app/alerts/page.tsx
index e69de29..a6f2cb1 100644
--- a/frontend/app/alerts/page.tsx
+++ b/frontend/app/alerts/page.tsx
@@ -0,0 +1,2 @@
+import AppShell from "@/components/AppShell"; import { BellOff } from "lucide-react";
+export default function AlertsPage(){return
Alerts
Active flood alerts
No live alerts available
No live alerts are currently available from the connected backend. Check official local emergency communications for urgent instructions.
}
diff --git a/frontend/app/assistant/page.tsx b/frontend/app/assistant/page.tsx
new file mode 100644
index 0000000..7afdbc3
--- /dev/null
+++ b/frontend/app/assistant/page.tsx
@@ -0,0 +1,2 @@
+import AppShell from "@/components/AppShell"; import AIChat from "@/components/AIChat";
+export default function AssistantPage(){return
}
diff --git a/frontend/app/emergency/page.tsx b/frontend/app/emergency/page.tsx
index e69de29..28fa4ea 100644
--- a/frontend/app/emergency/page.tsx
+++ b/frontend/app/emergency/page.tsx
@@ -0,0 +1,3 @@
+import AppShell from "@/components/AppShell"; import { TriangleAlert } from "lucide-react";
+const steps=["Move to higher ground when flooding is possible.","Avoid walking or driving through floodwater.","Follow evacuation instructions from local authorities.","Keep essential documents, medicines, water, and a charged phone ready.","Turn off electricity only if it is safe to do so."];
+export default function EmergencyPage(){return
Emergency guidance
Stay safe during flooding
For immediate danger, follow official emergency instructions and contact locally published emergency services. FloodIntel does not invent emergency contact numbers.
Safety checklist
{steps.map((s,i)=>
{i+1}{s}
)}
Evacuation guidance
Use routes designated by local authorities. Never enter a closed road, bridge, drain, or fast-moving water. Help children, older adults, and people who may need assistance move to safety early.
Emergency contacts
Data unavailable. Use official local government and disaster-management channels for verified contact details.
- FloodIntel brings together rainfall, satellite observations,
- terrain, water bodies and historical flood information to help
- communities understand flood risk and respond earlier.
-
-
- {/* Location search */}
-
-
-
- ⌖
-
- setLocation(e.target.value)}
- placeholder="Search city, district, ward or use your location"
- className="w-full bg-transparent py-3 text-sm text-white outline-none placeholder:text-slate-500"
- />
-
- This map component will connect to our real GIS layers,
- flood-risk predictions, rivers, water bodies, administrative
- boundaries and satellite-derived information.
-
- Ask questions about your local flood risk, rainfall, alerts,
- historical events and preparedness. The assistant will be
- connected to FloodIntel data instead of relying only on generic
- AI answers.
-
-
-
- {[
- "What is my flood risk?",
- "Why is the risk high?",
- "What should I do now?",
- ].map((question) => (
-
- ))}
-
- The FloodIntel AI assistant is ready for integration with
- the FastAPI backend, risk engine, rainfall data and
- Supabase.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- )}
-
- );
-}
\ No newline at end of file
+import dynamic from "next/dynamic"; import Link from "next/link"; import { ArrowRight, Bell, CloudRain, Map, ShieldAlert } from "lucide-react"; import AppShell from "@/components/AppShell"; import LocationSearch from "@/components/LocationSearch"; import StatusCard from "@/components/StatusCard"; import { useFloodData } from "@/lib/useFloodData";
+const FloodMap=dynamic(()=>import("@/components/FloodMap"),{ssr:false,loading:()=>
Loading interactive map…
});
+export default function Home(){const {state,data,refresh}=useFloodData();return
Flood intelligence platform
Know the risk. Act before the flood.
Clear, honest flood detection information from the connected FloodIntel backend, designed to help communities prepare and respond.
Risk overview
Current information
Rainfall
Data unavailable. The connected backend does not provide current rainfall observations.
Flood-prone zones
Data unavailable. No GIS zone layer is exposed by the backend.
Active alerts
No live alerts are currently available from the connected backend.
Map layers
Interactive map
Pan and zoom the OpenStreetMap base map. Flood, river, waterbody, and event overlays will only appear after the backend exposes verified GIS data.
Open full map
Future flood risk / forecast
Future forecast data is currently unavailable. Current detection is not presented as a forecast.
View risk details
Recent flood information
Historical events
No historical flood-event data is currently available from the connected backend.
View history
}
diff --git a/frontend/app/report/page.tsx b/frontend/app/report/page.tsx
index e69de29..a5c6af7 100644
--- a/frontend/app/report/page.tsx
+++ b/frontend/app/report/page.tsx
@@ -0,0 +1,4 @@
+"use client";
+import AppShell from "@/components/AppShell"; import { Camera, Crosshair, Trash2 } from "lucide-react"; import { FormEvent, useEffect, useState } from "react";
+type Status="idle"|"submitting"|"success"|"failed"|"queued"; type Report={description:string;severity:string;location:string;createdAt:string};
+export default function ReportPage(){const [description,setDescription]=useState(""),[severity,setSeverity]=useState(""),[location,setLocation]=useState(""),[photo,setPhoto]=useState(),[status,setStatus]=useState("idle"),[notice,setNotice]=useState(""); useEffect(()=>{const sync=()=>setNotice("Connection restored. Locally saved reports remain queued because backend submission is currently unavailable.");addEventListener("online",sync);return()=>removeEventListener("online",sync)},[]);const locate=()=>navigator.geolocation?.getCurrentPosition(p=>setLocation(`${p.coords.latitude.toFixed(5)}, ${p.coords.longitude.toFixed(5)}`),()=>setNotice("Location permission was not granted. Enter a location manually."));const submit=(e:FormEvent)=>{e.preventDefault();if(!description||!severity){setStatus("failed");setNotice("Add a description and severity before saving your report.");return}const report={description,severity,location,createdAt:new Date().toISOString()};const existing=JSON.parse(localStorage.getItem("floodintel-report-queue")||"[]") as Report[];localStorage.setItem("floodintel-report-queue",JSON.stringify([...existing,report]));setStatus(navigator.onLine?"success":"queued");setNotice(navigator.onLine?"Report saved locally. Backend submission is currently unavailable.":"You are offline. Your report has been queued locally and will be reviewed for submission when a report API is available.")};return
Citizen report
Report flooding
Share what you see. Image analysis is not claimed because no connected backend endpoint provides it.
}
diff --git a/frontend/app/risk/page.tsx b/frontend/app/risk/page.tsx
new file mode 100644
index 0000000..868b380
--- /dev/null
+++ b/frontend/app/risk/page.tsx
@@ -0,0 +1,3 @@
+"use client";
+import AppShell from "@/components/AppShell"; import StatusCard from "@/components/StatusCard"; import { useFloodData } from "@/lib/useFloodData";
+export default function RiskPage(){const {state,data,refresh}=useFloodData();const validation=data?.data.validation;return
Risk & forecast
Flood risk information
Current detection and future forecast are kept separate. The connected model reports study-area detection only.
Future forecast
Future flood risk
Future forecast data is currently unavailable. No verified future forecast endpoint is connected.
Why is this risk level?
Contributing factors
Satellite / model observationAvailable through current detection
RainfallData unavailable
Terrain and water proximityData unavailable
Historical flood informationData unavailable
Validation & source
Study-area output
Source
FloodIntel backend
Timestamp
Data unavailable
IoU
{validation?.iou ?? "Data unavailable"}
Dice
{validation?.dice ?? "Data unavailable"}
}
diff --git a/frontend/components/AIChat.tsx b/frontend/components/AIChat.tsx
index e69de29..4ba0891 100644
--- a/frontend/components/AIChat.tsx
+++ b/frontend/components/AIChat.tsx
@@ -0,0 +1,4 @@
+"use client";
+import { askFloodIntel } from "@/lib/api"; import { Send, Trash2 } from "lucide-react"; import { FormEvent, useEffect, useState } from "react";
+type Message={role:"user"|"assistant";content:string;error?:boolean};
+export default function AIChat(){const [items,setItems]=useState([]),[text,setText]=useState(""),[busy,setBusy]=useState(false),[language,setLanguage]=useState("en");useEffect(()=>{const update=()=>setLanguage(localStorage.getItem("floodintel-language")||"en");addEventListener("floodintel-language",update);return()=>removeEventListener("floodintel-language",update)},[]);const send=async(e?:FormEvent,retry?:string)=>{e?.preventDefault();const query=retry||text.trim();if(!query||busy)return;if(!retry){setItems(v=>[...v,{role:"user",content:query}]);setText("")}setBusy(true);try{const r=await askFloodIntel(query,language);const answer=r.response||r.answer||r.message||"The assistant did not return a response.";setItems(v=>[...v,{role:"assistant",content:answer,error:r.status==="unavailable"}])}catch{setItems(v=>[...v,{role:"assistant",content:"Unable to reach the AI assistant. Please try again.",error:true}])}finally{setBusy(false)}};return
AI assistant
Flood safety guidance
{items.length===0&&
Ask about flood preparedness, risk concepts, or safety steps. The assistant should not be treated as a source of live local conditions.