One Nx monorepo (Angular 22, Vite 8, Nx 23) for an HTML-first NativeScript Angular design that runs on the web, iOS and Android
(the same NativeScript app also runs on macOS and Windows). Web and native stay separate at the top; shared HTML/features sit underneath.
The docs site (apps/web) is the best introduction: start at /docs/introduction.
apps/
web/ AnalogJS app (@analogjs/platform, Vite). File routes in src/app/pages, web core in src/app/app.config.ts
native/ NativeScript Angular app (@nativescript/vite). File routes in src/app/pages via analog-native
packages/
shared/ HTML-first components, the 12 example screens and the docs Markdown, used by BOTH apps (no platform imports)
ui/ Spartan: brain (headless) + helm (styled), ported to Angular 22, plus styles/ (tailwind preset, style-vega, tokens.css) and native/
web-polyfills/ Angular components so NativeScript <StackLayout>, <GridLayout> and <Label> markup renders on the web
analog-native/ File-based router + Markdown for NativeScript Angular (from nativescript-analog packages/analog)
docs/design.md analog-native design notes
npm install # postinstall applies tools/native-patches and patches @nativescript/vite
npx nx show projects # analog-native native shared ui web web-polyfills
npx nx serve web # dev server (AnalogJS)
npx nx build web # -> dist/apps/web/client
npx nx test web-polyfills # polyfill unit tests
npx nx test analog-native # router and Markdown unit tests
npx nx run-many -t typecheck # tsc for ui, shared, web-polyfills, web, native, analog-native
npx nx run native:android # needs the NativeScript CLI + Android SDK
cd apps/native && ns run ios # needs a Mac with Xcode (no native:ios Nx target yet)
packages/ui/styles/tokens.css is the single source of colour tokens (shadcn-style names, plain hex): background
#F2EBDD, foreground #10302F, primary #27695F, muted sand #E3D9C4. Dark mode (.dark on web, .ns-dark on
native) flips to deep teal.
- web:
apps/web/src/styles.cssimportspackages/ui/styles/index.css(tailwind + Spartan preset + style-vega + tokens). - native:
apps/native/src/app.cssimports Tailwind (@nativescript/tailwind), the Spartan preset, style-vega andtokens.css.
analog-native,apps/native:D:\Code\playgrounds\nativescript-analog(packages/analog,apps/demo). The import name is@nativescript-unified/analog-native(path-mapped intsconfig.base.json).web-polyfills:angular-docsorigin/mainpackages/libraries/uionly (layouts, views, text runs, Placeholder, ActionBar/Tabs/Pager/Drawer). Dropped: docs content, PLAN/RESEARCH/CONTENT-GAPS, playground, showcase catalog, brand, WebGPU hero, theme service.ui:spartanworking tree onfeat/nativescript(libs/brain, libs/helm, registrystyle-vega.css).packages/ui/native/is the NativeScript side of spartan, wired intoapps/nativethroughprovideSpartanNativeScript(). It holds the CDK shims, element registrations, the native overlay host behind brain's dialog and overlay ports, icons and CSS overrides.
apps/webis prerendered (ssr: true+static: trueinvite.config.mts);nx build webwrites static HTML for/and every/docs/:slugtodist/apps/web/analog/public. Routes come from the files inpackages/shared/content/docs.- Docs content is Markdown in
packages/shared/content/docs(front matter: title, section, order, description). A fenced block taggedhtml liveis both shown and rendered as a live demo (Angular JIT, seeapps/web/src/app/docs/demo.ts). The native app renders the same files on its Guide and Components tabs. - The home page renders the shared example screens live (
apps/web/src/app/home/home-showcase.ts), loaded with@deferonce the section nears the viewport. - Verify the built site:
npm run preview:webthennpm run audit:web(headless Edge via playwright-core; screenshots in.audit/screenshots). - Spartan brain/helm are consumed from source via tsconfig paths (
@spartan-ng/brain/*,@spartan-ng/helm/*), not built packages. Their specs were copied but have no test target yet. embla-carousel-angular@21andngx-scrollbar@19have Angular 21-era peers; they installed but are unproven on 22.- Native uses Spartan helm and Tailwind. The per-component results in the docs (the table at
/docs/components#native-status) were recorded on an Android emulator (API 36) and have not been re-checked on iOS. - Angular 22.2 supports Node
^22.22.3,^24.15.0or>=26; older versions install with engine warnings.