How p3ol/oak works
Project Type and Purpose
• This is an open-source, modular, block-based page‐builder framework (“Oak”) published as a monorepo of NPM packages.
• Its core offers the builder abstraction and plugin system; separate packages provide React rendering, theming, rich-text addons (Remirror/CKEditor5), and a Strapi integration plugin.
File Structure Analysis
• Top‐level: CI/CD config (.github/workflows/, .ci/), build scripts (lerna.json, package.json), Storybook examples (.storybook/), TypeScript configs.
• packages/ folder holds:
• core – the fundamental builder engine (builder, fields, store, events, types)
• react – React renderer layer, UI components, hooks, stories, tests
• theme – base CSS/SASS definitions and theming scripts
• addon-remirror & addon-ckeditor5-react – two pluggable rich-text field implementations
• strapi-plugin – Strapi CMS plugin glue for Oak fields
• ckeditor5-build-custom – custom CKEditor5 build with Oak plugin extensions
Core Components
• Monorepo Root & Tooling
• Lerna/Yarn Workspaces – orchestrates package interdependencies and publishes
• CI/CD (GitHub Actions, Jest, Codecov)
• Storybook – example runner for UI components
• Oak Core Package
• Builder Engine – orchestrates blocks, settings, store, overrides
• Addon Interface – the API that addons implement
• Renderer Layer
• React Renderer – converts Core builder definitions into React components
• Theme Layer – SASS/CSS that styles React components
• Rich-Text Addons
• Remirror addon – implements WYSIWYG via Remirror
• CKEditor5 addon – implements WYSIWYG via CKEditor5
• External Integrations
• Strapi Plugin – Strapi admin/ backend adapters that wrap Oak fields for CMS use
Relationships & Data Flows
• React Renderer imports theme assets and calls Core APIs at runtime
• Strapi Plugin depends on Core to render configuration in Strapi admin, and on React Renderer for UI
• CI/CD connects to monorepo root (build/test → publish)
Architectural Patterns & Design Principles
• Modular monorepo (Lerna/Yarn Workspaces)
• Plugin architecture (Core defines extension points; addons implement and register)
• Separation of concerns: Core (logic) vs Renderer (view/UI) vs Theme (styling)
• Single‐source maintenance of builds and scripts at root level
Relevant Technologies
• Node.js + TypeScript
• Lerna & Yarn Workspaces for package management
• Rollup & Webpack configs per package for bundling
• Storybook for UI examples
• Jest for unit testing
• GitHub Actions for CI/CD
• Remirror & CKEditor5 as external rich-text engines
• Strapi as external CMS
f. Above, show CI/CD → Run tests/build → publish to NPM registry.