Collection of music practice utilities built with vanilla JavaScript and Flask.
Track tempo progression on jazz standards using a weighted selection algorithm to choose practice songs based on your progress.
Generate random musical scales using a 2d6 dice algorithm. Each scale is created by rolling two dice and taking the minimum value to determine interval steps. Scales are automatically generated every 2 minutes and displayed in musical notation.
Draw random creative strategy cards. Cards can be added to the database for future draws.
- Frontend: Vanilla JavaScript (ES Modules), HTML5, CSS3
- Backend: Flask (Python)
- Database: MySQL
- Deployment: DreamHost shared hosting
- Python 3.8+
- uv package manager
- MySQL
-
Install dependencies:
uv sync
-
Configure database:
cp .env.example .env # Edit .env with your database credentials -
Create database and load schema:
mysql -u your_user -p your_database < schema.sql -
Run development server:
uv run flask --app app run --debug
-
Open browser:
http://localhost:5000
- SSH access to DreamHost
- Python 3.8+ installed
- uv working
- MySQL database
-
SSH into your DreamHost server:
-
Clone or pull repository:
cd ~/ git clone <your-repo-url> practice-tools cd practice-tools
-
Install dependencies with uv:
uv sync
-
Configure environment:
cp .env.example .env nano .env
Edit with your DreamHost MySQL credentials:
DB_HOST=mysql.yourdomain.com DB_USER=your_db_user DB_PASSWORD=your_db_password DB_NAME=your_db_name -
Load database schema:
mysql -h mysql.yourdomain.com -u your_db_user -p your_db_name < schema.sql -
Configure Apache:
In your DreamHost panel:
- Go to Websites → Manage Websites
- Manage your website → Settings → Directories → Modify
- Set "Web directory" to:
/home/username/practice-tools, Save Changes
-
Test deployment: Visit your domain in a browser.
cd ~/practice-tools
git pull
uv sync # Update dependencies if changedGET /api/speed-standards/repertoire- Get all songsPATCH /api/speed-standards/song/<id>- Update song progressPOST /api/speed-standards/song- Add new song
GET /api/strategy-cards/random- Get a random strategy cardPOST /api/strategy-cards/card- Add new strategy card
- Create backend module:
app/new_tool/ - Create frontend:
public/new-tool/ - Register blueprint in
app/__init__.py - Add database tables to
schema.sql - Link from main
public/index.html
MIT