niroku

NARRATIVE

This document explains the ideas behind niroku and the history of this project.

Why niroku exists

Web maps are maps you can use in a web browser or on a phone. They work by loading many small “tiles” from a server and drawing them on the client. Over the last 20 years, tools for making, hosting, and styling tiles have matured. For developers, building web maps is now very achievable.

UN Maps supports UN operations. Some parts are not open to the public, but information about the initiative is available at maps.un.org (see also the UN Maps Application).

In the UN Vector Tile Toolkit (UNVT), we use open‑source tools to cover the full workflow:

These tools are maintained by strong open‑source communities. UNVT also has a sub‑project, UNVT Portable, which runs on Raspberry Pi OS (Debian). We are grateful to the upstream projects, and some members contribute upstream directly.

Open‑source software brings value to different groups. In simple terms:

The UN Smart Maps Group (SMG) promotes developers’ freedom and happiness through community connections and mutual respect. We keep web maps open, experiment with new technologies, and practice software freedom — the freedom to run, study, modify, and redistribute software.

We use “Smart Maps” to mean web maps that support decisions with up‑to‑date data and clear design. Examples: a damage assessment dashboard, or a field‑ready basemap that works offline.

Generative AI: agents and companions

We use generative AI in two ways:

As companions, AIs are not adversaries. We do not scold or attack them. Errors made by our AI companions are our errors too. We accept these errors, and we fix them together. This is our culture.

In niroku, AI helps write scripts and docs together with humans. We keep the results simple and auditable, favoring the CLI and Unix tools.

The portable web

We focus on the portable web so people can use and learn Smart Maps in constrained or unstable environments. Our goal is to make the technologies used by full‑scale web map servers run smoothly on single‑board computers (SBCs) such as the Raspberry Pi 4B.

After experiments with object storage and IPFS, we showed that tunneling can deliver web maps at practical speeds for small groups, even from a home network.

Our current setup is simple: Caddy listens on port 80 and serves static files. It proxies “/martin” to Martin on 127.0.0.1:3000. Martin sets base_path: /martin so TileJSON URLs include the correct prefix behind the proxy.

We value the command‑line interface (CLI) and embrace Unix and web cultures.

How niroku fits in

niroku is a small installer that brings together Caddy (web server) and Martin (tile server) with useful tools for field use. It focuses on:

niroku installs web map data production tools such as tippecanoe, go-pmtiles, gdal-bin. See README.md for details.

History (short)

Principles

What is next

What this project does

niroku provides a small, auditable installer to set up a local web map server on Raspberry Pi OS (trixie). Concretely, it:

The focus is reliability, clarity, and ease of review.

How we develop

We follow a simple and transparent workflow:

  1. Keep edits small and easy to review
  2. Prefer readable shell over clever shell
  3. Use symmetry: anything installed by install.sh must be removable by uninstall.sh
  4. Write documentation in easy English for non‑native speakers
  5. Respect security: prefer verified repositories and signatures where practical
  6. Test on Raspberry Pi devices when possible
  7. Handle errors gracefully: provide fallback paths, multiple download candidates, and clear error messages
  8. Log everything: installation and uninstallation logs help with remote troubleshooting

Our companion AI helps with edits, checks, and remote tests. We do not shift blame to the AI; errors are shared and fixed together.

Testing and operations

Lessons learned

Through real-world testing, we discovered and fixed several issues:

These improvements make niroku more reliable in real field deployments across different Raspberry Pi models.