BABUNI.DEV

Tidningsrundan / Overview

Tidningsrundan: Overview

Tidningsrundan (“the newspaper round”) plans and navigates the monthly magazine round around Stallarholmen and on Selaön. The magazines go out of the driver's window, so every mailbox must be on the left of the car. A route builder finds the cheapest drive that passes every mailbox that way, and an Android app guides the drive stop by stop, records real mailboxes and keeps track of progress over several days.

Status (1 December 2026)

What is planned is in the roadmap; the story so far is in the development journal.

Parts

Path What it is
config.json Start point, delivery areas, rounds, blocked roads, recordings, timing and tuning
data/ OpenStreetMap roads, addresses, places and building outlines (downloaded 2026-11-25), and the round-border markup
mailboxes-*.json Recordings exported from the app (private: real mailbox positions)
tools/build_route.py Builds every round in both delivery modes and writes app/route_data.json
tools/plot_route.py Quick map image of one round, to check it
tools/test_full_drive.py, tools/tests/ Browser tests that drive a round with simulated GPS
app/ The phone app (static files: index.html, app.js, route_data.json)
android-app/ Capacitor project that packages app/ as an Android app
Tidningsrundan-<N>.apk Installable app, version N

Build the routes

Rebuild after changing config.json or adding a recording (several minutes, most of it the deeper search set in ils_seconds):

python -m venv .venv && .venv/bin/pip install numpy scipy matplotlib
.venv/bin/python tools/build_route.py
.venv/bin/python tools/plot_route.py app/route_data.json selaon /tmp/selaon.png   # optional check

How the route is computed is described in the architecture.

Run the app

Open app/ on an https address (phones only give GPS to https pages), or locally: cd app && python3 -m http.server 8765 (GPS works on localhost). ?sim=60 starts a simulated drive at 60 km/h. The screens and controls are described in the design.

Build the Android app

Bump APP_VERSION in app/app.js and versionCode/versionName in android-app/android/app/build.gradle, then:

cd android-app
npm run web && npx cap sync android
cd android && JAVA_HOME="$HOME/.local/share/jdks/jdk-21.0.13.1+2" ./gradlew assembleDebug
cp app/build/outputs/apk/debug/app-debug.apk ../../Tidningsrundan-<N>.apk

Install over USB: ~/Android/Sdk/platform-tools/adb install -r Tidningsrundan-<N>.apk (phone with USB debugging on).

Known limits

Documentation

Privacy

The recordings, route_data.json, the round-border markup and the map images in docs/ contain the positions of real households' mailboxes. They stay on this computer and on the phone. The project is shown on babuni.dev as documentation only, without code or data.

Document information

Creative: Babuni

Babuni's project documentation, imported from the private project folder. Code and route data are not published.