Architecture
The diagrams on these pages come from the model in architecture/ in the repository. Click a box to see what it does and where its code is. Use Open full screen for every view, the flows, the decisions and the full arc42 document.
The idea
Section titled “The idea”Loka puts proven map servers behind one Go API that owns login, access and the catalog.
- MapServer draws, MapCache caches. Loka writes mapfiles and cache configuration; it does not draw maps itself.
- GDAL as tools. Conversion and terrain processing run the GDAL command-line tools as separate programs.
- One way in. Every request passes the API’s router and security. MapCache has no public port.
- A file-based catalog. SQLite in the data directory, migrated with a backup first.
- Fast paths where it matters. FastCGI workers for layer WMS; terrain analysis in Rust.
Context
Section titled “Context”Two kinds of people use Loka Server: admins and editors who publish data, and analysts who run terrain analysis. QGIS, loka.gl and other map clients read maps, tiles and features with a read-only API token. Loka reads from PostGIS databases and remote WFS services.
Containers
Section titled “Containers”Loka runs as two processes: Loka core, the Go program (loka serve) that answers the API and serves the web console, and MapCache. MapServer, GDAL and the Rust tools start inside the API container when a request needs them.
| Container | What it does |
|---|---|
| Web console | The React app for admins, editors and analysts |
| Loka core | Login, access, catalog, imports, OGC services, tile cache control, analysis API |
| MapServer | Draws every map image, from mapfiles that Loka core writes |
| MapCache | Serves and caches tiles; reachable only through Loka core |
| Analysis engine | loka-analysis, the Rust terrain tools reading DTED |
| Symbol renderer | loka-mil, draws MIL-STD-2525 symbols |
| GDAL/OGR tools | Conversion, warping, contours, run as programs |
Read on
Section titled “Read on”| Page | What it covers |
|---|---|
| Loka core | The components inside the Go program |
| Maps and tiles | How a map or a tile is drawn and cached |
| Catalog database | The SQLite tables and what they mean |
| Deployment | Docker, the .deb package and where data lives |
| Security | Sessions, tokens, workspace access, hardening |
| Flows | Publish, tiles, analysis and failures, step by step |
| Decisions | The choices and the options considered |