README.md

Bloom for iOS #

A SwiftUI scaffold and explorer for bloom's taxonomy data on the phone: native plants, the wildlife they support, and where each grows, read from a small bundled core plus files fetched for a place or a taxon.

Run it #

task build       # generates Bloom.xcodeproj (XcodeGen) and builds for the simulator
task test        # BloomKit tests; the ones against the export run when cdn/ links to one
task bundle      # copies the core into Snapshot/ so the app starts without a server
task serve       # serves the local export at http://localhost:8787 (the Local data sources)
task ota         # builds for a phone on the tailnet and publishes an install page (needs task serve)

The app reads production data, https://cdn.bloomnative.org. Settings › Data Source switches it to the local export: from the simulator at localhost, from a phone over the tailnet (tailscale serve --bg --https=18787 http://127.0.0.1:8787).

The data is a product of the taxonomy pipeline (../taxonomy): task cdn:export there writes it to data/cdn (formats in its cdn/FORMATS.md) and task cdn:deploy publishes it. cdn/ here links to that export, beside the local install page.

Layout #

  • BloomKit/ — the data layer, a Swift package: Core (taxa, support edges, lookups, US-wide lists), CellData and TaxonDetail (the fetched files), Search (the pipeline's index, queried as the site queries it), SnapshotStore (manifest sync, checksums, on-device caches).
  • App/ — the SwiftUI app: Place, Wildlife, Data and Search tabs, taxon pages.

Data #

File Where Size
core.sqlite bundled, synced by manifest 51.0 MB, 29.5 MB gzipped
taxa/<id>.json.gz fetched when a taxon opens median under 1 KB
cells/<idx>.bin.gz fetched for the chosen place median ~50 KB

The app loads the newest snapshot it can: the server's, else the last one it synced, else the bundled one. A place maps to the nearest of the 5,527 H3 resolution-4 cell centres, so no H3 library is needed.