MMGIS is one Express process that serves three browser apps over a Postgres/PostGIS database, with optional Python tile sidecars and an offline GDAL data-prep toolbox feeding it.
MMGIS
MMGIS (Multi- Geographic Information System) is the open-source spatial data infrastructure NASA-AMMOS uses for planetary science missions — Mars rovers, lunar ops, and similar. It is one app with several faces: a 2D Leaflet map, a 3D Cesium globe, an image viewer, a multi-user drawing layer, and an admin UI for wiring datasets into all of the above. If you are onboarding to MMGIS, you are looking at a mature, polyglot monorepo that has accumulated a lot of capability — this tutorial gives you the seven boxes you need before you read any single file.
How the parts fit together
The center of the system is a Node 20 + Express server (the backend
API) that owns a Postgres/ database via
and runs a WebSocket for real-time collaboration. It serves three browser
applications: the main mapping app
Essence, a separate
Configure admin SPA mounted at /configure,
and a Jekyll docs site. and share the database through the backend's
feature modules, which all follow the same models//routes//setup.js shape. Mission
data is prepared offline by the auxiliary GDAL/Python
scripts and, optionally, served by adjacent
Python tile and catalog services (TiTiler, STAC, tipg)
that the backend proxies behind a single origin. The frontend is bundled by a custom
Webpack 5 pipeline that also implements the
plugin-drop convention, and the whole thing is exercised by a single
Playwright test suite covering both unit and e2e flows.
The separate React 17 admin SPA under configure/, served at /configure. Its own
react-scripts build, its own React major version. Writes the JSON config blob that
Essence reads at boot. See Configure.
The ORM MMGIS uses for table definitions, model hooks, and the
connect-pg-simple-backed session store. Spatial queries bypass it and use raw SQL
through pg-promise.
The main MMGIS browser app, under src/essence/. Bundled by the custom Webpack
pipeline. Not an idiomatic React app — a hybrid of jQuery-era imperative modules and
React 16 islands.
A single mission's bundled set of layers, tools, configuration, and metadata —
selected via ?mission= and the MAIN_MISSION env var, then handed to
L_.init(config). The unit of personalization for Mars rovers, lunar ops, and
similar deployments.
The Postgres spatial extension MMGIS depends on. Installed by init-db.js via
CREATE EXTENSION IF NOT EXISTS postgis. Backs every Geodataset, Draw user-feature,
and spatial query.
Components
- Frontend (Essence)The browser-side mapping application. A custom Webpack-bundled hybrid of jQuery-era imperative code and React 16 islands, organized around a shared map state, swappable 2D/3D engines, and a tool registry.
- Backend (API server)Express 4 server that serves the SPA, mounts a tree of feature modules under /api, talks to Postgres/PostGIS through Sequelize, and runs a WebSocket server for real-time collaboration.
- Configure (admin SPA)A separate React app served at /configure for managing missions, layers, datasets, and users. Has its own webpack build.
- Build, bundling, and dev serverThe CRA-eject Webpack 5 pipeline that bundles Essence, plus the dual-port dev convention and the plugin-directory glob loader.
- Adjacent servers (TiTiler, STAC, tipg)Optional Python tile and feature services that MMGIS proxies to, wired in as opt-in Compose profiles behind a single, /-rooted front door.
- Auxiliary GIS processing scriptsOffline data-prep utilities — mostly Python over GDAL — for slicing rasters into tiles, building DEMs, generating legends, and normalizing vector data before it lands in MMGIS.
- Testing (Playwright)Playwright is the single runner for unit and e2e specs; one config, one command surface, with the backend started automatically for browser tests.
Reference
Cross-cutting addenda — vocabulary, named abstractions, decisions, seams.
- GlossaryRepo-specific vocabulary — singletons, conventions, and codenames the prose assumes you know.
- Cast of charactersThe named abstractions that recur through the tutorial — actors with distinct roles.
- DecisionsNon-obvious decisions whose context shapes the rest of MMGIS.
- SeamsThe boundaries every meaningful change has to cross.
Test yourself
Twelve big-picture questions on the architecture, decisions, and seams. Each one has a review that explains why the answer is right.
Take the quiz →