A web-based speedcubing training analysis tool with WCA rankings integration. Track personal progress, analyze statistics, and compare performance against worldwide competitors.
- Session Management: Track training sessions with solve-by-solve data
- Multi-Event Support: 3x3, 2x2, 4x4, and all official WCA events
- Cube Inventory: Manage and track performance by specific cubes
- Statistics Dashboard: Real-time PB, averages, Ao5/Ao12, session counts
- WCA Integration: Percentile rankings and estimated world rank via REST API
- Progress tracking over time with Plotly charts
- Solve time distribution analysis
- Rolling averages (Ao5, Ao12)
- Session consistency comparisons
- Interactive charts with zoom/pan
- CSTimer JSON/TXT import with session selection
- Preserve scrambles and penalties
- Batch import with preview
- Dark/light mode with persistent preference
- Sortable tables (sessions, solves)
- Responsive design
- Session filtering by event
- Clickable stats with detail modals
Backend:
- Python 3.13 | Flask | SQLite | Pandas
- WCA REST API client
Frontend:
- Vanilla JavaScript (ES6+) | Plotly.js | CSS3
- No framework dependencies
# Clone repository
git clone https://github.com/havl-code/speedcube-training-explorer.git
cd speedcube-training-explorer
# Create virtual environment
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Initialize database
python src/python/db_manager.pypython website_server.py
# Navigate to http://localhost:5000Or via main menu:
python main.py # Select option 1python main.py # Select option 2 for CLI menu
# Or direct commands:
python src/python/import_cstimer.py data/raw/your_file.txt
python src/python/training_logger.py --interactive
python src/python/my_progress.pyspeedcube-training-explorer/
βββ src/
β βββ python/ # Backend logic
β β βββ training_logger.py
β β βββ import_cstimer.py
β β βββ wca_api_client.py
β β βββ cube_manager.py
β β βββ analyzer.py
β βββ web/
β βββ api/ # Flask routes (Blueprints)
β β βββ routes/
β β β βββ stats.py
β β β βββ sessions.py
β β β βββ cubes.py
β β β βββ charts.py
β β β βββ imports.py
β β βββ __init__.py
β βββ css/
β βββ js/
β βββ index.html
βββ data/
β βββ speedcube.db # SQLite database
β βββ raw/ # Import files
βββ website_server.py # Flask entry point
βββ requirements.txt
Tables:
training_sessions: Session metadata, aggregated statspersonal_solves: Individual solve records with timestampscubes: Cube inventory with purchase dates
Key Implementation:
- Times stored in milliseconds (ms)
- DNF stored as
time_ms = 0,dnf = 1 - Ao5/Ao12 calculated per WCA rules (remove best/worst)
GET /api/stats # Dashboard statistics
GET /api/pb-details # Personal best details
GET /api/sessions # All sessions
POST /api/sessions/add # Create session
GET /api/sessions/<id>/solves # Session solves
POST /api/sessions/<id>/solves/add # Add solve
GET /api/cubes # Cube inventory
GET /api/charts/* # Chart data
POST /api/import/preview # Preview import
POST /api/import/selected # Import sessions
- DNF Handling: DNF excluded from averages, not converted to numbers
- Ao5: Remove best/worst, average middle 3 (DNF if <3 valid)
- Ao12: Remove best/worst, average middle 10 (DNF if <10 valid)
- Session Mean: Average of all valid (non-DNF) solves
- Create route file in
src/web/api/routes/ - Define Blueprint with endpoints
- Import in
src/web/api/routes/__init__.py - Register in
src/web/api/__init__.py
python src/python/wca_api_client.py # Test WCA API
python src/python/db_manager.py # Verify database- WCA Rankings: robiningelbrecht/wca-rest-api
- Static JSON files updated regularly
- Percentile estimates based on top 1000 + statistical modeling
MIT License
- WCA REST API by Robin Ingelbrecht
- CSTimer for export format compatibility
- WCA for official competition data
Viet Ha Ly
- GitHub: @havl-code
- Email: havl21@outlook.com
- Project: speedcube-training-explorer