MapFix Spatial is an interactive MVP for correcting distorted geospatial coordinates and rendering a cleaner projection.
Live GitHub Pages demo:
https://arunshar.github.io/mapfix-spatial/
The browser includes a deterministic fallback correction engine, and server.py adds a live OpenAI backend:
/api/correctcomputes the MapFix correction server-side and asks GPT for a concise geospatial analysis./api/render-mapcalls the Image API to render a clean corrected map projection preview.OPENAI_API_KEYstays on the server and is never exposed to browser code.
From this folder:
OPENAI_API_KEY=your_key_here python server.pyThen open:
http://127.0.0.1:4173
Without OPENAI_API_KEY, the page still runs as a local deterministic demo and the UI will show that the key is missing.
Optional model overrides:
OPENAI_TEXT_MODEL=gpt-5.5
OPENAI_IMAGE_MODEL=gpt-image-1
OPENAI_IMAGE_SIZE=1536x1024
OPENAI_IMAGE_QUALITY=mediumFor the live backend, deploy this folder as a Python/Docker web service. The included Dockerfile and render.yaml are ready for Render-style Docker hosting.
Required environment variable:
OPENAI_API_KEY
The static-only files can still be deployed to Vercel, Netlify, Cloudflare Pages, or GitHub Pages, but GPT/Image API features require server.py or an equivalent serverless API.
index.html- app shellstyles.css- responsive dashboard stylingapp.js- coordinate distortion, correction, rendering, metrics, and PNG exportserver.py- OpenAI-backed API and static-file serverDockerfile- container entrypoint for hosted backend deploys