r/Frontend • • 5d ago

Analytics dashboard for visualizing typing-game-cli round

5 Upvotes

5 comments sorted by

2

u/dusanodalovic 5d ago

recharts and d3 in the same app, is d3 only for the custom stuff? for a typing game i'd want a per-key mistakes view next to wpm over time, since that shows what to actually practice. do you store each keystroke or only the round totals? the per-key view needs the keystrokes.

1

u/GlesCorpint 4d ago

Yep, D3 is used for the "Typing speed progress" chart (the first screenshot). "Round proximity to target" doesn't use either - it's just custom SVG. The rest are built with Recharts.

Right now, typing-game-cli only logs correct keystrokes - if you hit the wrong key, the input is simply rejected and the UI highlights the mistake instead of recording it. Tracking every keystroke (including typos) would definitely be a great addition - I might add that later, or even build a web version with the same "race against a bot" mechanic as the CLI, plus a few extra features.

1

u/GlesCorpint 5d ago edited 5d ago

Github repo: https://github.com/akgondber/typing-game-stats
typing-game-cli - the app these stats are built for: https://github.com/akgondber/typing-game-cli
Tech Stack: React, antd, Recharts, d3.js

1

u/Colby-Jenkins 5d ago

Using Recharts and d3.js together could give some powerful visual options for the dashboard stats.

1

u/GlesCorpint 4d ago

Recharts is great for getting standard charts up and running quickly, but once you need heavy customization, you start hitting a wall with its component-based abstractions. Because everything is wrapped in rigid React components, doing things like custom SVG layouts, complex animations, or fine-grained DOM interactions becomes really restrictive. At that point, dropping down to raw D3.js (using it for the math/scales and letting React handle the SVG rendering) gives you way more control without fighting the library.