This document describes the expected local development loop for the embedded Inti web app. It is the contract future changes should preserve.
- Go toolchain
- Node.js and
npm - Frontend dependencies installed with
npm install - Air installed with
go install github.com/air-verse/air@latest
Use one command:
make devmake dev must:
- Fail fast if
air,node,npm, or the installed frontend dependencies are missing. - Refresh the embedded
web/output once withnpm run build:web. - Start the persistent embedded web watcher.
- Start Air for Go rebuilds and
serverestarts.
- Raw
web-src/edits belong toscripts/watch-web.mjs. - Generated embedded output in
web/belongs to Air. - Go source edits belong directly to Air.
npm run build:webremains the one-shot production build contract.
The point of this split is to avoid premature restarts. Air should only react after the watcher has produced updated embedded assets.
When changing the dev-loop tooling, verify these cases:
-
Frontend edit rebuild Save a file in
web-src/. Expect the watcher to rebuild embedded assets. Expect Air to restart only if generatedweb/output actually changed. -
Go edit rebuild Save a
.gofile incmd/,internal/,main.go, orembed.go. Expect Air to rebuild and restart without involving the web watcher. -
Frontend failure recovery Introduce a temporary syntax error in
web-src/. Expect the watcher to log a clear build failure and stay running. Fix the file and save again. Expect the next successful save to rebuild normally without restarting the session. -
Production parity Run
npm run build:web. Expect the main embedded web assets andweb/401.htmlto regenerate successfully. -
Product safety baseline Run
npm run test:webandnpm run typecheck:web. Expect the existing Text Workspace and related pages to behave the same after tooling changes. -
Theme-model baseline Verify dark first paint, explicit light/dark persistence, protected secondary pages, and the migrated Text Workspace behavior still pass under
npm run test:web.
- The watcher uses a dedicated temp directory under
.tmp/inti-unauthorized-watchand should clean it up on shutdown. - If
make devexits unexpectedly, the next run should still start from a clean watcher temp directory. - If you need web-only rebuilding without Air, use
npm run watch:web.