@ai-coach/vault-view
The minimal, lazy-loaded Angular application shell for the vault view. It bootstraps the browser UI, renders the persistent shell header, handles global keyboard shortcuts, provides design tokens and theme variables, and lazy-loads the Graph, Plans, and Climb feature routes.
What it does not do
- No feature pages or domain logic. Feature screens live in
libs/vault-view/feat-graph,libs/vault-view/feat-plans, andlibs/vault-view/feat-climb. - No direct backend or vault imports.
@nx/enforce-module-boundariesrestrictsscope:vault-viewtoscope:vault-viewandscope:shared(architecture:layered). All vault data arrives over HTTP via frontend-owned DTOs in@ai-coach/vault-view-data-access. - No component-specific styles in global CSS.
src/styles.cssholds design tokens, theme variables, base resets, and presentation-mode visibility; UI primitive styles live inlibs/vault-view/uiand feature styles live beside their components. - No direct
globalThiscoupling in shell state or shortcuts. Browser state flows through injectedDOCUMENTinShellStoreand pure shortcut handlers.
Architecture fit
- Scope:
scope:vault-view - Style:
architecture:layered(type:app,app:vault-view) - Depends on:
@ai-coach/vault-view-data-access,@ai-coach/vault-view-ui,@ai-coach/vault-view-util, and lazy-loaded@ai-coach/vault-view-feat-graph,@ai-coach/vault-view-feat-plans,@ai-coach/vault-view-feat-climb - Used by: Built as an Nx task dependency of
@ai-coach/vault-adapter-viewand served on127.0.0.1by@ai-coach/vault-view-server
Browser ──HTTP──▶ [@ai-coach/vault-view-server] ──serves dist/browser──▶ [@ai-coach/vault-view]
│
┌───────────────────┬───────────────────┼───────────────────┐
▼ (lazy) ▼ (lazy) ▼ (lazy) ▼
[feat-graph] [feat-plans] [feat-climb] [ui / data-access / util]
Internal architecture & rules
- Zoneless standalone bootstrap:
appConfigregistersprovideZonelessChangeDetection(),provideRouter(appRoutes, withComponentInputBinding()), andprovideHttpClient(withInterceptors([vaultTokenInterceptor])). - Lazy-loaded feature routes: Every top-level route (
/,/plans,/climb) usesloadComponentso feature bundles (includingng-diagramfor Climb) stay out of the initial shell chunk. - Component standards: Every component uses
ChangeDetectionStrategy.OnPush, explicitpublic/privatemember accessibility, separate.cssfiles (styleUrl), no inline styles, and no source comments (DEC-AIC-0011). - Testable shell shortcuts: Global keyboard shortcuts (
Ptoggles presentation mode,Escapeexits it) are delegated to a purehandleShellShortcuthelper guarded byisGlobalShortcut.
Public surface
/(path: '') — Lazy-loadsGraphFeatureComponentfrom@ai-coach/vault-view-feat-graph(vault link graph, filters, note reader, and progressive distillation)./plans— Lazy-loadsPlansFeatureComponentfrom@ai-coach/vault-view-feat-plans(goal chain tree and effort timeline)./climb— Lazy-loadsClimbFeatureComponentfrom@ai-coach/vault-view-feat-climb(seven-step learning ladder, structure drawing board, and sketch pad)./**— Redirects unknown paths to/.- Built static bundle in
dist/browser/(index.html,main.js,styles.css, and lazychunk-*.jsfiles) consumed by@ai-coach/vault-adapter-view.
See the vault view guide and glossary for how each view works.
How to extend it
- Create or update the feature library under
libs/vault-view/feat-<name>with its ownOnPushcontainer component and external.cssfiles. - Add a lazy
loadComponent(orloadChildren) entry insrc/app/app.routes.tsand register its navigation item inAppComponent. - Add or update unit tests in
src/app/*.spec.tscovering route laziness, config, or shortcut behavior. - Run
npm exec nx lint @ai-coach/vault-view,npm exec nx typecheck @ai-coach/vault-view,npm exec nx test @ai-coach/vault-view, andnpm exec nx build @ai-coach/vault-view.
Running & testing
Start the local vault view server (which serves the built bundle for your vault):
coach-vault-view --vault /path/to/vault
Or run the Angular dev server directly during frontend work:
npm exec nx serve @ai-coach/vault-view
See the vault view guide for all server options and browser shortcuts.
npm exec nx lint @ai-coach/vault-view
npm exec nx typecheck @ai-coach/vault-view
npm exec nx test @ai-coach/vault-view
npm exec nx build @ai-coach/vault-view
Key ADRs
- DEC-AIC-0059 — Migrates the vault view to an Angular layered application with frontend-owned DTOs.
- DEC-AIC-0061 — Splits the loopback HTTP view host into
apps/vault-view-server. - DEC-AIC-0062 — Establishes Angular layer responsibilities, component standards, lazy routes, and Nx guardrails for
vault-view. - DEC-AIC-0063 — Adopts the six-role component taxonomy (feature, smart, composite, shell, UI atoms and molecules) with explicit type suffixes.
- DEC-AIC-0051 — Defines the workspace
apps/+libs/layout and@nx/enforce-module-boundariesrules.