A typing game for kids built with Go and HTMX. A sentence appears on screen — type it correctly and a funny video clip plays as a reward.
- Go — HTTP server, sentence + clips API
- HTMX — frontend interactivity, no JS framework
- Static HTML/CSS frontend
Requirements: Go 1.18+
git clone https://github.com/nerryc/KidsTypingPractice.git
cd KidsTypingPractice
go run main.goOpen http://localhost:8080.
Open main.go and add strings to the sentences slice:
var sentences = []string{
"The cat sat on the mat.",
"Your new sentence here.",
// ...
}Drop .mp4 files into static/clips/. They are served automatically — no code changes needed. A random clip plays each time a sentence is typed correctly.
KidsTypingPractice/
├── main.go # HTTP server + /sentence and /clips API
├── go.mod
└── static/
├── index.html # Game UI
└── clips/ # Add .mp4 reward videos here
| Endpoint | Method | Description |
|---|---|---|
/sentence?index=N |
GET | Returns sentence at index N + next index |
/clips |
GET | Returns list of available .mp4 clip filenames |