Develop and verify changes in isolation
Use staged frontend output, separate data/ports and targeted checks while preserving the installed runtime.
The source checkout may also be the installed application. Commands that appear to be ordinary development tasks can overwrite its served frontend, bind its production port or open its persistent data. Establish explicit isolated paths before running a development server or browser suite.
Source map#
src contains the React workbench, graph, library and evaluators. shared defines contracts and built-in assets. server contains HTTP/MCP, validation, persistence, the engine and workers. scripts owns native launch/supervision tooling. tests contains isolated runtime and browser coverage.
The sibling library source owns catalog builders, typed integrations and guarded publication tooling. It is a separate maintained root. Historical journals and source snapshots are evidence; do not rewrite them to make an old deployment script pass against newer state.
Know the package commands#
| Command | Boundary |
|---|---|
npm ci | Restore lockfile dependencies; no task installation |
npm run check | Static TypeScript validation |
npm run build | Check types and build the frontend into configured output |
npm start | Start a real API/runtime |
npm run dev | Start API watcher and development frontend |
npm test | Run configured Node test suites |
npm run test:browser | Exercise the configured built UI through isolated browser fixtures |
The default frontend build targets the installed dist directory. Use ONF_DIST_DIR and an explicit staged Vite output path for isolated UI work. Confirm the emitted destination before serving it. Browser tests do not automatically build a fresh frontend; otherwise a passing test can cover stale assets.
Separate data and ports#
Use a fresh absolute ONF_DATA_DIR, unused loopback ONF_PORT, ONF_LAN=0 and empty public-origin override for development. Keep these settings in a dedicated shell and do not carry them into normal startup.
Do not copy the production database or encryption key as an editor fixture. Empty isolated installations seed their own examples and can create synthetic definitions/credentials. Production workflows, immutable versions, runtime history and protected storage are not test data.
The default Vite API proxy targets the normal application port. Merely changing the API port does not change that proxy. Use a matching explicit isolated proxy configuration or serve a staged build from the isolated API.
Choose meaningful verification#
Static checks establish type/syntax consistency. Runtime tests exercise HTTP, storage, actual workers and recovery with disposable data. Browser checks establish visible interactions against the chosen staged build. Synthetic provider mocks do not establish live account permissions or a real business-system mutation.
Run targeted behavior checks appropriate to the change, then required integrated checks. Record source/static, isolated runtime, browser, installed readback and provider verification separately. Never present one as proof of another.
Preserve operation#
Coordinate deployment/restart separately from development. Drain accepted work, preserve intended entry states and take a protected backup when required. A source change can affect the next production restart even if the current UI is staged elsewhere.
Use versioning for immutable publication and backup/restore before migration. Keep keys, databases, copied credentials, private payloads and generated diagnostic evidence out of public deliverables.
Source provenance
Reviewed against maintained source and topic documentation on 23 October 2026. This is a source snapshot; installed versions and provider access may differ.
docs/DEVELOPMENT.mddocs/OPERATIONS.mddocs/ARCHITECTURE.md