How jharlan-hash/gospell works
GoSpell is a terminal spelling-practice app. The main workflow selects a word, presents its cached definition, speaks it, checks the submitted spelling, updates the streak, and selects another word; the TUI also reports WPM and supports definition navigation and audio replay. The graph separates interaction, word selection, definition lookup, and speech/audio. Source excerpts show the main orchestration and these runtime calls; other links are omitted where evidence is unavailable.
Main entry points: gospell.go Practice session · tts.go Speech synthesis · api.go Random word picker · definitions.go Definition navigation
Components 12
Practice interface
- Practice session
gospell.go
Word selection
- Word list
internal/api/wordlist.txt - Random word picker
internal/api/api.go
Definitions
- Definition navigation
internal/definition/definitions.go - Cache loader
internal/definition/cache.go - Dictionary entries
internal/definition/types.go - Embedded word map
internal/definition/wordmap.gob
Speech and audio
- Speech synthesis
internal/tts/tts.go - Google Cloud TTS
- Audio playback
Progress metrics
- WPM calculation
internal/wpm/wpm.go
Other components
- Learner
Connections 10
- Learner → Practice session: enters spelling
README.md - Practice session → Random word picker: selects word
gospell.go - Random word picker → Word list: chooses from
internal/api/api.go - Practice session → Definition navigation: looks up definition
gospell.go - Definition navigation → Cache loader: loads cache
internal/definition/definitions.go - Cache loader → Embedded word map: decodes embedded data
internal/definition/cache.go - Practice session → Speech synthesis: requests speech
gospell.go - Speech synthesis → Google Cloud TTS: synthesizes speech
internal/tts/tts.go - Speech synthesis → Audio playback: plays audio
internal/tts/tts.go - Practice session → WPM calculation: calculates WPM
gospell.go