Skip to content

ADR-010: Frontend Context Boundaries (App State Only)

Status: Accepted
Date: 2026-03-09
Deciders: CepatEdge maintainers

Context

Context growth risked becoming a mixed store for app state and server datasets.

Decision

Keep context for app-level shared state only:

  • auth
  • system metadata catalog
  • notifications global state
  • ui global state
  • theme

Use query hooks for server datasets.

Consequences

Positive

  • Cleaner ownership boundaries
  • Fewer stale-state bugs
  • Easier onboarding and testing

Negative

  • Requires discipline to avoid introducing list/detail data into context
  • docs/frontend/context/model.md
  • docs/frontend/query/tanstack.md