Stage 3-5 server (military, expansion, social), web client for stages 1-2, ops/deploy

Built: units/research/training, movements (scan, raid, attack, takeover, reinforce, settle, transport), deterministic
combat resolved in the event queue, reports, power/offline units, founding + conquest + incumbent sites; alliances,
roles, diplomacy (24h pact cancel via events), messages, rankings; vanilla-JS phone-first client (auth, POP, map,
alerts, settings, en/nb); systemd units, backup timer, DEPLOY.md, tools/admin.js.
Tested: npm test 96/96 (fake clock, in-memory db, a few real-HTTP tests); client checked with headless Chromium
screenshots only. NOT done: marketplace/transport trade, client screens for military/social, WebSocket push,
bots/balance, e2e suite. All unit stats and costs are unbalanced first guesses.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q2MJaQ5LXAHzGnTDgceT14
This commit is contained in:
jvanvik 2026-10-11 18:32:36 +02:00
parent b56b13880e
commit 249818a7aa
111 changed files with 17472 additions and 13 deletions

BIN
public/icons/icon-192.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

BIN
public/icons/icon-512.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

17
public/icons/icon.svg Normal file
View file

@ -0,0 +1,17 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
<defs>
<radialGradient id="g" cx="30%" cy="18%" r="95%"><stop offset="0" stop-color="#16315c"/><stop offset="1" stop-color="#070b16"/></radialGradient>
</defs>
<rect width="512" height="512" rx="112" fill="url(#g)"/>
<rect x="20" y="20" width="472" height="472" rx="94" fill="none" stroke="#4de3ff" stroke-opacity=".35" stroke-width="6"/>
<!-- region links to the core POP -->
<path d="M120 410L256 290M392 410L256 290M150 170L256 290M362 170L256 290" fill="none" stroke="#4de3ff" stroke-width="10" stroke-linecap="round" stroke-opacity=".7"/>
<g fill="#0d2038" stroke="#5aa9ff" stroke-width="9">
<circle cx="120" cy="410" r="26"/><circle cx="392" cy="410" r="26"/><circle cx="150" cy="170" r="26"/><circle cx="362" cy="170" r="26"/>
</g>
<!-- the core POP: a hexagon -->
<path d="M256 220l54 31v62l-54 31-54-31v-62z" fill="#0d2a44" stroke="#4de3ff" stroke-width="12" stroke-linejoin="round"/>
<circle cx="256" cy="282" r="17" fill="#35e0a1"/>
<!-- upstream arrow -->
<path d="M256 140V70M226 98l30-30 30 30" fill="none" stroke="#ffd24d" stroke-width="13" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

49
public/icons/sprite.svg Normal file
View file

