Create the Lexicon and Study Ash domains #58

Closed
opened 2026-09-26 13:58:54 +00:00 by belvedere · 1 comment
Collaborator

Objective: Domain boundaries exist before resources are added, so policy and code-interface
generation have somewhere to live.

Files:

  • Create: lib/first_thousand_words/lexicon.ex
  • Create: lib/first_thousand_words/study.ex
  • Modify: config/config.exs (ash_apis)

Steps:

  1. use Ash.Domain in each, with a short @moduledoc describing the boundary:
    • Lexicon — languages, words, concepts, translations (reference data, read-mostly).
    • Study — decks, cards, reviews, scheduling (per-user, write-heavy).
  2. Register both in config :first_thousand_words, ash_apis: [Lexicon, Study].

Verify: mix compile --warnings-as-errors passes; mix ash.codegen --dev is reachable.

Decision to record: why two domains and not one — reference data vs per-user state have
different authorization and retention stories.

**Objective:** Domain boundaries exist before resources are added, so policy and code-interface generation have somewhere to live. **Files:** - Create: `lib/first_thousand_words/lexicon.ex` - Create: `lib/first_thousand_words/study.ex` - Modify: `config/config.exs` (`ash_apis`) **Steps:** 1. `use Ash.Domain` in each, with a short `@moduledoc` describing the boundary: - `Lexicon` — languages, words, concepts, translations (reference data, read-mostly). - `Study` — decks, cards, reviews, scheduling (per-user, write-heavy). 2. Register both in `config :first_thousand_words, ash_apis: [Lexicon, Study]`. **Verify:** `mix compile --warnings-as-errors` passes; `mix ash.codegen --dev` is reachable. **Decision to record:** why two domains and not one — reference data vs per-user state have different authorization and retention stories.
Author
Collaborator

Duplicate of #6 — created by a re-run whose pagination helper only saw the first page of issues. Closing to keep the backlog clean. Repo owner can delete this outright.

Duplicate of #6 — created by a re-run whose pagination helper only saw the first page of issues. Closing to keep the backlog clean. Repo owner can delete this outright.
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
nickkeers/first-thousand-words#58
No description provided.