build: add Nix flake and NixOS module for reproducible builds

- flake.nix: devShell, frontend package, backend package, combined default
- spatial-office.nix: standalone NixOS module for importing into n97 config
- packages/frontend: React + @react-three/fiber + Zustand (Vite build)
- packages/backend: Node.js + ws + Zod (WebSocket server, port 18790)
- pnpm-workspace.yaml: monorepo workspace config

nix build .#frontend  — bundled static site
nix build .#backend   — runnable WebSocket server
nix build             — full spatial-office application
nix develop           — dev shell with Node.js 22 + pnpm
This commit is contained in:
engineering Agent 2026-05-19 16:25:24 -07:00
parent 0d3879b02f
commit bb06f2c48c
15 changed files with 1464 additions and 0 deletions

View file

@ -0,0 +1,21 @@
{
"name": "spatial-office-backend",
"private": true,
"version": "0.1.0",
"type": "module",
"scripts": {
"dev": "tsx watch src/index.ts",
"build": "mkdir -p dist && cp src/index.ts dist/index.js",
"start": "node dist/index.js"
},
"dependencies": {
"ws": "^8.16.0",
"zod": "^3.22.0"
},
"devDependencies": {
"@types/node": "^22.0.0",
"@types/ws": "^8.5.0",
"tsx": "^4.7.0",
"typescript": "^5.4.0"
}
}