How uniontic/dockview works
Project type & purpose
• An open-source, monorepo toolkit (“dockview”) providing a zero-dependency core layout manager plus framework-specific adapters (Vanilla TS, React, Vue, Angular) and documentation/website.
• Key use cases: embed dockable panels, grids, split-views in web apps; serialize/deserialize layouts; pop-out windows; themeing.
High-level components
• Monorepo root (Lerna + shared config + CI scripts)
• Core library (packages/dockview-core)
• Framework adapters (packages/dockview, dockview-react, dockview-vue, dockview-angular)
• Documentation website (packages/docs – Docusaurus + live sandboxes + generated API docs)
• Templates & sandboxes (packages/docs/sandboxes & packages/templates): example projects
• Tooling & pipelines:
– Build tools: Gulp, Rollup, TypeScript compiler
– Test runner: Jest (with jest.config.ts at root & per-package)
– Doc generator: TypeDoc + Docusaurus
– CI/CD: GitHub Actions (code-analysis, build, test, publish, deploy-docs)
– Package manager: Lerna orchestrates per-package lifecycles
– Registry: npm for package publishing
– Version control: GitHub
Dependency & interaction relationships
• Core → published to npm → imported by all adapters and by docs/examples
• Adapters → depend on core → build via Rollup (produce ESM/CJS bundles + .d.ts) → published to npm
• Docs site → depends on adapters/core to render live examples → built by Docusaurus → deployed to GitHub Pages or Vercel
• Templates & sandboxes → sample consumers of adapters → live in docs repo & templates folder
• CI workflows → triggered on push/PR → run linters, tests (Jest), build (Rollup, Gulp), docs build, publish to npm & deploy docs
Architectural patterns & design principles
• Monorepo with Lerna for unified versioning & cross-package bootstrapping
• Core + adapters: an “adapter pattern” enabling framework-specific rendering with a shared core API
• Separation of concerns:
– Core: pure layout logic, no UI framework dependencies
– Adapters: glue logic + minimal abstraction for React/Vue/Angular/Vanilla
– Docs/templates: demonstration layer, static site generation
• High test coverage: unit tests in each package’s src/__tests__ folder
• CI as source of truth: reproducible builds, security checks, automatic publishes