承接 pollen-solutions/wp-skeleton 相关项目开发

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

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

pollen-solutions/wp-skeleton

Composer 安装命令:

composer create-project pollen-solutions/wp-skeleton

包简介

Pollen Solution Wordpress project skeleton.

README 文档

README

Latest Stable Version MIT Licensed PHP Supported Versions

WordPress Skeleton Component provides structures of WordPress project based on Pollen Solutions suite.

Table of contents

Features

The Pollen solutions Skeleton component embeds :

  • Composer, as package manager for PHP libraries.
  • ViteJS as assets bundler and responsible for compiling, transpilating, versioning, optimizing ...
  • Pollen solutions components suite that includes :
    • A dependency injection container
    • A routing system
    • A templating library
    • An asset manager and injector
    • An expandable command line interface
    • An event manager
    • ...
  • A preconfigured Docker environment integrating :
    • A light-weight command-line interface for interact with Docker easily
    • A PHP server that run through Apache
    • A MySQL server
    • An email previewer service (MailHog)
    • A sharing local application service
    • ...
  • ... And a lot of other kinds of magic !

To try it is already to contribute, you are welcome !

Installation

Standard installation

Prerequisite

Launch installation

composer create-project pollen-solutions/wp-skeleton your-app-name

Serve the app

Serve your application using the built-in web server in PHP (or your server of choice) from the public directory:

php -S 127.0.0.1:8000 -t public

Visit the application in the browser:

Docker installation

Prerequisite

Launch installation

composer create-project pollen-solutions/wp-skeleton your-app-name --no-install --no-scripts

Launch application builder

cd ./your-app-name

bin/app.build

Visit the application in the browser:

Retrieve More details about docker usage in a Pollen application from the built-in documentation.

Configuration

Environment configuration

During the installation process, the file .env.example is copied to .env. This file contains all required default configuration.

# ENVIRONMENT
APP_ENV=dev
APP_DEBUG=true
APP_URL=http://127.0.0.1:8000
APP_TIMEZONE=Europe/Paris

# DATABASE
DATABASE_URL=sqlite:///%%app.base_dir%%/var/database.sqlite

Customize a local environment configuration

To customize your application configuration, you can directly edit the .env file, but the best practice is to create a new .env.local file that will contain all the configuration attributes specific to your installation. Through the .env.local file you can if necessary override an environment value declared in the .env file or define new ones :

# DATABASE
DATABASE_URL=mysql://root:root@mysql:3306/pollen

#REDIS
REDIS_CLIENT=phpredis
REDIS_HOST=127.0.0.1

Environment variables types

STRING_VAR=string
QUOTES_VAR="quoted variable"
EMPTY_STRING=
BOOL_VAR=true
NULL_VAR=null

Environment variable mapping

You can use another existing global or previously defined environment variable like this :

DB_USERNAME=${MYSQL_USER}
DB_PASSWORD=${MYSQL_PASSWORD}

Note that, for security reasons, global environnement variables couldn't be overridden.

Use application variable

In some special cases, you may need to access application variable to complete the configuration of your environment variables and the merge vars could help you.

The paths of the application are natively available :

  • %%app.base_dir%%: Absolute path to the root directory of the app.

  • %%app.public_dir%%: Absolute path to the public directory of the app.

Example of usage :

DATABASE_URL=sqlite:///%%app.base_dir%%/var/database.sqlite

Pollen solutions suite uses the vlucas/phpdotenv library to work. More information on its github repository.

Directory structure

The WordPress Skeleton component is a micro-framework to work with the Wordpress CMS. Like other solutions of this type, it is opinionated and its directory structure is intended to provide a starting point for creating a complete web application.

The Root directory structure

|–– bin
|–– bootstrap
|–– config
|–– docker
|–– docs
|–– (node_modules)
|–– public
    |–– (assets)
    |–– languages
    |–– mu-plugins
    |–– plugins
    |–– themes
    |–– uploads
    |–– (wordpress)
|–– resources
    |–– assets
    |–– views
|–– src
|–– tests
|–– var
|–– (vendor)

The Root directory

src

The src directory contains the core PHP code of your application.

resources

The resources directory contains the templating code. This included views and css, js, fonts, images and all other assets files.

public

The public directory contains the index.php file, which is the entry point for all requests entering your application and configures autoload.

This directory also houses the build assets such css, js, fonts, images and all other assets files.

config

The config directory, as the name implies, contains all of your application's PHP configuration files.

docs

The docs directory contains the complete documentation of the micro framework and its components. Work in progress ;)

pollen-solutions/wp-skeleton 适用场景与选型建议

pollen-solutions/wp-skeleton 是一款 基于 Shell 开发的 Composer 扩展包,目前已累计 27 次下载、GitHub Stars 达 3, 最近一次更新时间为 2021 年 08 月 10 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「wordpress」 「boilerplate」 「Skeleton」 「pollen solutions」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

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

围绕 pollen-solutions/wp-skeleton 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 0
  • 开发语言: Shell

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-08-10