You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"The dead know better. The living just have opinions."
This is the definitive implementation roadmap for rebuilding Devil's Dictionary as a Phoenix/Elixir application. It synthesizes all previous planning issues into a single, phased execution plan.
📋 Executive Summary
Vision: A hierarchical knowledge platform where the stratification of truth is made explicit and visible—from aristocratic dead intellectuals to the plebeian chaos of social media.
Tech Stack:
Framework: Phoenix 1.7+ with LiveView
Database: PostgreSQL 15+
Auth: Clerk (clerk_elixir)
UI: Tailwind CSS + Oatmeal Theme (Tailwind Plus)
Background Jobs: Oban
Caching: Cachex
HTTP Client: Req
Core Principle: The layout itself is the argument. Visual hierarchy communicates the stratification of knowledge sources.
🗂️ Complete Schema Overview
Phase 1: Core Content (MVP)
# Topics - Core content organizationschema"topics"dofield:title,:stringfield:slug,:string# URL identifier, uniquefield:type,Ecto.Enum,values: [:concept,:thing,:place,:event,:action,:person,:organization,:other]field:pronunciation,:string# Optional phoneticfield:part_of_speech,:string# noun, verb, adj, etc.field:definition_count,:integer,default: 0# Display handling (from #60)field:display_type,Ecto.Enum,values: [:standard,:redirect,:disambiguation],default: :standardbelongs_to:redirect_to,Topic# For pure redirects onlytimestamps()end# People - Authors, creators, notable figuresschema"people"dofield:name,:stringfield:slug,:stringfield:birth_date,:datefield:death_date,:date# nil = living (Middle Class tier)field:bio,:textfield:photo_url,:stringfield:tier,Ecto.Enum,values: [:aristocracy,:middle,:plebs]# External IDs for API enrichmentfield:google_knowledge_id,:stringfield:tmdb_id,:integerfield:open_library_id,:stringfield:wikidata_id,:stringtimestamps()end# Definitions - Multi-source definitions per topicschema"definitions"dobelongs_to:topic,Topicbelongs_to:author,Person# nullablefield:content,:text# The definition textfield:source_name,:string# "The Devil's Dictionary"field:source_url,:stringfield:source_year,:integer# 1911field:tier,Ecto.Enum,values: [:aristocracy,:middle,:plebs]field:position,:integer# Display order within tiertimestamps()end# Topic Relationships - Semantic connections (from #60)schema"topic_relationships"dobelongs_to:topic,Topicbelongs_to:related_topic,Topicfield:relationship_type,Ecto.Enum,values: [# MVP (Phase 1):word_form,# aristocracy ↔ aristocratic:synonym,# truth ↔ verity:related,# truth → honesty:see_also,# editorial connection# Phase 2+:antonym,# truth ↔ lie:broader,# aristocracy → government:narrower,# government → aristocracy:disambiguates# bank → bank_finance, bank_geography]field:bidirectional,:boolean,default: truefield:weight,:float,default: 1.0timestamps()end
Phase 2: Expressions Layer
# Expressions - Quotes, lyrics, poemsschema"expressions"dofield:type,Ecto.Enum,values: [:quote,:lyric,:poem]field:content,:textfield:attribution_text,:string# "Oscar Wilde"belongs_to:author,Person# Resolved author (nullable)field:source_title,:string# "The Importance of Being Earnest"field:source_url,:stringfield:tier,Ecto.Enum,values: [:aristocracy,:middle,:plebs]# Quote-specificfield:disputed,:boolean,default: falsefield:misattributed,:boolean,default: falsetimestamps()end# Expression-Topic join (many-to-many)schema"expression_topics"dobelongs_to:expression,Expressionbelongs_to:topic,Topictimestamps()end# Books - Sources for definitions/quotesschema"books"dofield:title,:stringfield:slug,:stringbelongs_to:author,Personfield:open_library_id,:stringfield:publication_year,:integertimestamps()end# Websites - External sourcesschema"websites"dofield:title,:stringfield:url,:stringfield:tier,Ecto.Enum,values: [:aristocracy,:middle,:plebs]timestamps()end
┌──────────────────────────────────────────────────────────────────────────┐
│ [Logo: Devil's Dictionary] [Search 🔍] [Browse A-Z] │
├──────────────────────────────────────────────────────────────────────────┤
│ │
│ BROWSE THE DICTIONARY │
│ │
│ ┌────────────────────────────────────────────────────────────────────┐ │
│ │ A B C D E F G H I J K L M │ │
│ │ N O P Q R S [T] U V W X Y Z │ │
│ └────────────────────────────────────────────────────────────────────┘ │
│ │
│ T — 127 TOPICS │
│ ═══════════════════════════════════════════════════════════════════════ │
│ │
│ ┌────────────────────────────────────────────────────────────────────┐ │
│ │ 👑 TRUTH, n. ██████░░░░ 3/5 │ │
│ │ "An ingenious compound of desirability and appearance." │ │
│ │ — Ambrose Bierce │ │
│ └────────────────────────────────────────────────────────────────────┘ │
│ │
│ ┌────────────────────────────────────────────────────────────────────┐ │
│ │ TECHNOLOGY, n. ██░░░░░░░░ 1/5 │ │
│ │ [No aristocratic definition — only plebeian content] │ │
│ │ [View anyway →] │ │
│ └────────────────────────────────────────────────────────────────────┘ │
│ │
│ [Showing 4 of 127] [Load more ↓] │
│ │
└──────────────────────────────────────────────────────────────────────────┘
3. Person/Author Page
┌──────────────────────────────────────────────────────────────────────────┐
│ [Logo: Devil's Dictionary] [Search 🔍] [Browse A-Z] │
├──────────────────────────────────────────────────────────────────────────┤
│ │
│ ┌─────────────────────────────────────────────────────────────────────┐ │
│ │ ┌───────────────┐ │ │
│ │ │ │ AMBROSE BIERCE │ │
│ │ │ [Photo] │ 1842 — 1914 (disappeared) │ │
│ │ │ │ │ │
│ │ │ │ 👑 Aristocracy Tier │ │
│ │ └───────────────┘ American journalist, short story writer, │ │
│ │ and satirist. Best known for his sardonic │ │
│ │ wit and "The Devil's Dictionary." │ │
│ └─────────────────────────────────────────────────────────────────────┘ │
│ │
├──────────────────────────────────────────────────────────────────────────┤
│ │
│ DEFINITIONS BY AMBROSE BIERCE │
│ ══════════════════════════════════════════════════════════════════════ │
│ │
│ Showing 998 of 998 definitions [Sort: A-Z ▼] │
│ │
│ ╔════════════════════════════════════════════════════════════════════╗ │
│ ║ ABSTAINER, n. ║ │
│ ║ "A weak person who yields to the temptation of denying himself ║ │
│ ║ a pleasure." ║ │
│ ╚════════════════════════════════════════════════════════════════════╝ │
│ │
│ [Load more ↓] │
│ │
└──────────────────────────────────────────────────────────────────────────┘
4. Empty Topic Fallback (Word Form)
┌────────────────────────────────────────────────────────────────────────┐
│ ARISTOCRATICAL, adj. │
│ /əˌrɪstəˈkrætɪkəl/ │
│ │
│ ┌──────────────────────────────────────────────────────────────────┐ │
│ │ An archaic form of ARISTOCRATIC. │ │
│ │ │ │
│ │ → See ARISTOCRATIC for definitions │ │
│ └──────────────────────────────────────────────────────────────────┘ │
│ │
│ Word Family: aristocracy • aristocratic │
└────────────────────────────────────────────────────────────────────────┘
5. Disambiguation Page
┌────────────────────────────────────────────────────────────────────────┐
│ BANK │
│ │
│ Bank may refer to: │
│ │
│ ┌──────────────────────────────────────────────────────────────────┐ │
│ │ BANK (finance) │ │
│ │ A financial institution that accepts deposits and makes loans. │ │
│ │ → 5 definitions │ │
│ └──────────────────────────────────────────────────────────────────┘ │
│ │
│ ┌──────────────────────────────────────────────────────────────────┐ │
│ │ BANK (geography) │ │
│ │ The land alongside a river or body of water. │ │
│ │ → 2 definitions │ │
│ └──────────────────────────────────────────────────────────────────┘ │
└────────────────────────────────────────────────────────────────────────┘
🎯 Master Plan: Devil's Dictionary Phoenix Rebuild
Consolidates: #44, #45, #46, #47, #48, #59, #60
This is the definitive implementation roadmap for rebuilding Devil's Dictionary as a Phoenix/Elixir application. It synthesizes all previous planning issues into a single, phased execution plan.
📋 Executive Summary
Vision: A hierarchical knowledge platform where the stratification of truth is made explicit and visible—from aristocratic dead intellectuals to the plebeian chaos of social media.
Tech Stack:
Core Principle: The layout itself is the argument. Visual hierarchy communicates the stratification of knowledge sources.
🗂️ Complete Schema Overview
Phase 1: Core Content (MVP)
Phase 2: Expressions Layer
Phase 3: Media Layer
Phase 4: Community Layer (Future)
🎨 UI/UX Design System
Template Foundation: Oatmeal (Tailwind Plus)
Why Oatmeal works:
Tier-Specific Color Systems
Typography System
Tailwind Config Extension
📐 Wireframes
1. Topic Detail Page (Desktop)
2. Browse A-Z Page
3. Person/Author Page
4. Empty Topic Fallback (Word Form)
5. Disambiguation Page
🚀 Implementation Phases
═══════════════════════════════════════════════════════════════════════
PHASE 0: PROJECT FOUNDATION
═══════════════════════════════════════════════════════════════════════
Goal: Fully configured Phoenix project ready for development
0.1 Development Environment
0.2 Phoenix Project Creation
mix phx.new devils_dictionary --database postgresql cd devils_dictionaryconfig/dev.exswith local PostgreSQL credentialsconfig/test.exsfor test databasemix phx.server0.3 Tailwind CSS Setup
assets/tailwind.config.jswith custom colors:root.html.heex0.4 Oatmeal Theme Installation
vendors/folderassets/css/app.css0.5 LiveView Configuration
endpoint.ex0.6 Authentication Setup (Clerk)
clerk_elixirtomix.exsdependencies:config/runtime.exs:userstable migration (clerk_user_id, email, metadata)0.7 Core Dependencies
mix.exs:mix deps.getconfig/config.exsmix ecto.gen.migration add_oban_jobs_table0.8 Project Structure
0.9 Development Tooling
mix formatsettings in.formatter.exs{:credo, "~> 1.7", only: [:dev, :test]}{:dialyxir, "~> 1.4", only: [:dev], runtime: false}.gitignorefor Elixir/Phoenix projectpriv/repo/seeds.exs0.10 Verification
mix testAcceptance Criteria:
mix phx.serverstarts the applicationhttp://localhost:4000shows styled page with Oatmeal theme═══════════════════════════════════════════════════════════════════════
PHASE 1: MVP CONTENT
═══════════════════════════════════════════════════════════════════════
Goal: Browsable dictionary with tiered definitions and visual hierarchy
1.1 Core Schema (Topics, People, Definitions)
topicstable migration with all fieldspeopletable migration with tier enumdefinitionstable migration with tier and positiontopic_relationshipstable migrationSlugify1.2 Topic Relationships
1.3 Seed Data
mix run priv/repo/seeds.exs1.4 LiveView Components
AristocraticDefinitionCard- gilded frames, serif fonts, aged paperMiddleClassCard- clean borders, sans-serif, white bgPlebsCard- minimal borders, social aestheticTieredDefinitions- organizes and renders definitions by tierTopicCompleteness- visual progress bar showing layer coverageWordFamily- displays morphological variantsSynonyms- displays synonym relationshipsRelatedTopics- sidebar with semantic connectionsTopicHeader- title, pronunciation, part of speech1.5 Public Pages
/topics/:slug)/browseand/browse/:letter)/search)/people/:slug)1.6 Navigation & Layout
1.7 Admin Features (Basic)
Acceptance Criteria:
═══════════════════════════════════════════════════════════════════════
PHASE 2: EXPRESSIONS & QUOTES LAYER
═══════════════════════════════════════════════════════════════════════
Goal: "What They Said" section with quotes, lyrics, and poems
2.1 Expressions Schema
expressionstable with type enumexpression_topicsjoin tablebookstablewebsitestable2.2 API Infrastructure
2.3 WikiQuotes Integration
FetchQuotesJob2.4 PoetryDB Integration
2.5 UI: What They Said Section
Acceptance Criteria:
═══════════════════════════════════════════════════════════════════════
PHASE 3: PLEBEIAN LAYER
═══════════════════════════════════════════════════════════════════════
Goal: Visual contrast between aristocratic and plebeian content
3.1 Urban Dictionary Integration
3.2 UI: The Plebs Speak Section
Acceptance Criteria:
═══════════════════════════════════════════════════════════════════════
PHASE 4: MEDIA LAYER
═══════════════════════════════════════════════════════════════════════
Goal: "How Culture Sees It" with movies, photos, GIFs, art
4.1 Media Schema Implementation
mediatable with type enummedia_topicsjoin tablemedia_peoplejoin table with roles4.2 Giphy Integration
4.3 Unsplash Integration
4.4 TMDB Integration
4.5 UI: How Culture Sees It
Acceptance Criteria:
═══════════════════════════════════════════════════════════════════════
PHASE 5: ENRICHMENT & RELATIONSHIPS
═══════════════════════════════════════════════════════════════════════
Goal: Semantic connections and people enrichment
5.1 Knowledge Graph Integration
EnrichPersonJob5.2 OpenLibrary Integration
5.3 ConceptNet Integration
5.4 Datamuse Integration
5.5 Advanced Relationship Types
Acceptance Criteria:
═══════════════════════════════════════════════════════════════════════
PHASE 6: COMMUNITY FEATURES (FUTURE)
═══════════════════════════════════════════════════════════════════════
Goal: Voting, bots, and user contributions
6.1 Voting System
votestable (polymorphic)6.2 Bot Curators
botstablebot_influencestable6.3 User Contributions
═══════════════════════════════════════════════════════════════════════
PHASE 7: AI LAYER (FUTURE)
═══════════════════════════════════════════════════════════════════════
Goal: Resurrected dead authors via AI
7.1 Dead Author Personas
7.2 AI Definitions
═══════════════════════════════════════════════════════════════════════
PHASE 8: SOCIAL LAYER (FUTURE)
═══════════════════════════════════════════════════════════════════════
Goal: Real-time social content
🔌 API Integration Roadmap
📊 Success Metrics
Phase 0 (Foundation)
MVP (Phases 0-3)
Full Product (Phases 4-5)
Future (Phases 6-8)
📚 References
🏷️ Labels
master-planepicphoenixelixirmvproadmapui-ux"The dead know better. The living just have opinions."