Inspiration

Urban freshwater monitoring does not fail only because data is missing, it fails in the gap between observation and action, where a citizen report, sensor reading, photograph, field sample, or model output must become trustworthy enough to justify investigation without losing provenance, uncertainty, or scientific meaning. OneAquaHealth already provides strong foundations for citizen science, ecological assessment, geospatial analysis, resilience, and decision support, so Limnexa focuses on the missing connective layer and turns the full lifecycle into one traceable system, observe → validate → corroborate → interpret → escalate → investigate → act → remeasure.

Limnexa is built around a strict distinction between what was observed, what was measured, what was derived, what was inferred, what was professionally verified, and what was ultimately decided, because environmental systems become unreliable when those categories collapse into one opaque score or unexplained prediction.

What it does

Limnexa is a real time evidence to action system for urban freshwater monitoring. Citizens and field users can submit structured observations through forms, photographs, measurements, and voice assisted capture while the original evidence remains immutable and later corrections become explicit revisions rather than silent overwrites.

Each submission is evaluated across independent trust dimensions including acquisition method, protocol completion, spatial accuracy, temporal freshness, instrument status, physical plausibility, completeness, corroboration, media support, and provenance integrity. Limnexa deliberately avoids reducing all of this into one unexplained confidence number because different conclusions require different kinds of evidence.

When the required conditions are satisfied, versioned deterministic rules create operational events and preserve the complete reasoning trace including the exact evidence used, rule version, policy version, condition results, remaining uncertainty, and required next action. Authorized users can acknowledge, investigate, intervene, request follow up monitoring, and close incidents through a controlled state machine.

The same evidence graph drives adaptive monitoring, so stale measurements, weak corroboration, geographic gaps, conflicting observations, or missing variables can generate targeted collection requests instead of remaining passive warnings. Limnexa therefore closes the loop between uncertainty and new evidence rather than stopping at visualization.

How I built it

SpacetimeDB Maincloud owns authoritative evidence and operational state through transactional reducers, private tables, generated bindings, identity aware views, realtime subscriptions, and append only revision history. Evidence cannot be silently rewritten, incident transitions cannot bypass domain rules, and multiple users can see operational changes propagate in real time.

The application layer uses Next.js, React, TypeScript, and Vercel, while external work is separated from authoritative state through a transactional outbox and durable workflow processing. Notifications, enrichment, interoperability, and other external operations use stable idempotency keys so retries cannot create duplicate investigations, alerts, or actions.

AI is constrained to bounded tasks such as extracting candidate fields from natural language, assisting with media triage, simplifying ecological terminology, and explaining existing rule traces. It does not invent measurements, change policy, confirm contamination, open or close incidents, or bypass evidence requirements. Voice capture through ElevenLabs lets field users describe stream conditions hands free, after which structured candidate observations must still be confirmed before entering the evidence graph.

Geospatial logic uses canonical stream reaches, H3 cells, MapLibre, and supporting spatial utilities so observations belong to ecological entities rather than arbitrary map pins. Offline field work is supported through a PWA architecture and IndexedDB backed drafts, allowing observations and media to survive poor connectivity and synchronize later without breaking provenance.

At the interoperability boundary, Limnexa maps appropriate information into FHIR R4 resources such as Observation, Location, Specimen, Provenance, Communication, and Task, using OneAquaHealth profiles where applicable while preserving a richer internal environmental model.

Challenges I ran into

The hardest problem was preserving scientific meaning across different evidence classes because a citizen statement, calibrated measurement, deterministic calculation, probabilistic inference, expert verification, and authority decision may all describe the same stream while carrying completely different evidentiary weight. Limnexa solves this structurally by storing those classes separately, preserving their lineage, and controlling which kinds of evidence are sufficient for each operational decision.

The second challenge was correctness across distributed failure boundaries. A successful environmental decision cannot depend on every external service being available at the same moment, so authoritative state is committed independently while outbox processing, durable workflows, stable idempotency keys, immutable revisions, and conflict aware synchronization protect the system from retries, outages, reconnects, and duplicate messages.

The third challenge was resisting false precision. Environmental applications naturally drift toward simplified red, yellow, and green scores, but a single number can hide whether the underlying evidence came from an instrument, a citizen observation, a model, or an assumption. Limnexa keeps those dimensions inspectable and makes uncertainty operational instead of cosmetic.

Accomplishments that I'm proud of

The strongest part of Limnexa is that every consequential decision can be traced backward through the exact evidence IDs, validation assertions, source lineage, policy version, rule version, condition results, state transition, investigation, intervention, and follow up outcome. The system can answer why did this become actionable without depending on hidden reasoning or an unexplained risk score.

Limnexa also distinguishes between different kinds of consequence instead of escalating every anomaly into the same workflow. An ecological event can remain ecological, a citizen report can justify investigation without proving contamination, and a public health escalation can require stronger evidence than an environmental investigation, preserving the actual meaning of One Health rather than flattening it into one generic danger category.

The stack forms one coherent execution chain, with SpacetimeDB owning authoritative state, deterministic rules owning operational decisions, Vercel handling durable external execution, ElevenLabs improving field capture, FHIR providing interoperability, and adaptive monitoring closing the evidence loop.

What I learned

The most important engineering lesson was that trustworthy systems depend on assigning authority to the correct layer. Extraction, explanation, translation, and interface assistance can tolerate probabilistic behavior, while incident creation, policy enforcement, evidence mutation, and closure require deterministic and auditable control.

I also learned that provenance becomes much more useful when it is part of the execution graph instead of metadata added afterward. Observations, revisions, validation assertions, rules, state transitions, external deliveries, interventions, and follow up measurements can then be traversed as one causal record of how evidence became action.

That same structure changes the meaning of uncertainty because if the system knows exactly what is missing, whether that is corroboration, recency, spatial coverage, a measurement, or expert verification, the missing information can become the next monitoring task.

What's next for Limnexa

The next phase is to replace demonstration policy with jurisdiction specific, scientifically reviewed protocols and thresholds, connect authoritative monitoring networks and reference datasets, validate the OneAquaHealth and FHIR mappings against target systems, and test the workflow with citizens, freshwater scientists, environmental officers, and public health stakeholders.

Longer term, the same evidence to action architecture can extend into biodiversity surveillance, vector monitoring, soil contamination, air quality, and other environmental health domains because the underlying systems problem remains the same, heterogeneous observations must become trustworthy evidence before they become defensible action.

Built With

  • dexie
  • elevenlabs
  • fhir-r4
  • h3
  • indexeddb
  • maplibre-gl-js
  • next.js
  • oneaquahealth
  • open-meteo
  • playwright
  • pmtiles
  • pwa
  • spacetimedb
  • tailwind-css
  • turf.js
  • typescript
  • vercel
  • vercel-ai-gateway
  • vercel-ai-sdk
  • vercel-blob
  • vercel-queues
  • vercel-workflow
  • vitest
  • zod
Share this project:

Updates