Next.js 15SupabaseGeospatialPostgreSQL
OpenHealth NG
A fullstack platform providing standardized access to 2,000+ Nigerian healthcare facilities with geospatial search, emergency services, and interactive mapping.

## Problem
Nigeria's healthcare data is **fragmented across disconnected sources** - state agencies, outdated directories, and word-of-mouth. This makes it nearly impossible to build reliable health-tech solutions or locate facilities during emergencies.
OpenHealth NG centralizes **2,000+ verified facilities** with geospatial search, emergency filtering, and interactive mapping.
---
## Tech Stack
- **Next.js 15** (App Router) - Server components + API routes
- **TypeScript** - End-to-end type safety
- **Supabase** - PostgreSQL with PostGIS, RLS, and auth
- **React-Leaflet** - Interactive maps
- **Tailwind CSS** - Modern UI
- **Vercel** - Edge deployment
---
## Key Features
**Geospatial Search**
Distance-based queries using PostGIS `ST_DWithin` – find facilities within a radius with sub-50ms performance.
**Interactive Map**
React-Leaflet with cluster markers for dense areas. Click for facility details and directions.
**Emergency Services**
Quick filter for 24/7 facilities, trauma centers, and ambulance services.
**State Explorer**
Browse 36 states and LGAs. Export data for research and analysis.
---
## Technical Highlights
**Query Optimization**
Reduced geospatial search from ~800ms to ~50ms using PostGIS GiST indexes and proper spatial functions.
**Data Cleaning Pipeline**
Built geocoding pipeline with OpenStreetMap Nominatim, fuzzy deduplication, and phone validation for inconsistent government data.
**URL State Management**
Filters stored in URL params for shareability and SEO-friendly server-side rendering.
Screenshots


