8 Commits

Author SHA1 Message Date
Bas van Rossem
642f1f70e8 feat: ship templates, crew fields, and read/edit dashboard
- Add crew_req, hardpoints, cargo fields (DB migration + server + types)
- Add 10 ship templates from Appendix A (Caravel, Galleon, Sloop, etc.)
- Enhanced CreateShipModal with template picker that auto-fills all stats
- Dashboard defaults to compact read-only view; Edit button toggles to
  editable steppers/dropdowns
- New CrewSection showing crew required, hardpoints, and cargo
- Two-column form layout in create modal for better use of space
- Fix .gitignore data/ pattern to only match root-level data directory

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 17:16:44 +01:00
Bas van Rossem
047d4e9776 docs: add comprehensive README with testing and deployment instructions
Includes development setup, Docker deployment, API reference, WebSocket events,
troubleshooting guide, and curl-based test script. Updates App plan.md with
implementation completion status.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 16:31:42 +01:00
Bas van Rossem
9ef1199324 chore: add Dockerfile and docker-compose with static file serving
Multi-stage Docker build (web → server → production). Fastify serves
React build in production with SPA fallback. Docker Compose with volume
for SQLite persistence.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 16:30:17 +01:00
Bas van Rossem
76ad839abb feat(server): add Socket.IO with ship rooms and real-time events
Implements ship:join/leave/update and weapon:create/update/delete socket events
with room-based broadcasting. Server validates and persists before broadcasting.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 16:19:20 +01:00
Bas van Rossem
525a1a4a95 feat(server): implement weapon REST endpoints with validation
Adds POST/PATCH/DELETE for weapons with ammo constraint validation,
status enum checks, and ship existence verification on create.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 16:18:21 +01:00
Bas van Rossem
5f179229d6 feat(server): implement ship REST endpoints with Zod validation
Adds GET/POST/PATCH/DELETE /api/ships with constraint validation (current <= max),
enum checks for maneuver_class, and cascade delete for weapons.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 16:17:16 +01:00
Bas van Rossem
4b4d105009 feat(server): add SQLite connection and migration system
Adds better-sqlite3 with WAL mode, auto-migration runner that tracks applied
migrations, and initial schema for ships and weapons tables with constraints.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 16:16:01 +01:00
Bas van Rossem
6d60d714d0 chore: initial project scaffold with Fastify server and Vite React app
Set up monorepo structure with server/ (Fastify + TypeScript) and web/ (React + Vite + TypeScript).
Includes package configs, dev proxy setup, and mobile-first CSS foundation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 16:14:30 +01:00