A modern WordPress starter theme powered by Vite, and Sass. Optimised for fast development and production.
- Project homepage (this repo)
- Docs: see the
docs/folder (core.md,theme.md,filters.md,structure.md,config-keys.md,helpers.md)
- PHP
>= 8.3(percomposer.json) - Node.js
>= 23(perpackage.jsonengines) - pnpm
>= 10(package manager used by this project) - Composer
- (Optional) WP-CLI for i18n tasks
- Copy environment file:
cp .env.sample .envand adjust values as needed.
- Install dependencies:
pnpm installcomposer install
- Development server:
pnpm dev(starts Vite with HMR and HTTPS)
- Production build:
pnpm build
- Deploy build (CI or server):
pnpm deploy(installs prod deps via Composer and builds assets)
pnpm setup→pnpm install && composer installpnpm dev→ Starts Vite dev server withVITE_DEV=truepnpm build→ Production buildpnpm start→vite build --watch(useful for some environments)pnpm deploy→pnpm install && composer install --no-dev && vite buildpnpm i18n:pot→ Generates a POT file atlanguages/reactsmith.potpnpm fix→ Runs code formatters/linters (JS/CSS/PHP)
- Install Composer deps (first time):
composer install - Generate POT with WP-CLI:
pnpm i18n:pot- Outputs to
languages/reactsmith.pot(uses theText Domainfrom project config)
- Outputs to
Vite dev server is configured for HTTPS and hot module replacement (HMR). PHP file changes trigger a full reload.
VITE_PROTOCOL(default:https)VITE_HOST(default:localhost)VITE_PORT(default:5173)VITE_HMR_PROTOCOL(default: derives fromVITE_PROTOCOL)VITE_ORIGIN(default:${VITE_PROTOCOL}://${VITE_HOST}:${VITE_PORT})VITE_CORS_ORIGIN(default:*)VITE_CORS_METHODS(default:GET,POST,PUT,DELETE,PATCH,OPTIONS)VITE_CORS_HEADERS(default:Content-Type,Authorization)VITE_CORS_CREDENTIALS(default:true)
For installable web app functionality, update these files (remove if not needed):
_src/static/site.webmanifest_src/images/icon-512.png_src/images/icon-maskable-512.png
See docs/structure.md for a full tour. Key points:
Core/— framework pieces (assets, partials/components, WordPress integrations)Theme/— project‑specific extensions and integrations_src/— source assets (JS/TS, SCSS, images, static)assets/— built assets andmanifest.jsonreactsmith.json— project metadata and settings consumed byCore\Configtheme.json— WordPress block theme configuration (generated by Vite plugin)
pnpm fix:styles→ Stylelint (SCSS/CSS)pnpm fix:scripts→ ESLintpnpm fix:php→ PHP CodeSniffer (auto-fix where possible)pnpm php:compat→ PHP Compatibility check (targets PHP 8.2+ by default in script; adjust as needed)
This project is originally based on and inspired by Wholegrain Digital’s Granola theme (MIT):
Portions of the code remain © 2019 Wholegrain Digital, used under the MIT Licence. See LICENSE for details. ReactSmith is ©2025 Rossano Guenci.
MIT — see LICENSE.