Build Recipe

From concept to 650+ words

← Back to vocabulary

Prompts to Recreate This Site

The prompts (washed & ordered) used to take this project from a vague idea to 650+ words across 9 deployed pages. Hand any of them to a capable LLM to reproduce the corresponding artifact.

0Frame the learner & the methodConcept

Open with who the tool is for and how it teaches. Everything downstream — schema, page splits, example sentences — falls out of this.

I'm a Chinese-speaking commodity trader (silver, copper, options, crypto) who reads The Economist regularly. My English is B1–B2; I want to push to C1 (≈10k word families, 98% Economist coverage). I follow geopolitics — Iran–US, China trade — closely. Build me a vocabulary tool where I start from a Chinese concept (e.g. "削弱") and branch into 3–4 English near-synonyms with subtle differences. For each word I want IPA, part of speech, transitivity, etymology, an Economist-style example, collocations, and a one-line distinction telling me when to use this word over its synonyms. The whole thing should be self-hosted static HTML — no build step.
1Lock the data schemaSchema

Pin the word object before generating any content. Every field must carry weight — no empty placeholders.

Define a single word object with exactly these fields: en, ipa, pos (vt / vi / vt·vi / n / n·vt / adj / adj·n / adv / idiom), zh, etym (brief, mixed Chinese+English, memory-aid not academic), example (sounds like The Economist — formal British English, real geopolitical/economic content), coll (collocations), dist (one-line Chinese distinction from its synonyms — this is the most important field). Group words into concept objects: { concept, zh, words[] }. For cross-page references, use a skip-entry where example: "skip", filtered out at runtime via a CLEAN_DATA pass.
2Pick the stack & the page templateArchitecture

Bias hard toward zero-friction: no npm, no bundler, no server logic. Each HTML file is a working artifact on its own.

  • React 18 via cdnjs (production UMD)
  • Babel Standalone for in-browser JSX
  • Web Speech API for pronunciation (en-GB voice, rate 0.85)
  • All state in useState — no localStorage (must work in artifact sandboxes)
<!DOCTYPE html>
<html lang="en"><head>
  <meta charset="UTF-8">
  <script src="https://cdnjs.cloudflare.com/.../react.production.min.js"></script>
  <script src="https://cdnjs.cloudflare.com/.../react-dom.production.min.js"></script>
  <script src="https://cdnjs.cloudflare.com/.../babel.min.js"></script>
</head><body>
  <div id="root"></div>
  <script type="text/babel">
    const { useState, useMemo } = React;
    const DATA = [/* concept groups */];
    const CLEAN_DATA = DATA.map(g => ({...g, words: g.words.filter(w => w.example !== "skip")})).filter(g => g.words.length);
    function speak(word) { /* SpeechSynthesis, en-GB, rate 0.85 */ }
    function App() { /* Header, Stats, Controls, ConceptGroup, WordCard, Quiz */ }
    ReactDOM.createRoot(document.getElementById("root")).render(<App/>);
  </script>
</body></html>
3Design the componentsUI

