Agent/dev instructions for shared-libs/ts-modules — the directory of shared TypeScript modules: the two Angular libs @start9labs/shared, @start9labs/marketplace, and the non-Angular @start9labs/start-core (start-core/ — the SDK's core types/ABI/effects/OS bindings, consumed by web and bundled into the SDK; it has its own Makefile/package.json and builds outside the Angular workspace). The Angular workspace root config (angular.json, package.json, tsconfig.json) lives at the repo root. CLAUDE.md is a one-line @AGENTS.md import. See ARCHITECTURE.md for structure.
- The workspace root is the repo root.
angular.json,package.json,tsconfig.jsonall live at the repo root. The Angular libsshared/andmarketplace/live here, alongside the non-Angularstart-core/(@start9labs/start-core), which has its ownMakefile/package.jsonand is built separately (not part of the Angular workspace). - Apps live elsewhere.
ui→../../projects/start-os/web/ui,setup-wizard→../../projects/start-os/web/setup-wizard,start-tunnel→../../projects/start-tunnel/web,start-wrt→../../projects/start-wrt/web,brochure-marketplace→../../projects/brochure-marketplace. Editing app code means editing those dirs even thoughng/tscare run from the repo root. - i18n dictionaries:
shared/src/i18n/dictionaries/.
npm ci
npm run build:deps # MUST run first after install — builds the file: deps (@start9labs/start-core, patch-db client)
npm run check # type-check all projects; or check:shared / check:ui / etc. for one
make -C shared-libs/ts-modules/start-core test # jest; start-core only, see Gotchas
make web-format # prettier; make web-format-check for CI
npm run start:ui # mock dev server (needs config.json — cp shared-libs/ts-modules/config-sample.json config.json)
npm run build:ui # prod build of a single app@start9labs/start-coreandpatch-db-clientarefile:deps built bybuild:deps; a fresh checkout won't type-check until you run it.start-corehas a jest suite instart-core/lib/test/, run bymake -C shared-libs/ts-modules/start-core testand reached by the rootmake testin CI. The Angular libs use focusednode:testtests for state logic (check:sharedruns the icon loading-state tests);npm run check(tsc, strict + strictTemplates) plus a successfulbuild:*is the verification bar.check:uialso runs focusednode:testOS-update sequencing tests against the service and caller methods with Angular DI and real PatchDB; it does not render templates.shared-libs/crates/patch-dbis a first-party crate;build:depsrunsnpm ci && npm run buildinside itsclient/directory.brochure-marketplace(../../projects/brochure-marketplace) is a public website, not an embedded OS app. It's the marketplace front at marketplace.start9.com and auto-deploys on merge tomaster(.github/workflows/deploy-brochure.yml) —uiandsetup-wizardship inside the OS image;start-tunnelships insidetunnelbox, andstart-wrtships embedded in thestartwrtbinary. brochure consumes the same sourceshared/marketplacelibs as the other apps.
cp shared-libs/ts-modules/config-sample.json config.json- By default, "useMocks" is set to
true. - Use "maskAs" to mock the host from which the web UI is served. Valid values are
tor,local,localhost,ipv4,ipv6, andclearnet. - Use "maskAsHttps" to mock the protocol over which the web UI is served.
truemeans https;falsemeans http.
You can develop using mocks (recommended to start) or against a live server. Code changes will live reload the browser.
npm run start:setup
npm run start:ui-
In
config.json, set "useMocks" tofalse, and setui.api.signAsto the server's hostname or IP (e.g."demo.local"). Requests are signed for the server they address, and the server rejects a signature forlocalhostfrom another machine. -
Copy the proxy config to the repo root:
cp shared-libs/ts-modules/proxy.conf-sample.json proxy.conf.json-
Replace every instance of
<CHANGE_ME>with the same hostname or IP -
Start the proxy dev server:
npm run start:ui:proxyThe shared dictionaries live in shared/src/i18n/dictionaries/. en.ts maps
English keys to numeric IDs; each other dictionary maps those IDs to translated
strings. Add a key at the next available ID and supply a real translation in
every dictionary. Run npm run check:i18n.
For a new language, add its dictionary, extend loadDictionary and the Taiga
language loader in shared/src/i18n/i18n.providers.ts, and update languages
and LANGUAGE_TO_TUI in shared/src/i18n/i18n.service.ts. Add its language-name
key and translations across the dictionaries. Coordinate matching backend
locale support and the product-local StartTunnel/StartWRT dictionaries.