PHPackages                             leeroy/craft-starter-twig - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. leeroy/craft-starter-twig

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

leeroy/craft-starter-twig
=========================

Craft CMS starter with DDEV and Vite setup

v1.0.2(3y ago)315MITJavaScript

Since Mar 8Pushed 3y agoCompare

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

READMEChangelog (3)Dependencies (7)Versions (5)Used By (0)

Craft Starter Twig
==================

[](#craft-starter-twig)

Twig starter running on Vite with optional Web Components and page transitions with Barba.js

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

[](#local-machine-prerequisites)

1. [Docker](https://www.docker.com/)
2. [DDEV](https://ddev.readthedocs.io/)
3. [Composer](https://getcomposer.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-twig PATH --no-install
```

2. Edit *.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. Do a one-time build of Vite
6. Generate `APP_ID` and save to your `.env` file
7. Generate `SECURITY_KEY` and save to your `.env` file
8. Installing Craft for the first time, allowing you to set the admin's account credentials
9. 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. Do a one-time build of Vite
6. Spin up the Vite dev server
7. Output a `ddev describe` to show the project domain
8. 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:

```
ddev export-db > ./dumpfile.sql.gz
```

Import a database with:

```
ddev import-db
