$ show bovas85/nuxt-headless
This repository implements a headless CMS architecture using Nuxt.js (v2.15) as the frontend and a full WordPress installation (v4.9.8) as the backend content source. The Nuxt application consumes WordPress REST API endpoints (extended by plugins like ACF to REST API, WP API Menus, and Contact Form 7) to render pages statically or server-side. The frontend includes custom Vue components for navigation, lazy-loaded images, a carousel slider, contact forms, and a deferred rendering mixin for performance. The WordPress backend is fully vendored within the repository, including core files, a custom theme that redirects WordPress routes to the Vue app, and numerous plugins for custom fields, user roles, SVG uploads, and CORS support. The project appears to be a starter template or production site for a headless WordPress + Nuxt stack, but the vendored WordPress core and outdated dependencies (WordPress 4.9.8, Nuxt 2.15, deprecated node-sass) indicate significant technical drift and maintenance challenges.
The LLM identified 4 files worth highlighting for reuse:
A Vue mixin that uses requestAnimationFrame to defer component rendering until the browser is idle, improving initial load performance. It provides a `defer` method that returns a promise resolved on the next animation frame, and a `deferUntilVisible` method using IntersectionObserver. This pattern is self-contained and can be extracted into any Vue project for progressive rendering.
A Vue component for responsive images that likely generates multiple image sources (srcset) and handles lazy loading via IntersectionObserver. It encapsulates common responsive image patterns (breakpoints, aspect ratio, blur-up placeholder) and can be reused across projects with minimal adaptation.
A Vue component that lazy-loads images using IntersectionObserver, with a blur-up placeholder effect. It is self-contained and demonstrates a clean pattern for progressive image loading that can be extracted into any Vue or Nuxt project.
The Vuex store manages global state for menu visibility, scroll position, window dimensions, and network connectivity. It provides mutations and actions for toggling the mobile menu, updating scroll state on resize, and handling online/offline events. While somewhat coupled to the app's layout, the pattern of centralizing UI state in a Vuex store is reusable as a reference for similar Nuxt projects.