Logo Lanfrica

ericmulama/webmap-mvp

Domain:

geospatial

Record type:

software
Creator:
eri
Host:
A lightweight, modern web GIS application for visualizing geospatial datasets in Kenya. Built with **Node.js + Express**, **Leaflet**, and **PostgreSQL/PostGIS**, the system streams GeoJSON directly from the database and supports dynamic BBOX queries for fast map rendering. # Kenya GIS Webmap MVP A lightweight, modern web GIS application for visualizing geospatial datasets in Kenya. Built with **Node.js + Express**, **Leaflet**, and **PostgreSQL/PostGIS**, the system streams GeoJSON directly from the database and supports dynamic BBOX queries for fast map rendering. --- ## πŸš€ Features ### **Frontend (Leaflet)** - OpenStreetMap basemap - Multiple thematic infrastructure layers: - Healthcare facilities - Schools - Universities - Power stations - Polygon boundary layer (Counties) - Automatic BBOX loading for point datasets - Layer control panel - Dynamic legend with per-layer colors - Auto-fit map to loaded boundary features ### **Backend (Node.js + Express)** - Clean REST API for all layers - BBOX endpoints for fast spatial filtering - PostGIS-powered spatial queries - Optimized GeoJSON response pipeline - Centralized database connection pool ### **Database (PostgreSQL + PostGIS)** - Each infrastructure dataset stored as a table with a `geometry` column (EPSG:4326) - Spatial indexing enabled for fast queries --- ## πŸ—‚οΈ Project Structure webmap-mvp/ β”‚ β”œβ”€β”€ public/ β”‚ β”œβ”€β”€ index.html β”‚ β”œβ”€β”€ main.js β”‚ β”œβ”€β”€ style.css β”‚ └── leaflet/ # Leaflet JS + CSS files β”‚ β”œβ”€β”€ server.js β”œβ”€β”€ .env β”œβ”€β”€ package.json └── README.md yaml Copy code --- ## πŸ”§ Requirements Before running the project, ensure the following are installed: | Component | Version | |----------|---------| | Node.js | β‰₯ 18.x | | PostgreSQL | β‰₯ 14.x | | PostGIS | Enabled extension | | A browser | Any modern browser | --- ## πŸ“¦ Installation Clone the repository: git clone github.com cd kenya-gis-webmap-mvp Install dependencies: Copy code npm install Create a .env file: Insert the below code and replace the password with the password of your postgresql server. PGHOST=localhost PGUSER=postgres PGPASSWORD=yourpassword PGDATABASE=gisdata PGPORT=5432 PORT=3000 Place your dataset tables in PostgreSQL with: id (optional) geom geometry column …

Licenses