Create the Lexicon and Study Ash domains #6

Open
opened 2026-09-26 13:58:29 +00:00 by belvedere · 0 comments
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.
Sign in to join this conversation.
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#6
No description provided.