承接 leeroy/craft-starter-nuxt 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

leeroy/craft-starter-nuxt

Composer 安装命令:

composer require leeroy/craft-starter-nuxt

包简介

Craft CMS starter in headless with DDEV and Nuxt 3

README 文档

README

Starter running on Nuxt 3 with headless Craft CMS

Local machine prerequisites:

  1. Docker
  2. DDEV
  3. Composer

Overview

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

Located in the frontend folder.
Configured to get data from Craft using nuxt-graphql-client (documentation).
Localization with i18n (documentation).

Create a new project with this starter

  1. Open terminal prompt, and run:
composer create-project leeroy/craft-starter-nuxt PATH --no-install
  1. Edit backend/.ddev/config.yaml file and change the name (php_version or database if needed).
  2. Then to install a clean version of Craft, run:
make install
  1. 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

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

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.

Makefile

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 commands
  • make 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

DDEV

Using the 'ddev' command

Make sure that nothing else is running at the same time (Apache or other Docker-based environment).
To turn off Lando:

lando poweroff

leeroy/craft-starter-nuxt 适用场景与选型建议

leeroy/craft-starter-nuxt 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 53 次下载、GitHub Stars 达 9, 最近一次更新时间为 2023 年 03 月 10 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 leeroy/craft-starter-nuxt 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 leeroy/craft-starter-nuxt 我们能提供哪些服务?
定制开发 / 二次开发

基于 leeroy/craft-starter-nuxt 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 53
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 9
  • 点击次数: 10
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 9
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-03-10