Files
gridpilot.gg/docs/architecture/website/BLOCKERS.md
2026-01-11 14:42:54 +01:00

1.0 KiB

Blockers (Website UX)

This document defines Blockers as UX-only prevention mechanisms in the website.

Shared contract: docs/architecture/shared/BLOCKERS_AND_GUARDS.md

1) Definition

A Blocker is a website mechanism that prevents an action from being executed.

Blockers exist solely to improve UX and reduce unnecessary requests.

Blockers are not security.

2) Responsibilities

Blockers MAY:

  • prevent multiple submissions
  • disable actions temporarily
  • debounce or throttle interactions
  • hide or disable UI elements
  • prevent navigation under certain conditions

Blockers MUST:

  • be reversible
  • be local to the website
  • be treated as best-effort helpers

3) Restrictions

Blockers MUST NOT:

  • enforce security
  • claim authorization
  • block access permanently
  • replace API Guards
  • make assumptions about backend state

4) Common Blockers

  • SubmitBlocker
  • ThrottleBlocker
  • NavigationBlocker
  • FeatureBlocker

5) Canonical placement

  • apps/website/lib/blockers/**