Inspiration
A person walking beside an urban stream may be the first to notice that something has changed: foam collecting at a weir, discoloured water, or an unfamiliar outflow. That observation can matter. Acting on it requires people qualified to investigate, reliable measurements, and evidence another organisation can understand and use.
Upstream began with a question: how can a community follow an observation all the way through to a defensible next action?
The OneAquaHealth mission shaped the answer. Urban freshwater connects habitats, wildlife, public spaces, and the people who use them. An assessment tool needs to connect those perspectives while being precise about what the evidence establishes.
Upstream — See a change. Follow it upstream.
What Upstream does
Upstream turns a citizen observation into a coordinated investigation, with a visible path from reporting to recipient acknowledgement.
- Report a change. Contributors describe what they saw and can attach photographs. An unnamed stream or denied location permission does not prevent reporting: a local name or landmark can start the case. Offline drafts remain on the device.
- Check readiness. The workspace identifies missing prerequisites, such as a verified stream network, background measurements, a qualified monitor, or a calibrated instrument. It explains which role can address each gap.
- Choose the next useful measurement. A planner proposes a station and explains how a reading there could narrow the investigation. A coordinator reviews and assigns the work.
- Collect and review evidence. Trained monitors submit conductivity readings with their instrument and measurement context. A quality decision determines whether each reading can contribute to the assessment.
- Assess and revise. The scientific engine identifies stream stretches incompatible with the accepted evidence under the stated assumptions, and stretches that remain worth investigating. Every result belongs to a recorded revision.
- Approve and share. An expert approves a revision. An evidence package can then be signed and sent, with the recipient acknowledging the specific revision received.
Contributors receive a receipt and can see how their reports progress. The investigation remains connected to the people who started it.
Responsible AI and human judgment
Upstream addresses Track 3: AI-Supported Assessment through optional assistance, explicit validation, and human review.
The reporting assistant suggests clearer wording and, with consent, checks descriptions against photographs. It can point out that a photograph does not clearly show the foam mentioned in the text, or ask for a missing detail. Contributors review suggestions before accepting them. Cross-check prompts never block submission.
A separate case-summary assistant explains structured investigation records in plain language. Its sentences cite supporting records. Server checks reject nonexistent citations, unsupported numbers, and prohibited claims about causes, responsibility, safety, or health. A labelled template provides a fallback when an AI response fails validation.
When the AI provider is unavailable or reaches its usage limit, the interface explains what happened. Manual reporting remains available.
Scientific assessments come from a reproducible engine. Coordinators assign work, reviewers decide which readings count, and experts approve revisions.
How it was built
Upstream combines a Next.js and TypeScript frontend, a FastAPI backend, and a durable worker for analysis and evidence-package generation. Supabase PostgreSQL and PostGIS provide authentication, geographic data, private storage, and database-enforced access controls. IndexedDB supports local drafts and queued field submissions.
The scientific engine uses Z3 with exact rational arithmetic to check whether candidate stream stretches remain compatible with reviewed conductivity readings and versioned assumptions. Each exclusion records the evidence and assumptions behind it.
This distinction carries through the interface:
- Ruled out: incompatible with the accepted readings under the stated assumptions.
- Retained: still compatible and worth investigating.
Neither establishes a pollutant, source responsibility, or water safety.
Evidence packages include PDF, JSON, GeoJSON, and HL7 FHIR R4, with revision information, provenance, and support for Ed25519 signatures. Stations and reviewed conductivity observations use the OneAquaHealth FHIR Implementation Guide profiles. The documented example package passed the official HL7 validator with zero errors; remaining terminology warnings are recorded.
Automated checks cover scientific behaviour, permissions, offline synchronisation, AI safeguards, exports, browser workflows, accessibility, and performance.
Challenges faced
Making uncertainty understandable
A map can make an incomplete conclusion look authoritative. Upstream needed clear language, visible assumptions, and useful “not ready” states. Missing prerequisites become actionable tasks, with an explanation of who can resolve them.
Preserving trust when evidence changes
An instrument can drift. A previously accepted reading can be excluded. The system must recompute the assessment, preserve its history, and communicate the revision.
The demo shows this directly: withdrawing a reading reopens part of the search area. The change is traceable, including which evidence no longer supports the earlier exclusion.
Keeping field workflows reliable
Interrupted connections, repeated submissions, expired sessions, and concurrent instrument bookings required attention throughout the workflow. Local saving, duplicate-safe synchronisation, explicit receipt states, and database checks help preserve both observations and their history.
Producing evidence another system can use
Interoperability required profile validation, consistent units, linked resources, provenance, and appropriate privacy boundaries. Environmental observations are exported without inventing patient records or clinical findings.
What was learned
The strongest lesson was that an assessment is only as defensible as its assumptions.
Synthetic evaluation made this concrete. Under the nominal scenario, the planner narrowed the remaining search area more than the comparison strategies. When a background assumption was deliberately biased, incorrect exclusions occurred, and model-conflict detection caught only some of them. Exact arithmetic cannot repair an incorrect model of the environment.
That finding reinforced the need for reviewed inputs, visible assumptions, revision history, and field validation.
Another lesson was that participation depends on the details of the workflow: accepting a landmark, preserving a draft, explaining the next step, and showing contributors what happened to their observation.
One Health impact
Upstream connects environmental evidence with sourced context about footpaths, swimming locations, animal access, and downstream habitats. These layers help prioritise attention and identify appropriate recipients.
Health questions remain with qualified professionals, who can receive the reviewed evidence. Upstream does not establish health outcomes.
The intended impact is a shorter, more accountable path from community observation to informed investigation, with limited field effort directed toward useful measurements.
What's next
Upstream is a working prototype with clearly labelled synthetic examples. The next step is a supervised field pilot to test measurement assumptions, volunteer workflows, and recipient needs.
FHIR profile conformance provides a foundation for future integration. Direct integration with the OneAquaHealth Citizen Science App remains future work.
The goal is for every observation to have a traceable path forward—and for every conclusion to remain open to better evidence.
Built With
- fastapi
- gemini
- next.js
- postgis
- python
- react
- render
- supabase
- tailwindcss
- typescript
- vercel
- z3

Log in or sign up for Devpost to join the conversation.