LEVEL 1 · STARTER

Glossary Hovercard Publisher

Help an educator add contextual definitions to existing lesson HTML using a reviewed glossary and longest-phrase matching. Preserve code and links, support keyboard-accessible definitions, and export a standalone annotated lesson with a reusable glossary file.

4 stages~8 hoursTypeScriptcore
YOU END UP WITH

An annotated HTML lesson, glossary.json and a term-coverage report

WHY THESE LANGUAGES
  • TypeScript Typed local transformations and portable browser interfaces run with Node standard libraries.
PROJECT OUTLINE

Glossary Hovercard Publisher in 4 stages

Explain unfamiliar terms inside the page people are reading.

  1. Validate terms, aliases and original definitions

    validateGlossary(value: unknown): Term[]

    starter · ~2 hours · TypeScript

    Validate terms, aliases and original definitions
  2. Match phrases inside eligible text nodes

    matchTerms(text: string, terms: Term[]): Match[]

    core · ~2 hours · TypeScript

    Match phrases inside eligible text nodes
  3. Render accessible definitions in context

    annotateLesson(html: string, terms: Term[]): {html: string; coverage: Coverage[]}

    core · ~2 hours · TypeScript

    Render accessible definitions in context
  4. Export the lesson and reusable glossary bundle

    publishGlossary(lesson: string, terms: Term[]): {html: string; glossary: Term[]; coverage: Coverage[]}

    stretch · ~2 hours · TypeScript

    Export the lesson and reusable glossary bundle

All projects · Course catalog · Source on GitHub