@ -0,0 +1,49 @@
<svg xmlns="http://www.w3.org/2000/svg" width="0" height="0">
<!-- UPSTREAM icon sprite. 24x24, stroke/fill currentColor. Referenced as <use href="icons/sprite.svg#i-name">. -->
<defs>
<!-- navigation / ui -->
<symbol id="i-pop" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" d="M12 3.5l7.5 4.3v8.4L12 20.5l-7.5-4.3V7.8z"/><circle fill="currentColor" cx="12" cy="12" r="2.6"/><path fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" d="M12 3.5v6M12 14.5v6M4.5 7.8l5.2 3M14.3 13.2l5.2 3M19.5 7.8l-5.2 3M9.7 13.2l-5.2 3" opacity=".55"/></symbol>
<symbol id="i-map" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" d="M3.5 6l5.5-2 6 2 5.5-2v14l-5.5 2-6-2-5.5 2z"/><path fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" d="M9 4v14M15 6v14"/></symbol>
<symbol id="i-bell" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" d="M6 17V11a6 6 0 0112 0v6l1.6 1.8H4.4z"/><path fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" d="M10 20.5a2.2 2.2 0 004 0"/></symbol>
<symbol id="i-gear" viewBox="0 0 24 24"><circle fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" cx="12" cy="12" r="3"/><path fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" d="M12 3.2l1.6 2.3 2.7-.7.9 2.7 2.7.9-.7 2.7 2.3 1.6-2.3 1.6.7 2.7-2.7.9-.9 2.7-2.7-.7L12 20.8l-1.6-2.3-2.7.7-.9-2.7-2.7-.9.7-2.7L2.5 12l2.3-1.6-.7-2.7 2.7-.9.9-2.7 2.7.7z"/></symbol>
<symbol id="i-x" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M6 6l12 12M18 6L6 18" stroke-width="2.4"/></symbol>
<symbol id="i-check" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M5 12.5l4.5 4.5L19 7.5" stroke-width="2.6"/></symbol>
<symbol id="i-plus" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M12 5v14M5 12h14" stroke-width="2.4"/></symbol>
<symbol id="i-minus" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M5 12h14" stroke-width="2.4"/></symbol>
<symbol id="i-locate" viewBox="0 0 24 24"><circle fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" cx="12" cy="12" r="6.5"/><circle fill="currentColor" cx="12" cy="12" r="2.2"/><path fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" d="M12 2.5v3.5M12 18v3.5M2.5 12H6M18 12h3.5"/></symbol>
<symbol id="i-logout" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" d="M10 4.5H5.5v15H10M14 8l4 4-4 4M18 12H9.5"/></symbol>
<symbol id="i-shield" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" d="M12 3l7 3v5.5c0 4.6-3 7.6-7 9.5-4-1.9-7-4.9-7-9.5V6z"/></symbol>
<symbol id="i-clock" viewBox="0 0 24 24"><circle fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" cx="12" cy="12" r="8.5"/><path fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" d="M12 7v5.2l3.4 2"/></symbol>
<symbol id="i-pencil" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" d="M4.5 19.5l1-4.2L16 4.8a1.8 1.8 0 012.6 0l.6.6a1.8 1.8 0 010 2.6L8.7 18.5z"/><path fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" d="M14.5 6.5l3 3"/></symbol>
<symbol id="i-alert" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" d="M12 4l9 16H3z"/><path fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" d="M12 10v4.5M12 17.4v.1"/></symbol>
<symbol id="i-lock" viewBox="0 0 24 24"><rect fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" x="5.5" y="11" width="13" height="9" rx="2"/><path fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" d="M8.5 11V8a3.5 3.5 0 017 0v3"/></symbol>
<symbol id="i-up" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M12 19V6M6 11.5l6-6 6 6" stroke-width="2.4"/></symbol>
<symbol id="i-refresh" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" d="M19 12a7 7 0 11-2.2-5.1M19 4.5v4.3h-4.3"/></symbol>
<symbol id="i-device" viewBox="0 0 24 24"><rect fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" x="7" y="3.5" width="10" height="17" rx="2.2"/><path fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" d="M10.5 17.5h3"/></symbol>
<!-- resources -->
<symbol id="i-fiber" viewBox="0 0 24 24"><circle fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" cx="12" cy="12" r="8.5"/><circle fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" cx="12" cy="12" r="3.2"/><path fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" d="M12 3.5c-3 3.4-3 13.6 0 17M5 6.8c4 1 10 1 14 0" opacity=".6"/></symbol>
<symbol id="i-hardware" viewBox="0 0 24 24"><rect fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" x="6.5" y="6.5" width="11" height="11" rx="1.8"/><rect fill="currentColor" x="10" y="10" width="4" height="4" rx=".6"/><path fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" d="M9.5 3.5v3M14.5 3.5v3M9.5 17.5v3M14.5 17.5v3M3.5 9.5h3M3.5 14.5h3M17.5 9.5h3M17.5 14.5h3"/></symbol>
<symbol id="i-capital" viewBox="0 0 24 24"><circle fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" cx="12" cy="12" r="8.5"/><path fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" d="M14.6 9.4c-.5-1-1.4-1.5-2.6-1.5-1.5 0-2.6.8-2.6 2 0 2.7 5.2 1.4 5.2 4.2 0 1.2-1.1 2-2.6 2-1.2 0-2.2-.6-2.7-1.6M12 6.2v1.7M12 16.1v1.7"/></symbol>
<symbol id="i-power" viewBox="0 0 24 24"><path fill="currentColor" d="M13.4 2.8L5.5 13.4h5.2l-1 7.8 8.8-11.4h-5.4z"/></symbol>
<symbol id="i-battery" viewBox="0 0 24 24"><rect fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" x="3.5" y="7.5" width="15" height="9" rx="2"/><path fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" d="M21 10.5v3"/><path fill="currentColor" d="M6 10h3v4H6z"/></symbol>
<!-- buildings: i-b-<type> -->
<symbol id="i-b-cable_yard" viewBox="0 0 24 24"><circle fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" cx="12" cy="12" r="8.5"/><circle fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" cx="12" cy="12" r="3"/><path fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" d="M5.5 8.5c3.5 1.6 9.5 1.6 13 0M5.5 15.5c3.5-1.6 9.5-1.6 13 0" opacity=".65"/></symbol>
<symbol id="i-b-supply_depot" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" d="M3.5 8.2L12 4l8.5 4.2v8.6L12 21l-8.5-4.2z"/><path fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" d="M3.5 8.2L12 12.5l8.5-4.3M12 12.5V21"/></symbol>
<symbol id="i-b-sales_office" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" d="M4 20.5V8.5l6-4v16M10 8.5l10 3.5v8.5"/><path fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" d="M6.5 11h1.5M6.5 14.5h1.5M13.5 15h3"/><path fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" d="M3 20.5h18"/></symbol>
<symbol id="i-b-substation" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" d="M12 3v18M7.5 21l4.5-13 4.5 13M5 8.5h14M7 13.5h10"/><path fill="currentColor" d="M12 3l1.5 2.5h-3z"/></symbol>
<symbol id="i-b-core_router" viewBox="0 0 24 24"><circle fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" cx="12" cy="12" r="3.4"/><path fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" d="M12 3.5v5.1M12 15.4v5.1M3.5 12h5.1M15.4 12h5.1M6 6l3.6 3.6M14.4 14.4L18 18M18 6l-3.6 3.6M9.6 14.4L6 18"/><circle fill="currentColor" cx="12" cy="3.5" r="1.4"/><circle fill="currentColor" cx="12" cy="20.5" r="1.4"/><circle fill="currentColor" cx="3.5" cy="12" r="1.4"/><circle fill="currentColor" cx="20.5" cy="12" r="1.4"/></symbol>
<symbol id="i-b-rack_hall" viewBox="0 0 24 24"><rect fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" x="5" y="3.5" width="14" height="17" rx="1.8"/><path fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" d="M5 9.2h14M5 14.8h14M8 6.4h.1M8 12h.1M8 17.7h.1M12 6.4h4.5M12 12h4.5M12 17.7h4.5"/></symbol>
<symbol id="i-b-battery_bank" viewBox="0 0 24 24"><rect fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" x="3" y="6.5" width="16" height="11" rx="2"/><path fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" d="M21.5 10v4"/><path fill="currentColor" d="M5.5 9h2.6v6H5.5zM9.6 9h2.6v6H9.6z"/></symbol>
<symbol id="i-b-firewall" viewBox="0 0 24 24"><rect fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" x="3.5" y="4.5" width="17" height="15" rx="1.5"/><path fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" d="M3.5 9.5h17M3.5 14.5h17M9 4.5v5M15 4.5v5M6.5 9.5v5M12 9.5v5M17.5 9.5v5M9 14.5v5M15 14.5v5"/></symbol>
<symbol id="i-b-noc" viewBox="0 0 24 24"><rect fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" x="3" y="4" width="18" height="12.5" rx="2"/><path fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" d="M8 20.5h8M12 16.5v4M5.8 11h3l1.6-3.5 2.4 6 1.6-2.5h3.2"/></symbol>
<symbol id="i-b-research_lab" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" d="M9.5 3.5h5M10.5 3.5v6L5 19a1.5 1.5 0 001.3 2.2h11.4A1.5 1.5 0 0019 19l-5.5-9.5v-6"/><path fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" d="M7.8 15h8.4"/><circle fill="currentColor" cx="10.5" cy="17.7" r=".9"/><circle fill="currentColor" cx="14" cy="16.7" r=".7"/></symbol>
<symbol id="i-b-ops_lab" viewBox="0 0 24 24"><rect fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" x="3" y="4.5" width="18" height="15" rx="2"/><path fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" d="M7 9.5l3.2 2.5L7 14.5M12.5 15h4.5"/></symbol>
<symbol id="i-b-internet_exchange" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" d="M4 8h13M13.5 4.5L17 8l-3.5 3.5M20 16H7M10.5 12.5L7 16l3.5 3.5"/></symbol>
<symbol id="i-b-peering_office" viewBox="0 0 24 24"><circle fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" cx="8.5" cy="12" r="5"/><circle fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" cx="15.5" cy="12" r="5"/></symbol>
<symbol id="i-b-rollout_depot" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" d="M2.5 16.5V8h10v8.5M12.5 11h4.2l3 3.2v2.3h-7.2"/><circle fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" cx="7" cy="17.5" r="2"/><circle fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" cx="16.5" cy="17.5" r="2"/></symbol>
<symbol id="i-b-backbone_node" viewBox="0 0 24 24"><circle fill="currentColor" cx="4.5" cy="12" r="2.1"/><circle fill="currentColor" cx="12" cy="12" r="2.1"/><circle fill="currentColor" cx="19.5" cy="12" r="2.1"/><path fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" d="M6.6 12h3.3M14.1 12h3.3M12 4.5v5.4M12 14.1v5.4"/><circle fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" cx="12" cy="4.5" r="1.4"/><circle fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" cx="12" cy="19.5" r="1.4"/></symbol>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 13 KiB