Internet-in-a-Box, as an app

A whole library, lit by one small lamp.

One device on your Wi-Fi becomes a content server. Everyone else opens a browser and reads — and searches — a library that never asks the internet for anything.

The Lantern mark: a lamp with a flame in it
  • 0 runtime dependencies
  • 1 Node file to run
  • 60 assertions, over real HTTP
  • no internet at any point
  • no account, no telemetry

The lamp, the room, the reader

Three parts, and only one of them is clever.

01 — the host

One file, no dependencies

A Node HTTP server that serves the page, the library and the search index. Copy it to a laptop, a Raspberry Pi, or a phone that runs Node. Nothing to install.

02 — the packs

Content you can trust

Every imported file is hashed and measured. On every load those hashes are checked again, and a pack that no longer matches is quarantined instead of served with pages missing.

03 — the reader

A plain browser

No app to install, no account to make. A phone joins the Wi-Fi, opens the address the host prints, and searches. That is the whole client.

Try the search, right here

The demo below runs the same lib/search.js the host runs — in your browser, over a pre-built copy of the starter pack. Nothing is fetched from anywhere.

The chips there are derived from the library itself. A document containing the whole query as a phrase outranks one that merely carries the words — that is the phrase bonus, not luck.

What it does when things go wrong

Each row is asserted in the test suite, not promised in prose.

SituationWhat Lantern does
A path tries to leave a packRefused at import and refused again at request, with 403.
The disk is full or read-onlyThe pack is not added, the files that did not land are named, and nothing half-written is left behind.
A pack no longer matches its manifestMoved to .quarantine/, reported in the Packs card, and neither served nor searchable.
No peers, no internetNothing changes. The library opens on the host and says how many documents it holds.
A bundle that is not JSONRefused with the reason shown, and the library keeps serving.

Run it in ten seconds

It prints the address a phone should open. No build step, no install.

$ node server.js
Lantern is serving 3 document(s) on port 8080
Open on any device on this Wi-Fi:
  http://192.168.1.24:8080/
No internet is used at any point.