TypeFlow is a modern, privacy-focused typing speed trainer built with React. It tracks your progress locally using IndexedDB, helps you identify weak keys, and offers structured lessons to improve your touch typing.
- Practice Mode: Type against difficulty-based text sets (Basic, Intermediate, Advanced)
- Structured Lessons: Progressive lessons starting from home row basics to full keyboard mastery
- Custom Text Support: Paste your own text (articles, code, etc.) to practice specific content
- Sudden Death Mode: One mistake ends the game - perfect for accuracy training
- Real-time Metrics: Live WPM and accuracy tracking
- Persistent History: All data stored permanently in IndexedDB
- Daily Streaks: Track your consistency with streak counters
- Per-Lesson Progress: Attempts, best WPM, and average accuracy for each lesson
- Key-Level Analytics: Visual breakdown showing accuracy for every key
- Smart Key Drills: Automatically identifies your weakest keys and generates custom practice
- Ghost Replay: Race against your personal best performance
- Progress Tracking: Day-to-day progress with local timezone support
- Reset Functionality: Clear all stats to start fresh anytime
All data is stored locally in your browser using IndexedDB. No signup required, no data sent to servers, complete privacy.
- Framework: React 18
- Build Tool: Vite
- Styling: CSS Modules with glassmorphism aesthetic
- State Management: React Hooks (useState, useEffect, useCallback)
- Storage: IndexedDB for permanent local storage
- Date Handling: Local timezone support with proper date grouping
- Node.js (v20.19.0 or higher)
- npm (v10.0.0 or higher)
-
Clone the repository:
git clone https://github.com/erdcpatel/type-flow.git cd type-flow -
Install dependencies:
npm install
-
Start the development server:
npm run dev
-
Open your browser: Navigate to
http://localhost:5173
npm run buildThe production-ready files will be in the dist/ directory.
TypeFlow uses Vitest for testing with jsdom environment and fake-indexeddb for IndexedDB polyfills.
# Run tests in watch mode
npm run test
# Run tests once (CI mode)
npm run test:ci
# Run linter
npm run lintTests use fake-indexeddb for IndexedDB polyfills. Setup file: src/test/setupTests.cjs
TypeFlow works on all modern browsers:
- โ Chrome 90+ (recommended)
- โ Firefox 88+
- โ Safari 14+
- โ Edge 90+
Requirements:
- ES6+ JavaScript support
- IndexedDB support
- CSS Grid and Flexbox
npm run deployThis builds and deploys to GitHub Pages using gh-pages.
Vercel:
- Connect your GitHub repository
- Vercel will auto-detect Vite and deploy
Netlify:
- Drag and drop the
dist/folder, or - Connect repository with build command:
npm run build
Cloudflare Pages:
- Connect repository
- Build command:
npm run build - Output directory:
dist
Build Configuration:
- Build command:
npm run build - Output directory:
dist - Node version: 20.19.0+
TypeFlow requires no environment variables. The application is 100% client-side with no server dependencies or API keys needed.
type-flow/
โโโ src/
โ โโโ components/ # React components
โ โ โโโ TypingArea.jsx # Main typing interface
โ โ โโโ StatsModal.jsx # Statistics and analytics
โ โ โโโ ResultCard.jsx # Test completion results
โ โ โโโ LessonSelector.jsx
โ โโโ hooks/ # Custom React hooks
โ โ โโโ useTypingGame.js # Core typing game logic
โ โโโ utils/ # Utility functions
โ โ โโโ db.js # IndexedDB wrapper
โ โ โโโ storage.js # Storage operations
โ โ โโโ generator.js # Text generation
โ โ โโโ lessons.js # Lesson definitions
โ โ โโโ texts.js # Practice texts
โ โโโ App.jsx # Main application
โ โโโ main.jsx # Entry point
โโโ public/ # Static assets
โโโ docs/ # Additional documentation
โโโ package.json
TypeFlow uses IndexedDB for permanent local storage:
- Database:
TypeFlowDB - Object Stores:
history- All typing test results with timestampsreplays- Best performance replays for ghost mode
- Data survives browser restarts and cache cleanup
- Automatic migration from old localStorage data
- Local timezone support for accurate date tracking
- Reset functionality available in stats modal
- Choose a Mode: Practice, Lesson, or Custom
- Start Typing: Click the input area and begin
- View Stats: Click "view detailed stats" to see your progress
- Track Progress: Check your daily streak and improvement over time
- Practice Weak Keys: Use the smart drill feature to target problem areas
We welcome contributions! Please see our CONTRIBUTING.md for details on:
- Code style guidelines
- Development workflow
- How to submit pull requests
- Project architecture
- ARCHITECTURE.md - System design and architecture
- AI_AGENT_GUIDE.md - Guide for AI agents working on this project
- CONTRIBUTING.md - Contribution guidelines
- Ensure your browser supports IndexedDB
- Check browser console for errors
- Try resetting stats and starting fresh
- Clear browser cache
- Disable browser extensions
- Check for console errors
This project is licensed under the MIT License - see the LICENSE file for details.
Built with modern web technologies and best practices for an optimal typing training experience.