A community-powered flood reporting and alert system for Ghana. Citizens report flooding, road closures, and danger zones in real-time. Features community verification with confidence scoring, live weather flood risk from Open-Meteo, NADMO alert system, and interactive flood maps.
# FloodWatch GH
A community-powered flood reporting and alert system for Ghana. Citizens report flooding incidents, road closures, blocked drains, and danger zones in real-time. The platform aggregates reports, computes confidence scores through community verification, and displays flood risk information alongside active alerts from NADMO (National Disaster Management Organisation).
## Architecture
```
floodwatch-gh/
├── app/ # Next.js pages (Vercel)
│ └── api/[[...route]]/route.ts # Catch-all: mounts Hono app via hono/vercel adapter
├── components/ # Shared UI components
├── features/ # Feature modules (map, reports, weather)
├── hooks/ # React hooks (geolocation, offline)
├── server/ # Hono API (shared route logic)
│ ├── src/
│ │ ├── index.ts # Standalone Hono entry (local dev)
│ │ ├── lib/prisma.ts # Prisma client (PostgreSQL adapter)
│ │ └── routes/
│ │ ├── reports.ts # Report CRUD + community verification
│ │ ├── alerts.ts # Alert lifecycle
│ │ ├── admin.ts # Moderation (approve/reject/archive)
│ │ └── weather.ts # Open-Meteo weather proxy + flood risk
│ ├── prisma/
│ │ └── schema.prisma # Database schema (PostgreSQL)
│ ├── package.json
│ └── tsconfig.json
└── next.config.ts
```
### Deployment Model
- **Vercel** (primary): The Hono app is wrapped as a Vercel serverless function via `app/api/[[...route]]/route.ts`. Both pages and API deploy together — no separate server process needed. Zero cold starts with Fluid compute (~115ms).
- **Local dev**: Run `next dev` — the catch-all route serves the API alongside pages. Or run `npm run dev:server` for a standalone Hono process on port 4000.
## API Endpoints
| Method | Endpoint | Descrip …