Add game UI panels, keyboard shortcuts, docs narrative overhaul, and unified dev script

- Add MiniStarMap, NpcMarketPanel, ShipStatusPanel, useKeyboardShortcuts
- Add progress bars for approach/mining operations and cargo fill indicator
- Rewrite docs from spreadsheet-first to exploration-first open-world RPG
- Replace dev:db + dev:standalone with unified dev script (scripts/dev.sh)
- Add Vite chunk splitting for three.js and spacetimedb
- Fix displayName dependency in useSpacetimeConnection
- Remove stale usePlayerSession.ts
- Add AGENTS.md files across all packages
This commit is contained in:
2026-06-02 17:32:15 -04:00
parent be8967d5fe
commit 7c93b8a1ae
40 changed files with 2263 additions and 266 deletions

11
scripts/AGENTS.md Normal file
View File

@@ -0,0 +1,11 @@
# scripts/ — Dev Tooling
Shell scripts for development workflow automation.
## Files
| Script | Purpose |
|--------|---------|
| `dev.sh` | Full-stack dev startup: starts fresh SpacetimeDB instance, publishes module, generates bindings, launches game dev server |
Run via `pnpm dev` from the repo root. Uses an isolated ephemeral data directory (`.spacetime-dev/`) so it starts clean every time.

61
scripts/dev.sh Executable file
View File

@@ -0,0 +1,61 @@
#!/usr/bin/env bash
set -euo pipefail
STDB_DATA_DIR=".spacetime-dev"
STDB_HOST="http://127.0.0.1:3000"
STDB_DATABASE="void-nav-dev"
MAX_WAIT=30
PIDS=()
cleanup() {
echo ""
echo "Shutting down..."
for pid in "${PIDS[@]}"; do
kill "$pid" 2>/dev/null || true
done
wait 2>/dev/null
echo "Done."
exit 0
}
trap cleanup INT TERM
rm -rf "$STDB_DATA_DIR"
mkdir -p "$STDB_DATA_DIR"
echo "[dev] Starting SpacetimeDB (data: $STDB_DATA_DIR)..."
spacetime start --data-dir "$STDB_DATA_DIR" --in-memory &
PIDS+=($!)
echo "[dev] Waiting for SpacetimeDB at $STDB_HOST ..."
waited=0
until curl -sf "$STDB_HOST/v1/health" >/dev/null 2>&1; do
waited=$((waited + 1))
if [ "$waited" -ge "$MAX_WAIT" ]; then
echo "[dev] ERROR: SpacetimeDB did not start within ${MAX_WAIT}s"
cleanup
exit 1
fi
sleep 1
done
echo "[dev] SpacetimeDB is ready."
echo "[dev] Publishing module and generating bindings..."
spacetime dev --server local --delete-data -y --server-only &
PIDS+=($!)
sleep 3
echo "[dev] Starting game dev server on http://localhost:5175 ..."
pnpm --filter @void-nav/game dev --port 5175 &
PIDS+=($!)
echo ""
echo "=== VOID::NAV Dev Environment ==="
echo " SpacetimeDB: $STDB_HOST"
echo " Game: http://localhost:5175"
echo " Data dir: $STDB_DATA_DIR (ephemeral)"
echo " Press Ctrl+C to stop"
echo "=================================="
echo ""
wait