How slmn-sh/typing-test works
Project type and purpose
• This is a single‐page application (SPA) built with React and TypeScript.
• It recreates a typing speed test (akin to Monkeytype) with configurable timers, themes, and word/sentence lists.
• It is purely client‐side, bundled via Create React App, tested locally, and deployed as static assets (e.g., GitHub Pages).
File structure
• Top‑level build & config:
• package.json, tsconfig.json, .prettierrc, .commitlintrc, Husky hooks, GitHub Actions workflow
• public/: static host files (index.html, manifest.json, robots.txt)
• src/: application source
• index.tsx, App.tsx – app entry point & root component
• components/ – all UI pieces (Header, Footer, CommandPallet, Result, Test)
• store/ – Flux pattern (store.ts, actions.ts, reducer.ts)
• helpers/ – pure functions for timer, test control, recording/reset
• stylesheets/ – SCSS modules and theme definitions
• wordlists/ – JSON arrays of words and sentences
• setupTests.ts – test harness
README for additional insights
• Describes run/build commands (npm start, npm run build)
• Explains how new themes (via SCSS variables) and wordlists (JSON files) plug into the Header component’s options.
• CI badge indicates use of GitHub Actions for linting/tests.
Don’t overcomplicate—break the system into these essential modules
• Entry & Bootstrapping (index.tsx → App.tsx)
• UI Layer (components/)
• Logic Layer (helpers/)
• State Layer (store/)
• Data Layer (wordlists/, themes.scss)
• Tooling (build & CI)
• Hosting