Repository navigation
Description
Purpose
A "you are here" for the project after a long pause β honest state of the codebase, what the previous Rails app gives us, how the scattered vision/planning issues reconcile, and a concrete MVP build order to get from "dictionary" β "layered encyclopedia" and start landing the features in #66 / #67.
This is the orientation doc. It does not replace the planning issues β it points at them. See the Issue Map at the bottom.
1. Where we are (current Phoenix codebase)
One commit (7c6dd33, "Initial commit: Devil's Dictionary Phoenix/Elixir rebuild"). It's a clean, well-structured dictionary β not yet an encyclopedia. Phoenix 1.8 + LiveView 1.1 + Postgres + Tailwind v4.
β What actually works
- Schemas + changesets, all migrated & tested-by-construction:
Topic(title, slug, type, pronunciation, part_of_speech,display_typeredirect/disambiguation, self-refredirect_to)Definition(content, source_name/url/year,tier β [:aristocracy,:middle,:plebs], position, author FK)Person(bio, birth/death dates β auto-aristocracy if dead, external IDs: google_knowledge_id, tmdb_id, open_library_id, wikidata_id)TopicRelationship(word_form/synonym/related/see_also/antonym/broader/narrower/disambiguates, weight, bidirectional)Accounts.User(Clerk-shaped)
Dictionarycontext β full CRUD,get_topic_with_definitions/1(tier-ordered preload),search_topics/2(ilike), relationships, word-forms.- Three working LiveViews:
HomeLive(search),TopicLive(/define/:slugβ the 3-tier definition page),BrowseLive(/browse,/browse/:letterAβZ). DictionaryComponentsβ tier-specific definition cards (gilded aristocracy / clean middle / social plebs). This is the "layout is the argument" idea, already rendered.- Infra wired: Oban in the supervision tree, Cachex dep, Req, Floki, pg extensions migration, Oban jobs table.
- Seed data (demo-scale): 3 people, 5 topics, 17 definitions, 3 relationships.
π‘ Stubbed / shaped but not functional
DictionaryAPIcontext is an empty stub β just a moduledoc saying "API clients added in Phase 4." This is the single biggest gap vs. what we want next (import from sources).- Auth is cosmetic β
Accountsis written around Clerk (webhook sync,get_user_by_clerk_id), but there's noclerk_elixirdep, no webhook controller, no auth plug, no login UI. Nothing is actually gated. - Oban has zero workers β configured but idle.
- No admin/seeding UI β content only via
seeds.exsor IEx.
β Not present at all
- No evidence / media entity (the Evidence Wall β masonry feed of mixed culture (tweets, lyrics, reels, TikToks, YouTube) with type filtersΒ #67 wall has no backing schema).
- No quote entity (Quote layer with provenance scoringΒ #65).
- No vote entity (no upvotes/agree-counts anywhere).
- No bot entity (Curator BotsΒ #17).
- Relationships exist in data but have no real UI (TopicLive "See Also" is a thin placeholder).
- Only 4 test files (Phoenix defaults + error views) β no context/LiveView tests.
2. The asset we already paid for: the old Rails app
The closed PRs (#12β#62, all Bump β¦-rails, solid_queue, brakeman, aws-sdk-s3, nokogiri, engtagger) confirm the prior version was a mature Rails app, and #44 documents it in detail. Don't reinvent β port.
-
~23 models (STI: TopicβPerson/Place/Concept/β¦; ExpressionβQuote/Lyric/Poem; MediaβMovie/TvShow/Photo/Art/Gif) + Vote, Bot, BotInfluence, join tables.
-
14 working API integrations with known auth/effort:
Tier fit Free / no-auth (do first) Needs key π Aristocracy Samuel Johnson, (Bierce = static corpus) β π Middle WikiQuotes, PoetryDB, OpenLibrary TMDB, Unsplash, Artsy, KnowledgeGraph, BrainyQuotes (Zyte), Genius (Bearer+Zyte) π± Plebs ConceptNet, Datamuse Urban Dictionary (RapidAPI), Giphy
The Rails ingestion logic (parsing, rate handling, dedup) is reference material we can translate into Elixir DictionaryAPI.Clients.* + Oban workers. Action: locate the Rails repo and link it here so we can port client-by-client. (Not in this working tree; ~/Code/projects-2026/argus is a different Elixir app, not the old dictionary.)
3. Reconciling the vision (so we stop re-planning)
Multiple issues describe the same thing with different vocabulary. They agree; here's the merge:
| Code term (shipping) | #64 "encyclopedia" framing | #46/#48 "class" framing | Nature | Who controls |
|---|---|---|---|---|
:aristocracy π |
Canonical | Aristocracy of the Dead | Truth | Editorial / curated import |
:middle π |
Curated | Middle Class | Interpretation | Editorial + institutional import |
:plebs π± |
Public | The Plebs | Noise / culture | User-submitted + social import |
The dictionaryβencyclopedia move is exactly: keep the tiered definitions (dictionary), then layer on evidence from the culture (#67), quotes with provenance (#65), and relationships (#66 see-also) β the "in popular culture" + cross-reference fabric that makes it encyclopedic. The schema already anticipates this (tiers, external IDs, relationships).
Recommendation: keep the :aristocracy/:middle/:plebs enum in code (it's the brand voice), treat Canonical/Curated/Public as the conceptual names in docs. Don't rename the enum for MVP.
4. Recommended MVP build order
Goal of MVP: a real corpus, imported from real sources across the three tiers, on a polished definition page, with the first slice of the evidence layer. Auth, votes, bots, and media-heavy sources are deferred.
Phase 0 β Harden the foundation (small, do first)
- Seed the full Ambrose Bierce corpus (~1,000 public-domain defs) so the dictionary feels real, not a demo. π
- Add context + LiveView tests for the existing
Dictionarypaths (search, tier ordering,/define/:slug). - Decide auth posture for MVP (see Open Decisions) β likely defer Clerk, ship read-only + an IEx/admin seed path.
Phase 1 β The import pipeline (the "base layer to import different sources" the project hinges on) π―
Build DictionaryAPI for real, vertically, on the free/no-auth sources so there are no key blockers:
-
DictionaryAPI.Clients.FreeDictionary(dictionaryapi.dev) β π Middle definitions + pronunciation/part-of-speech. -
DictionaryAPI.Clients.UrbanDictionaryβ π± Plebs definitions (this is where situationship/performative live). -
DictionaryAPI.Clients.Wikiquoteβ quotes/curated β π Middle (feeds Quote layer with provenance scoringΒ #65 later). - Pattern to standardize once: Req client β Cachex cache β Oban worker β upsert
Definition(dedup on topic+source) β bumpdefinition_count. - A
mix dd.import <word>task (or tiny admin LiveView) that, given a headword, fans out to all clients and populates all three tiers. This is the "magic moment." - Port one π source next (Samuel Johnson) to prove the aristocracy tier isn't only static Bierce.
Phase 2 β Evidence wall MVP (#67) π₯
-
Evidenceschema:topic_id,type β [:tiktok,:youtube,:song_lyric,:instagram,:tweet],url,title,thumbnail_url,submitter,metric_kind,metric_count,position. - Paste-a-link β oEmbed/OG unfurl Oban worker to fill title/thumbnail/metric (reuses Phase 1 import pattern).
- Masonry LiveView component + type filter chips (default = All) per the Evidence Wall β masonry feed of mixed culture (tweets, lyrics, reels, TikToks, YouTube) with type filtersΒ #67 design.
- Render under
TopicLive, "stays put while the definitions argue."
Phase 3 β Encyclopedic fabric
- See-also UI (Design: Definition page β three-tier definitions + community evidence wall (wireframes, UI, UX)Β #66 footer chips) on top of the existing
TopicRelationshipdata β real cross-linking. - Quote layer (Quote layer with provenance scoringΒ #65) β schema + provenance score, start with Wikiquote ingestion from Phase 1.
- Seed the Guardian Gen Z terms (Import the Guardian's Gen Z dating glossary (1 Jan 2026, 49 terms) as a π± source: every term defines a word, 24 new word pages, the wording held until the Guardian says yesΒ #63) as a Plebs source to light up situationship/performative/rizz/etc.
Deferred (post-MVP)
Clerk auth + user accounts Β· voting/agree-counts (needs auth) Β· Curator Bots (#17) Β· key-gated media sources (TMDB/Unsplash/Giphy/Genius) Β· disambiguation/redirect pages.
5. Open decisions (need a call before/within Phase 1)
- Auth for MVP: defer Clerk and ship read-only + admin-seed (faster), or wire Clerk now (unblocks votes/submissions earlier)? Recommend: defer.
- Find & link the old Rails repo so API clients can be ported rather than rewritten. Where does it live?
- Evidence votes at launch? The Evidence Wall β masonry feed of mixed culture (tweets, lyrics, reels, TikToks, YouTube) with type filtersΒ #67 cards show counts β for MVP, show native source metrics (likes/views) only and defer our own agree-voting until auth exists? Recommend: yes, native-only first.
- Tier vs. Layer naming in UI copy β keep aristocracy/middle/plebs visible, or surface Canonical/Curated/Public? Recommend: keep the class names, they're the brand.
- AI-generated π definitions ("Oscar Wilde on crypto") β in MVP corpus or deferred? Recommend: defer; seed real public-domain first.
6. Issue map (how the open issues relate)
- Vision / planning: π Vision: The Construction of Truth - A Philosophical BrainstormΒ #45 (philosophy) Β· ποΈ Vision: The Aristocracy of Truth - Hierarchy of KnowledgeΒ #46 (Aristocracy of Truth) Β· Define layered encyclopedia vision and MVP planΒ #64 (layered encyclopedia + MVP) Β· Overview full-startΒ #16 (the original source dump)
- Roadmaps (overlapping β π― Master Plan: Devil's Dictionary Phoenix Rebuild - Complete Phased RoadmapΒ #61 is the consolidator): π― Master Plan: Devil's Dictionary Phoenix Rebuild - Complete Phased RoadmapΒ #61 Master Plan β ποΈ Devil's Dictionary: Complete Phoenix Rebuild - Layered RoadmapΒ #44, MVP: Devil's Dictionary Phoenix Rebuild - Hierarchical Knowledge PlatformΒ #48, π¨ UI/UX: Layered Content Architecture - Sources, Stacking, and Visual HierarchyΒ #47, UI/UX: Design System, Pages & WireframesΒ #59, Architecture: Topic Relationships, Word Forms & DisambiguationΒ #60
- Design (current, actionable): Design: Definition page β three-tier definitions + community evidence wall (wireframes, UI, UX)Β #66 definition page Β· Evidence Wall β masonry feed of mixed culture (tweets, lyrics, reels, TikToks, YouTube) with type filtersΒ #67 evidence wall β this is what we're building toward
- Feature specs: Architecture: Topic Relationships, Word Forms & DisambiguationΒ #60 relationships/disambiguation Β· Quote layer with provenance scoringΒ #65 quote provenance Β· Import the Guardian's Gen Z dating glossary (1 Jan 2026, 49 terms) as a π± source: every term defines a word, 24 new word pages, the wording held until the Guardian says yesΒ #63 Guardian source Β· Curator BotsΒ #17 curator bots
- This issue: state-of-the-world + MVP build order tying the above to the code that exists.
Suggested housekeeping: this issue + #61 + #66/#67 are the only ones needed day-to-day. #44/#47/#48 are now reference; consider labeling them
planning/referenceto reduce noise.
Activity
holden commentedon Sep 18, 2026
Closing as a superseded planning document: the README's status table and decision log are the living record since MVP-0 (2026-09-07), and the current trackers are #109 (providers), #116 (multi-source shelves), #111 (the page), #105 (exemplars), #101 (assessor), #97 (personas). The vision issues #45/#46 and the design/layer issues #65/#66/#67/#63/#17 stay open.