PHPackages                             leeroy/craft-starter-nuxt - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. leeroy/craft-starter-nuxt

ActiveLibrary

leeroy/craft-starter-nuxt
=========================

Craft CMS starter in headless with DDEV and Nuxt 3

v1.0.0(3y ago)9531[1 issues](https://github.com/LeeroyLabs/craft-starter-nuxt/issues)MITPHP

Since Mar 10Pushed 3y ago1 watchersCompare

[ Source](https://github.com/LeeroyLabs/craft-starter-nuxt)[ Packagist](https://packagist.org/packages/leeroy/craft-starter-nuxt)[ RSS](/packages/leeroy-craft-starter-nuxt/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Craft Starter Nuxt
==================

[](#craft-starter-nuxt)

Starter running on Nuxt 3 with headless Craft CMS

Local machine prerequisites:
----------------------------

[](#local-machine-prerequisites)

1. [Docker](https://www.docker.com/)
2. [DDEV](https://ddev.readthedocs.io/)
3. [Composer](https://getcomposer.org/)

Overview
========

[](#overview)

Craft CMS
---------

[](#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.

Nuxt 3
------

[](#nuxt-3)

Located in the `frontend` folder.
Configured to get data from Craft using *nuxt-graphql-client* ([documentation](https://nuxt-graphql-client.web.app/)).
Localization with *i18n* ([documentation](https://v8.i18n.nuxtjs.org/)).

Create a new project with this starter
======================================

[](#create-a-new-project-with-this-starter)

1. Open terminal prompt, and run:

```
composer create-project leeroy/craft-starter-nuxt PATH --no-install
```

2. Edit *backend/.ddev/config.yaml* file and change the `name` (`php_version` or `database` if needed).
3. Then to install a clean version of Craft, run:

```
make install
```

4. Follow the prompts (DDEV helped filling the *.env* file)

Once the process is complete, type `make dev` to start developing on the project. 🚀

The command above will automatically:

1. Copy your local SSH keys into the container
2. Start your DDEV project
3. Install Composer
4. Install yarn
5. Generate `APP_ID` and save to your `.env` file
6. Generate `SECURITY_KEY` and save to your `.env` file
7. Installing Craft for the first time, allowing you to set the admin's account credentials
8. Install all Craft plugins

Developing on an existing project
=================================

[](#developing-on-an-existing-project)

```
make dev
```

This command will automatically:

1. Copy your local SSH keys into the container
2. Start your DDEV project
3. Install Composer
4. Install yarn
5. Spin up the Nuxt server
6. Output a `ddev describe` to show the project domain
7. Open up the browser (for MacOS users)

Open up a browser to your project domain (something like `xxxx.ddev.site`) to verify that Vite is connected. Begin crafting beautiful things. ❤️

Databases
---------

[](#databases)

Export a database with:

```
cd backend && ddev export-db > ./dumpfile.sql.gz
```

Import a database with:

```
cd backend && ddev import-db
