Files
Elias Journal 30f9148adb Initial commit: KiddOs v3 React kiosk
- React 18 + Vite 5 hot-reload OS (800x480 Nord theme)
- 7 apps: Journal, Calculator, Drawing, CodeLab, Clock, Files, Scratch
- Cage + Cog Wayland kiosk, offline localStorage
- Scripts: dev.sh, run-kiosk.sh, run-prod.sh
2026-08-24 21:53:02 -04:00

36 lines
1.3 KiB
Bash
Executable File

#!/bin/bash
# v3 dev - localhost only, no external IPs per safety boundary
# This script enforces localhost + file:// only.
set -e
cd "$(dirname "$0")/../webapp"
echo "🔒 KiddOs v3 — LOCALHOST ONLY MODE"
echo " Allowed: http://localhost:5173, http://127.0.0.1:5173, file://dist/index.html"
echo " Blocked: any https:// external (scratch.mit.edu etc removed)"
echo ""
# Check no external URLs in actual code (ignore comments that say blocked)
if grep -R "https://scratch.mit.edu\|https://turbowarp\|https://machinelearningforkids" src/ --include="*.jsx" | grep -v "Blocked\|blocked\|❌" ; then
echo "❌ Found external URL in code - remove per safety boundary!"
exit 1
else
echo "✅ No external URLs in App code (localhost only lock OK)"
fi
if [ ! -d node_modules ]; then
npm install
fi
# Kill old cage/cog if still from v2 test
sudo pkill -9 cage cog 2>/dev/null || true
sudo rm -f /run/user/1000/wayland-* 2>/dev/null || true
sleep 1
echo ""
echo "🚀 Starting Vite dev server on localhost:5173..."
echo " Edit src/App.jsx -> DSI hot reloads in <1s (still localhost WebSocket)"
echo " DSI command (in another SSH):"
echo " sudo openvt -f -c 1 -s -- env XDG_RUNTIME_DIR=/run/user/1000 cage -s -- cog --platform=wl http://localhost:5173 --bg-color=#2E3440"
echo ""
./node_modules/.bin/vite --host 0.0.0.0 --port 5173