TypingFlow AI is a dual-platform analytical suite (Chrome Extension + VS Code Extension) that goes far beyond standard WPM trackers. It uses Big Data Analytics and Machine Learning to understand how you type not just how fast.
Most typing trackers treat every pause the same. TypingFlow AI doesn't. Its core AI engine distinguishes between a "productive thinking pause" (you're mentally composing your next sentence or debugging a function) and genuine idle time so your performance stats are always accurate and meaningful.
Standard typing trackers fail in two key ways:
- Skewed averages β A hard-coded 3-second idle reset penalises deep thinkers and complex coders unfairly
- No context awareness β Typing speed while coding Python is very different from typing in a WhatsApp chat, yet most tools treat them identically
TypingFlow AI solves both problems with ML and Big Data.
- A Random Forest model trained on 200,000 labelled sessions predicts whether a pause is productive thinking or genuine idle time
- Contextual awareness β longer pauses are allowed in VS Code coding sessions than in chat windows
- Real-time prediction via REST API with confidence scores
- Individual sessions benchmarked against a 1.1 million+ session data lake
- Real-time percentile ranking: "Your Python coding speed is in the top 5% globally!"
- K-Means Clustering assigns every user one of 5 Typing Archetypes
| Archetype | Description |
|---|---|
| β‘ The Rapid Streamer | High WPM, high consistency, born for flow |
| ποΈ The Deliberate Architect | Slow, precise, virtually error-free |
| π₯ The Bursty Coder | Explosive bursts followed by deep thinking pauses |
| π The Steady Workhorse | Reliable, consistent, always getting the job done |
| π The Sprinter | Blazing fast with corrections to match |
- Consistency Score β standard deviation of keystroke intervals
- Burst WPM β peak speed during flow state periods
- Error Recovery Rate β backspace ratio vs WPM
- Hourly Trends β when do you type fastest during the day?
TypingFlow/
βββ data/
β βββ generate_dataset.py # Generates 1.1M synthetic sessions
β βββ typing_sessions.parquet # Compressed dataset (~60MB)
βββ analytics/
β βββ duckdb_benchmarks.py # DuckDB SQL analytics + K-Means
β βββ benchmarks/ # 5 JSON benchmark files
β βββ global_benchmarks.json
β βββ hourly_trends.json
β βββ top_performer_thresholds.json
β βββ archetype_profiles.json
β βββ user_archetypes.json
βββ models/
β βββ thinking_pause_model.py # Random Forest trainer
β βββ thinking_pause_model.pkl # Trained model
β βββ platform_encoder.pkl # Label encoders
β βββ model_metrics.json # Accuracy + feature importance
βββ backend/
β βββ main.py # FastAPI server (7 endpoints)
βββ extensions/
βββ chrome/ # Chrome Extension
β βββ manifest.json
β βββ content.js # Keystroke listener
β βββ background.js
β βββ popup.html # Speedometer UI
β βββ popup.js
β βββ dashboard.html # Full analytics dashboard
β βββ dashboard.js
β βββ icons/
βββ vscode/ # VS Code Extension
βββ typingflow-ai/
βββ src/
β βββ extension.ts # Main tracking logic
βββ package.json
| Layer | Technology | Purpose |
|---|---|---|
| Data Generation | Python, NumPy, Faker | 1.1M synthetic sessions |
| Big Data Analytics | DuckDB, Pandas | Percentiles, trends, benchmarks |
| Machine Learning | Scikit-learn (Random Forest, K-Means) | Pause detection + archetypes |
| Backend API | FastAPI, Uvicorn | REST endpoints |
| Chrome Extension | JavaScript, Chrome APIs | Web typing tracker |
| VS Code Extension | TypeScript, VS Code API | Code editor tracker |
| Dashboard UI | HTML, CSS, Chart.js | Analytics visualisation |
| Storage | Parquet, JSON | Efficient data storage |
- Python 3.10+
- Node.js 18+
- Google Chrome
git clone https://github.com/zujajahbatool/TypingFlow.git
cd TypingFlowpip install pandas numpy scikit-learn faker duckdb fastapi uvicornpython data/generate_dataset.pyThis generates 1.1M typing sessions (~60MB parquet file) in ~30 seconds.
python analytics/duckdb_benchmarks.pyComputes global benchmarks and K-Means archetypes. Saves 5 JSON files.
python models/thinking_pause_model.pyTrains the Random Forest model. Saves .pkl files.
uvicorn backend.main:app --reload --port 8000API available at http://127.0.0.1:8000
Interactive docs at http://127.0.0.1:8000/docs
- Open Chrome β
chrome://extensions - Enable Developer Mode
- Click Load unpacked β select
extensions/chrome/ - Click the TypingFlow AI icon in your toolbar
cd extensions/vscode/typingflow-ai
npm install
npm run compilePress F5 in VS Code to launch the Extension Development Host.
| Method | Endpoint | Description |
|---|---|---|
GET |
/health |
Server health check |
POST |
/predict/pause |
AI thinking-pause prediction |
GET |
/benchmarks/global |
Global WPM benchmarks |
POST |
/benchmarks/rank |
User percentile ranking |
GET |
/benchmarks/hourly |
Hourly typing trends |
GET |
/user/archetype/{id} |
User typing archetype |
POST |
/session/save |
Save a typing session |
| Token | Color | Usage |
|---|---|---|
| Background | #0A0A0A |
App background |
| Cards | #1C1C1E |
UI cards |
| Accent 1 | #00F5FF |
WPM, active tracking |
| Accent 2 | #BF40BF |
Flow state, archetypes |
| Gold | #FFD700 |
Thinking pause indicator |
| Text | #F5F5F5 |
Body text |
| Metric | Value |
|---|---|
| Model | Random Forest (100 estimators) |
| Training samples | 160,000 |
| Test accuracy | 100% (rule-based labels) |
| Top feature | WPM (0.506 importance) |
| Classes | thinking_pause, idle |
No actual text is ever recorded. TypingFlow AI only tracks:
- Keystroke timestamps
- Character counts
- Word boundary counts (spaces/enters)
Your actual words, sentences, and content are never captured, stored, or transmitted.
| File | What it does |
|---|---|
data/generate_dataset.py |
Generates 1.1M synthetic typing sessions |
analytics/duckdb_benchmarks.py |
SQL analytics + K-Means clustering |
models/thinking_pause_model.py |
Trains AI pause detection model |
backend/main.py |
FastAPI REST API server |
extensions/chrome/content.js |
Live keystroke tracking on web pages |
extensions/chrome/popup.js |
Speedometer popup logic |
extensions/chrome/dashboard.js |
Full dashboard analytics |
extensions/vscode/typingflow-ai/src/extension.ts |
VS Code tracking + stats panel |
Built with:
MIT License β feel free to use, modify, and distribute.
Made with β¨οΈ and lots of thinking pauses