Starter running on Nuxt 3 with headless Craft CMS
Located in the backend
folder, it's pre-configured to be headless.
We need Craft Pro for GraphQL.
Remember to add your sections to the Public Schema of GraphQL.
Located in the frontend
folder.
Configured to get data from Craft using nuxt-graphql-client (documentation).
Localization with i18n (documentation).
composer create-project leeroy/craft-starter-nuxt PATH --no-install
name
(php_version
or database
if needed).make install
Once the process is complete, type make dev
to start developing on the project. π
The command above will automatically:
APP_ID
and save to your .env
fileSECURITY_KEY
and save to your .env
filemake dev
This command will automatically:
ddev describe
to show the project domainOpen up a browser to your project domain (something like xxxx.ddev.site
) to verify that Vite is connected. Begin crafting beautiful things. β€οΈ
Export a database with:
cd backend && ddev export-db > ./dumpfile.sql.gz
Import a database with:
cd backend && ddev import-db < dumpfile.sql.gz
You can also use DDEV's included phpMyAdmin for database imports β just be aware it's much slower.
A Makefile has been included to provide a unified CLI for common development commands.
make install
- Runs a complete one-time process to set the project up and install Craft.make boot
- Starts the DDEV project, ensuring that SSH keys have been added, and npm & Composer have been installed.make up
- Runs the Craft commands to clear cache and load the yaml configuration files. It's done also when running one of the make dev
commandsmake dev
- Runs a one-time build of all front-end assets, then starts Vite's server for HMR.make composer xxx
- Run Composer commands inside the container, e.g. make composer install
make craft xxx
- Run Craft commands inside the container, e.g. make craft project-config/touch
Make sure that nothing else is running at the same time (Apache or other Docker-based environment).
To turn off Lando:
lando poweroff