Documentation

System architecture

This page describes the main layers used in the Reef Oracle MVP and how data moves between them.

Presentation layer

Next.js route segments render map, image detail, upload, export, and docs workflows.

  • Route modules keep UI shells thin and delegate logic to helper modules.
  • Client components handle staged form interactions and status updates.
  • Views prefer shared typed contracts to avoid route-specific payload drift.

Shared contracts layer

Workspace packages provide reusable transport, validation, and type contracts.

  • client-sdk centralizes gateway request methods.
  • ts-validation guards payloads before network calls.
  • ts-types keeps domain models aligned across apps and services.

Gateway and service layer

API gateway handlers enforce auth and route requests to fusion and ingestion services.

  • Middleware checks JWT, role, and license access before route handling.
  • Fusion routes provide run, batch, and status orchestration points.
  • Fallback responses keep the UI operable during integration phases.