In-depth, production-focused guides to building geospatial REST APIs with FastAPI and PostGIS.
🌐 Live site: www.geospatial-api.com
geospatial-api.com is a free, deeply technical reference for the engineers who build location-aware backends. Most geospatial tutorials stop at “here’s a SELECT ST_Within(...).” This site starts where those leave off and follows a spatial API all the way to production — the architecture decisions, the failure modes, the benchmarks, and the copy-runnable code that make the difference between a demo and a service that holds up under real traffic.
Every page is written for practitioners: a decision matrix or concept reference up front, then numbered, runnable Python and SQL, then the gotchas with the exact error messages you’ll actually hit — and a hand-drawn architecture diagram for the hardest idea on the page.
The library spans 50+ guides across five topic areas:
EXPLAIN ANALYZE for spatial plans, Redis caching for spatial queries, PgBouncer tuning, materialized views for aggregations, and vector-tile CDN delivery.Backend and full-stack engineers, GIS platform engineers, API architects, and SaaS founders who are shipping spatial features on FastAPI and PostGIS and want depth, not hand-waving.
👉 Read the guides at www.geospatial-api.com — no signup, no paywall.
This repo is the source of the site itself. It is a static site built with Eleventy and served from a Cloudflare Worker (static assets).
content/ Markdown guides (one index.md per page, nested by topic)
_includes/ Nunjucks layouts and partials
_data/ Global data (e.g. asset cache-busting)
assets/ CSS, JS, images
index.njk Home page
eleventy.config.js Build configuration
wrangler.jsonc Cloudflare Worker (static-assets) configuration
npm install
npm run dev # local server with live reload at http://localhost:8080
npm run build # production build to ./_siteThe site is served by a Cloudflare Worker that serves the _site build output as static assets.
npm run deploy # build + wrangler deployDeployment reads Cloudflare credentials from a local .env file (CLOUDFLARE_API_TOKEN, CLOUDFLARE_ACCOUNT_ID) — do not commit it.
Content and code © the site authors. All rights reserved unless stated otherwise.