Replace better-sqlite3 with mysql2 and add dotenv-based config:
- backend/package.json: drop better-sqlite3/@types, add mysql2 + dotenv
- backend/src/db/mysql-schema.ts: idempotent CREATE TABLE / ALTER TABLE bootstrap
for all 15 tables on startup (no migrations needed)
- backend/src/db/index.ts: read DATABASE_URL, fall back to MYSQL_HOST/PORT/USER/
PASSWORD/DATABASE; pool-based connection with max_idle/max_open from yaml
- configs/config.example.yaml: document mysql block + STORAGE_PATH override
- docker-compose.yml: bump MySQL service defaults
- backend/.env.example: template for local MySQL credentials
Docs:
- CLAUDE.md / README.md: describe Nuxt 3 + MySQL stack, drop stale SQLite
and better-sqlite3 references
Tests:
- backend/tests/mysql-database-structure.test.mjs: structural assertion for
schema bootstrap
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>