Principles
- A fast frontend, modular architecture and separated component responsibilities.
- Custom redesign of the WordPress Admin: Dashboard, Media, login, tables.
- Light/Dark/System modes and seven accent colour variants.
- Visual builder (Vue 3 + TypeScript): drag & drop, breakpoints, tokens from theme settings, animations.
- OfMine Views: input data validation, rejection of unknown components, nesting and node count limits, CSS scope and responsive rules.
This is a personal development project — not a major commercial achievement, but a good platform for experimenting with architecture.
Architecture: one document, one renderer
Every page, header and footer is a JSON document (ofmine/views-document): a node tree containing the component type and its properties. Components describe files component.json — properties with types, groups in the panel, field visibility conditions and rendering specifications (tag, classes, styles, content).
- A single PHP renderer generates HTML and CSS for both the page and the editor preview — the builder’s canvas shows exactly what a visitor will see.
- Each value passes through a sanitiser specific to its type (13 types: text, formatted text, lists, colours, lengths, images, links…); unknown components and properties are rejected.
- Document limits: 32 levels of nesting and 2,000 nodes.
- CSS is generated per node, with rules for three breakpoints (desktop, tablet ≤ 1024 px, mobile ≤ 767 px); the style from the wider screen is inherited by the narrower ones.
- Style sheets and scripts are loaded only for components used on a given page.
Builder
The editor is a Vue 3 application built with TypeScript, Pinia and Vite. It does not render anything itself — it edits the document and requests a preview from PHP, so there are no duplicate implementations of the same component.
- Layers and insertion — the document tree, components and ready-made blocks based on theme tokens.
- Inspector — Content, Layout, Typography, Dimensions, Spacing, Background, Appearance, Position, Animation, Visibility; fields are only displayed when they are relevant to the current settings, and alignment is named according to the actual axis (horizontal / vertical) and shown with icons.
- Canvas — zoom, pan with the space bar, resize handles, edit text directly in the preview.
- Dragging — insertion line, outline and name of the target container, semi-transparent source element, nesting validation.
- Responsiveness — per-device editing with visible value inheritance.
- Keyboard shortcuts — including undo/redo, copy/paste, duplicate, wrap with container, and tree navigation.
- Translations — a separate mode in which only the text is changed, whilst the layout remains the same.
Theme modules
A theme consists of independent modules, each with its own description in the repository:
- Views — document schema, component registry and renderer.
- Builder — visual editor and its REST API.
- Theme Settings — the styling system: colours, typography styles, containers, spacing and fonts as tokens.
- Content Modules — custom content types with fields defined in the admin panel (the Projects module works with these).
- I18n — multilingual support without plugins:
/en/, translated slugs,hreflang, sitemap per language. - Site Parts — headers and footers built in the builder.
- Portfolio and Contact — case studies, a skills matrix and a contact form.
- Admin, Hub and Slider — redesigned dashboard, shared module menu and carousel.
What’s already working
- The theme structure and independently developed modules (views, builder, portfolio, translations).
- New dashboard navigation, consistent admin components and redesigned WordPress screens.
- Light/Dark/System modes.
- Separate builder launch paths for pages, headers and footers.
- HTML/CSS structure renderer with restrictions on depth and number of nodes — the same document powers both the editor and the page.
The page you’re currently reading runs on the OfMine Theme: the homepage, header and footer are built using the builder, whilst the project subpages come from the portfolio module.
This page as a case study
The portfolio you are viewing also serves as a real-world test of the theme:
- The homepage, header and footer are built in the builder using core components; I added the missing elements as I went along — including a list of links to the footer, a scrollable bar in text + separator modes, images and custom elements, and a multi-image field in the editor.
- Projects is a content module with case study fields. Pages without photos are given a generated cover — an ‘application window’ in the project’s colour featuring the key figure.
- Project subpages have a table of contents built from headings, which on a mobile device turns into a sticky bar showing the current section.
- The competence matrix is a table on desktop and a list on a narrow screen — this is determined by the width of the element itself (container query), not the screen.
- The contact form sends messages via the REST API; it also works without JavaScript and protects against spam using a trap field, a signed timestamp and an IP address limit; the recipient’s address is not published.
Problems that needed solving
An empty space below the footer in Safari. Only in Safari, and only after scrolling down to the skills matrix, would the page extend by several thousand pixels of empty space. The problem did not occur in Chrome or in the test WebKit. It was only resolved by a temporary diagnostic overlay, which measured the document height and the excess content of each element in the actual browser. The culprit turned out to be hidden text for screen readers within table cells — Safari positioned them relative to animated rows far below the page. Solution: the rows simply appear (without any offset), and the cells anchor their hidden text.
Dragging on the canvas. When a button was pressed in the preview (iframe), the browser sent subsequent mouse movements to the iframe rather than to the editor layer, so the drop location was not registered. The editor now tracks all movement within the preview as well.
Smooth scrolling over the preview. Scrolling ‘passed through’ from the iframe to the editor was less smooth than native scrolling. The first scroll step raises a transparent overlay over the preview, so that subsequent steps are handled by the canvas’s native scrolling.
Performance and accessibility
- Server-side rendered HTML, with no JavaScript framework on the public page; scripts only where they are needed.
- Entry animations and effects respect
prefers-reduced-motion. - Progressive enhancement: the table of contents and form also work without JavaScript.
- Semantics and ARIA: labelled navigation,
aria-currentfor the current page and section, a table with headingsscope, form prompts in thearia-live. - Visibility of elements per device without duplicating content in the HTML.
Working with AI
I am developing OfMine in stages, making extensive use of AI assistants during implementation. I define what is to be created and how it should work, make architectural decisions, identify issues based on my own tests (e.g. in Safari) and evaluate the result. This is a project where I’m also practising this way of working: precisely formulating requirements, verifying changes in the browser and organising module documentation.
Status
Builder and some of the modules are currently under active development. This is not a ready-made replacement for Gutenberg nor a commercially deployed product — rather, it is a space for experimenting with tool architecture and the UX of admin panels, developed in stages with the use of AI.