Six components, each doing one thing:

  • Header — sticky, theme-colored, page title + subtitle in uppercase.
  • Stats bar — dark (#1a1a1a): total words / groups / currently showing.
  • Controls — search (matches en, zh, concept, collocations), filter buttons (All / Verbs / Nouns / Adj), Quiz button.
  • ConceptGroup — accordion, theme-colored header, collapsed by default, rotating arrow.
  • WordCard — collapsed shows word + 🔊 + IPA + POS badge + Chinese; expanded adds etymology, italic left-bordered example, green-bg distinction, collocations. The 🔊 button must call e.stopPropagation() so it doesn't toggle the card.
  • QuizModal — picks 20 random words, shows Chinese + (letter count, first letter), scores at the end. Pages 1–7 only.

POS badge colors are fixed across all pages: vt #C41B0E, vi #B8860B, vt/vi #8B4513, n #1B4965, n/vt #2D6A4F, adj #6B21A8, idiom #7C2D12, adv #B8860B.

4Assign a theme per pageTheme

Each of the 9 pages gets a distinct accent so the user can tell at a glance which "deck" they're in.

1  Core            #E3120B  red       on  #FAF7F2
2  Extended        #1B4965  navy      on  #FAF7F2
3  Nouns           #2D6A4F  green     on  #F5FAF5
4  Specialist      #92400E  amber     on  #FFFCF5
5  Advanced        #6B21A8  purple    on  #FAF5FF
6  Final           #0E7C86  teal      on  #F0FAFB
7  Uncategorisable #475569  slate     on  #F8FAFC
8  Idioms          #7C2D12  maroon    on  #FDF5F3
9  Headlines       #312E81  indigo    on  #F5F3FF
5Generate Page 1 — Core VocabularyContent

The seed page. ~30 concept groups × 3–5 words ≈ 144 words. These are the networks that surface in nearly every Economist issue.

Generate Page 1 (red theme #E3120B) using the locked schema. Build ~30 concept groups around: weaken/undermine, influence, instability, reduce, surge, decline, obstruct, strengthen, conflict, sanctions, diplomacy, monetary policy, inflation, trade, market moves, accumulate, sell, manipulate, evade, squeeze, seize, allocate, expose, overthrow, delay, compromise, governance, suppress, default, corruption, reform, withdraw, condemn, alliance, coercion, plus high-frequency modifiers (stark, pivotal, protracted, punitive, backlash, trajectory…). For each word fill all 7 fields. The dist line is non-negotiable — it's what makes the synonym set teachable.
6Build Pages 2–7, deduping as you goContent

Each page has a thematic spine. Before generating, scan all earlier pages for the English word — if it exists, either skip or insert a skip-entry.

  • Page 2 (71) — Extended networks: forecast, exacerbate, proliferate, scrutinise, lobby, flourish, pledge, squander, dominate, impoverish, catalyse, exempt, intervene, emerge, justify, yield, absorb, diminish, sustain, compete, inaugurate, incentivise.
  • Page 3 (61) — Nouns & key concepts: debt, bureaucracy, consensus, embezzle, migration, infrastructure, regulation, prospects, abundance, transparency, robustness, mandate, revenue, roles, equity, affluence, benchmarks, stakeholders, pragmatism.
  • Page 4 (58) — Specialist contexts: climate, geopolitics, technology, debt mechanics, supply chain, elections, currency, boom/bust, welfare, sanctions mechanics, healthcare, propaganda, conceal, compliance, prosperity.
  • Page 5 (68) — Advanced & domain-specific: severity, lucrative, nascent, ubiquitous, ceasefire, insurgency, trade theory, legal verbs, jeopardise, precipitate, viable, clandestine, benign, grapple, herald, pundit, fragment.
  • Page 6 (93) — Final collection: austerity, corporate, market structure, diplomacy verbs, inequality, governance forms, modifiers, embark, preclude, punish, echo, urbanisation, buttress, circumscribe, monetary, apathy, credibility, accelerate, embed, privilege, implicit, censor, tinderbox, fiscal tools.
  • Page 7 (68) — Uncategorisable high-frequency: signature adverbs (albeit, notwithstanding, hitherto, ostensibly…), mood words, severity, attitude, problems, reject verbs, the big phrasal-verb set (rein in, ramp up, scale back, roll out, water down, fend off, stave off, phase out), complain, foundation, solutions, predicament, replace, annul, signpost.

Verification script after each page:

import re
seen = set()
for f in pages:
    words = set(re.findall(r'en: "([^"]+)"', open(f).read()))
    print(f, "duplicates:", words & seen)
    seen |= words
7Idioms & headline puns — Pages 8 & 9Content

These sit outside the synonym-network model — they're fixed expressions and rhetorical devices. Same schema, but pos: "idiom" and the dist field becomes "when an Economist writer reaches for this".

  • Page 8 (45) — kick the can, paper over the cracks, move the goalposts, elephant in the room, Achilles' heel, Pyrrhic victory, fait accompli, quid pro quo, double-edged sword, tipping point, Trojan horse, smoke and mirrors, trump card, Catch-22, zero-sum game, moral hazard, eleventh hour, Sisyphean, between a rock and a hard place…
  • Page 9 (39) — double-meaning headline words (shell, stake, cell, current, reserve), headline formulas (X-onomics, The great X, A tale of two X), cultural allusions (Potemkin, Faustian bargain, Gordian knot, Pandora's box), metaphors (headwind/tailwind, soft/hard landing, war chest, firewall), animal metaphors (hawk/dove, black swan, lame duck), Latin/French (de facto, de jure, raison d'être), tone words (alas, indeed, merely).
8Build the index page lastIndex

Once all 9 content pages are verified working, build a pure HTML/CSS landing page (no React) — red Economist-style header, dark stats bar, card grid. Each card: colored top bar matching the page theme, title, description, word count, hover lift.

9The traps that will bite youGotchas
  • Curly quotes inside JS strings. "" look identical to "" in some fonts and silently break Babel parsing. Use straight quotes only.
  • Template literals inside JSX style props. Babel Standalone chokes. Use string concatenation: "2px solid " + (active ? "#E3120B" : "#ccc").
  • Always run CLEAN_DATA. Forgetting the filter leaks skip-entries into the UI as broken cards.
  • stopPropagation on the speak button — otherwise tapping 🔊 also collapses the card.
  • Test every page in a real browser before deploying. JSX errors only show at runtime.
  • Target ≥650 unique words across all 9 pages, zero duplicates.