Skip to content

Robin239105/RootWord

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

21 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Rootword ✢ Every Word Has Ancestors

Astro React D3.js Tailwind CSS v4 License: MIT

Rootword is an enterprise-grade, high-fidelity visual etymology explorer that lets users trace English words back to their ancient pre-historic roots (like Proto-Indo-European, Proto-Germanic, Latin, and Ancient Greek). Built with Astro, React, D3.js (v7), and Tailwind CSS v4, the application couples robust linguistic algorithms with a stunning, high-contrast "Dark Parchment & Amber Gold" theme and responsive ambient physics.


πŸ› Visual Theme & Aesthetics

Rootword features a hand-crafted, vintage manuscript-inspired visual system that feels responsive and alive:

  • Color Palette: An elegant combination of near-black warm velvet (#0E0D0A), dark parchment card interfaces (#1A1810), aged paper tone secondary text (#9E9070), and glowing amber-gold accents (#C4973A).
  • Typography: The classical serif beauty of Lora paired with the clean readability of JetBrains Mono for historical metadata and linguistic tags.
  • Background Gold Dust Particles: Ambient, hardware-accelerated .gold-ember particles float slowly up the screen in an optimized infinite loop, giving the application a premium, magical manuscript aesthetic.

🎨 Interactive Exploration Modes

When searching for a word, the explorer provides three highly detailed visual layouts managed by an instant, zero-reload React menu bar:

View Mode What It Renders Key Technologies
Tree View An elegant, interactive hierarchical tree canvas showing ancestral derivations. Highlighting children on hover, displaying physical attestation states, and supporting an instant SVG export tool. D3.js Hierarchy, React SVG Islands
Timeline View A linearized, vertical chronological scroll highlighting the direct descent path. Details century/era indicators, part-of-speech, and literal text translation glosses. CSS Timeline, Lora Serif
World Map View A beautiful vintage vector map outlining coordinates and drawing glowing bezier migration curves across historical provinces (Gallia, Britannia, Italia, Hellas, Steppe). Click nodes to inspect glowing pulses and view popover cards. SVG vector maps, Bezier paths, React overlays

βš™ System Architecture & Data Pipeline

Rootword employs a highly resilient Hybrid Resolution Network to fetch and construct etymological branches:

                       [ SEARCH QUERY ]
                              β”‚
                              β–Ό
                Does local seed JSON exist?
               /                           \
            (Yes)                          (No)
            /                                 \
           β–Ό                                   β–Ό
 [Load High-Fidelity Seed]            [Query Wiktionary APIs]
(26+ hand-curated databases)                     β”‚
                                                 β–Ό
                                     REST Definition API
                                  (Extract glosses/POS)
                                                 β”‚
                                                 β–Ό
                                     MediaWiki Action API
                                   (Fetch article source)
                                                 β”‚
                                                 β–Ό
                              Progressive Chronological-Narrative Parser
                              (Scan ISO lang tags, sort chronologically,
                               build multi-generation fallback tree)
                                                 β”‚
                                                 β–Ό
                                        [ Render Canvas ]

Curated Seed Database

We maintain 26 hand-curated etymology seeds located in src/data/seeds/. These seeds represent deep, historically verified lineages (some stretching over 7 generations) that are programmatically validated against strict TypeScript types.


πŸ“ Repository Directory Tour

Inside the Rootword codebase, files are logically organized for modularity and contribution:

/
β”œβ”€β”€ public/                 # Static public assets
β”œβ”€β”€ scripts/
β”‚   └── validate-seeds.js   # Programmatic seed JSON validator script
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/         # Interactive UI islands (React + Astro)
β”‚   β”‚   β”œβ”€β”€ EtymologyTree.tsx  # Core D3 visualization (Tree/Timeline/Map)
β”‚   β”‚   β”œβ”€β”€ Nav.astro          # Sticky navbar and statistics pill
β”‚   β”‚   β”œβ”€β”€ SearchBar.tsx      # Gilded input console with autocompletion
β”‚   β”‚   β”œβ”€β”€ WordPanel.tsx      # Detail panel showing cognates and glosses
β”‚   β”‚   └── NodeTooltip.tsx    # Node inspect card with recursive navigation
β”‚   β”œβ”€β”€ data/
β”‚   β”‚   └── seeds/          # Hand-curated seed JSON documents
β”‚   β”œβ”€β”€ lib/
β”‚   β”‚   β”œβ”€β”€ etymology.ts    # Hybrid API resolver and progressive HTML parser
β”‚   β”‚   └── languages.ts    # Color tokens and metadata for Language Families
β”‚   β”œβ”€β”€ pages/              # Astro routing controllers
β”‚   β”‚   β”œβ”€β”€ explore/[word].astro  # Dynamic explorer workspace (SSR)
β”‚   β”‚   β”œβ”€β”€ languages/index.astro # Language family catalog index
β”‚   β”‚   └── index.astro           # Ambient landing page with gold dust particles
β”‚   β”œβ”€β”€ styles/
β”‚   β”‚   └── global.css      # Core medieval parchment CSS rules
β”‚   └── types/
β”‚       └── etymology.ts    # Strict type definitions for nodes and seeds
β”œβ”€β”€ .prettierrc             # Standard code formatting rules
β”œβ”€β”€ astro.config.mjs        # Astro project bundler configuration
β”œβ”€β”€ package.json            # Dependencies, engines, and run scripts
└── tsconfig.json           # Astro-strict TypeScript configurations

🧞 Developer Commands

All commands are run from the project root. Make sure you use a Node.js version satisfying our engines requirement (>=22.12.0).

1. Project Scaffolding & Setup

Installs the required modules (React engine, D3 renderer, Tailwind CSS processing, Prettier plugins, and TypeScript check support):

npm install

2. Local Development Server

Starts the local development workspace with hot-reloading active at http://localhost:4321/:

npm run dev

3. Production Compilation & Packaging

Compiles the static assets and builds the server-side entrypoint into ./dist/ for production deployment:

npm run build

4. Local Build Preview

Launches a server to preview the production-compiled bundler files locally before pushing:

npm run preview

5. Programmatic Seed Validation

Scans and validates all curated JSON documents in src/data/seeds/ against schema types, checking for duplicate IDs and broken parent-child paths:

npm run validate:seeds

6. Automated Code Formatting

Rootword uses Prettier along with Prettier Plugin Astro to maintain a clean, standardized codebase.

To run a dry-run style compliance check:

npm run format:check

To automatically format all pages, components, types, and stylesheets:

npm run format

🀝 How to Contribute

We welcome contributions from etymologists, developers, and designers alike!

Adding Curated Seed Words

  1. Read the detailed guide in our CONTRIBUTING.md portal.
  2. Copy our base template seed:
    cp src/data/seeds/_template.json src/data/seeds/yourword.json
  3. Fill out the etymological tree structure matching historical records.
  4. Run programmatic validation (npm run validate:seeds) and style formatting (npm run format).
  5. Submit a Pull Request labeled feat(word): add etymology for yourword.

Academic & Reference Sources

When correcting or adding data nodes, we prioritize references matching trusted lexicographical resources:


πŸ“„ License

This project is open-source software licensed under the MIT License.

About

Rootword is an enterprise-grade, high-fidelity visual etymology explorer that lets users trace English words back to their ancient pre-historic roots (like Proto-Indo-European, Proto-Germanic, Latin, and Ancient Greek).

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors