Skip to content

Five domains are named in the plural, and the ADR says they are not #1314

Description

@ExtraToast

What is wrong

ADR-001 says domain directories are named in the singular:

Domain names are singular and match the API moduleboard, not boards — so one word names the same capability on both sides of the wire.

Five of the eleven are plural: boards, cohorts, committees, emails, jobs. The other six — association, auth, contribution, esports, recovery, user — happen to read as singular, which is why this went unnoticed.

Nothing enforces the rule, and the tree has gone the other way for long enough that the rule is the odd one out rather than the code. #1273 recorded that as-built and pointed here, rather than leaving a sentence the tree contradicts.

The decision

Either the names follow the rule, or the rule follows the names. Both are defensible and the cost is very different:

  • Rename the five. Every import of @/domains/boards, @/domains/cohorts, @/domains/committees, @/domains/emails and @/domains/jobs moves, across pages, components, tests and the eslint allowlist. Mechanical, but it touches a lot and will conflict with every open branch — the ktlint reformat has just shown what that costs.
  • Drop the rule. Say the name matches the API module and leave the grammatical number to whatever that module is called. Cheapest, and it gives up the "one word on both sides of the wire" property the rule was written for.

Worth checking before deciding: what the API modules are actually called. If the backend says boards, the frontend is already consistent with the wire and the ADR sentence is simply wrong about what matching means.

Acceptance criteria

  • What the API modules are named is established, so "matches the API module" has a referent
  • Either the five directories are renamed, or ADR-001's naming sentence is replaced by what is true
  • Whichever way it goes, nothing is left saying the opposite
  • If the rule survives, something enforces it — an unenforced naming rule is what produced this

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationpriority/4-laterWorth doing, waiting on a decision or on earlier slices.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions