M1: shared turn logic + characterization tests (39 green)

- npm workspaces: shared/, server/
- shared/turn.js: port turn logic verbatim from App.js (bugs preserved)
- 39 characterization tests lock current behavior
- gitignore: sqlite data, logs
This commit is contained in:
david raistrick
2026-06-28 16:57:43 -04:00
parent d679c9d1e9
commit e06adaa081
9 changed files with 5205 additions and 19 deletions
+24
View File
@@ -0,0 +1,24 @@
{
"name": "@ttrpg/server",
"version": "0.1.0",
"private": true,
"description": "Self-hosted backend: Express + ws + better-sqlite3. Server-authoritative turn logic.",
"main": "index.js",
"scripts": {
"dev": "node --watch index.js",
"start": "node index.js",
"test": "jest"
},
"dependencies": {
"@ttrpg/shared": "*",
"better-sqlite3": "^11.3.0",
"cors": "^2.8.5",
"express": "^4.19.2",
"nanoid": "^5.0.7",
"ws": "^8.18.0"
},
"devDependencies": {
"jest": "^29.7.0",
"supertest": "^7.0.0"
}
}