StreamTrace
One observation, a useful next check.
Inspiration
A report that says "there is foam in this stream" is only a pin on a map. The hard part comes next: where should someone look?
The World Health Organization estimates that safe water, sanitation and hygiene could have prevented 1.4 million deaths in 2019 alone, and the first sign of a water problem is often something an ordinary person notices at the water's edge. I built StreamTrace to connect that moment to a researcher's decision about where to investigate.
Primary track: Track 2, Data-to-Insight, supported by guided citizen reporting, responsible AI assistance and a prototype FHIR export.
What it does
StreamTrace turns citizen observations into a reviewed, explainable investigation.
- Citizens pick a site, record seen, not seen or cannot tell, and confirm their report. No account is needed, and they get a reference to follow its review status.
- Researchers review each report and its context. Only approved evidence changes the investigation, and a not seen needs an extra check that the absence is comparable and meaningful.
- The engine narrows the possible source stretches and recommends the next observation site using balanced bisection: it picks the site with the smallest worst-case remainder. Every step comes with an explanation.
- Every decision is reversible. Withdraw an approval and the possibilities come back. Conflicting approved evidence pauses recommendations until a researcher resolves it.
- OneAquaHealth data becomes insight. The Live Portal loads OneAquaHealth's published conductivity samples from Crete (Giofyros and Almyros), shows the original site identifiers, dates, instrument and units, calculates the change between sampling dates, and links every result back to its source.
Why it matters
Citizen observations can cover places researchers cannot visit regularly. StreamTrace gives each one a path to a decision:
- A citizen who reports gets a reference and a status, not silence.
- A field team spends limited time on the checks that tell it the most, with the reasoning visible.
- A community can see how a concern became a decision, step by step, on the record.
That is One Health in practice: healthy streams, healthy aquatic life, healthy people. These are the goals for the field pilot described below.
How I built it
- Front end: React, TypeScript and Leaflet, with map, diagram and text-list views of the same evidence.
- Back end: a Hono API on Neon PostgreSQL, with signed reviewer sessions and database row-level security.
- Deterministic engine: plain TypeScript that runs only on reviewed evidence. Optional AI helps draft observation wording and context questions, but it never feeds the engine; citizens confirm what they submit and researchers decide what counts.
- Exact reversibility: the engine recalculates from the original candidates after every decision, so a withdrawal restores precisely what was excluded.
- Real geography: cached OpenStreetMap data for a bounded section of the Mondego River near Coimbra, Portugal: 35 stream stretches and 11 observation sites, connected through shared OpenStreetMap node IDs.
- Interoperability: JSON exports and a prototype FHIR R4 export of reviewed observations.
- Reproducible benchmarks comparing the recommendation strategy with random and fixed-order checks.
Challenges I ran into
- Reports that never arrived. A submission could appear to succeed while the researcher's queue stayed empty. The reporting flow had silently switched to a browser-only demo. I provisioned the real cases and made simulation an explicit choice. A failed live submission now stays visible, with a retry.
- Reversible reviews. Filtering an already narrowed list loses information, so the engine now rebuilds the candidate set from the original stretches using the current review decisions.
- Interpreting "not seen". An absence can mean many things, from poor visibility to changing flow. Context questions and explicit reviewer checks decide when an absence can exclude a stretch.
- Honest maps. Lines that cross on screen are not always connected waterways, so connections come from shared OpenStreetMap node IDs and keep their source information.
Accomplishments I'm proud of
- A complete loop, live: a report submitted to the real backend reaches the researcher queue, the reviewer's decision is stored, and the citizen's reference shows the updated status.
- A visible narrowing. In the simulated Coimbra case, approved observations take 35 possible stretches to 14. A pending report changes nothing. Approving its comparable absence takes the search to 7, and withdrawing that approval restores 14. (The guided walkthrough in the demo video uses a smaller scenario, so its counts differ.)
- A search that beats guessing. On a clean synthetic 30-reach network, balanced bisection reached one candidate in 5.07 checks on average, against 19.10 for random checks, about 3.8 times fewer. These are simulation results.
- OneAquaHealth data turned into a readable insight, with every value linked to its source.
What I learned
- A consistent result can still be wrong. One incorrect observation could lead to a wrong single candidate without producing any conflict. That made researcher review, visible assumptions and reversible decisions central to the design.
- Wording is part of the product. "Possible source stretch" says what the system knows. StreamTrace plans where to look next; it points researchers to the next place to investigate.
What's next
A small field pilot with researchers and citizen volunteers:
- verify flow directions and safe site access,
- compare recommended checks with existing investigation practice,
- measure report-to-review time and field effort,
- validate the FHIR export independently, and
- test the reporting language with people who have no ecological training.
The goal is to make every local observation easier to follow up, with enough explanation for people to understand and question the next step.
Built with
React, TypeScript, Leaflet, Hono, Neon PostgreSQL (row-level security), OpenStreetMap, OneAquaHealth FHIR repository, HL7 FHIR R4, Vite
Built With
- citizen-science
- docker
- fhir
- geojson
- gis
- graph
- groq
- hono
- leaflet.js
- neon
- ngnix
- node.js
- openstreetmap
- postgresql
- react
- sarvam
- typescript
- vite
- zod
Log in or sign up for Devpost to join the conversation.