crabstudio/app 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

crabstudio/app

Composer 安装命令:

composer create-project crabstudio/app

包简介

CakePHP skeleton app

README 文档

README

Build Status License Latest Stable Version Total Downloads Latest Unstable Version

A skeleton for creating applications with CakePHP 3.x.

The framework source code can be found here: cakephp/cakephp.

Features

  1. Authenticate, Authorize
  2. Backend ready
  3. Simple shells => Power tool
  4. New CRUD bake template
  5. Send bulk email
  6. Backup database job
  7. Store Settings in database
  8. Improve pages peed: .htaccess, minify html, cdn, cache
  9. Integrated file manager, tinymce
  10. Prevent brute force attack
  11. Remember/Auto login
  12. Compress whole project to deploy.tar.gz file to ship in one click (deploy/compress.sh)
  13. Provide VERY SIMPLE script to set up nginx (script link)

Support my passion paypal

Create project

  1. Download Composer or update composer self-update.
  2. Run php composer.phar create-project --prefer-dist crabstudio/app [app_name].

If Composer is installed globally, run

composer create-project --prefer-dist crabstudio/app [app_name]

Installation

Initial new application

  1. Setup Datasource in config/app.php
  2. Run and follow the command: bin/cake install
  3. Application ready to use.

Refactory

Incase you want to wipe and reinstall application

  1. Run and follow the command: bin/cake refactory
  2. Application ready to use.

Available shell commands

	bin/cake install			: install default database
	bin/cake refactory			: wipe existing database then install factory database
	bin/cake users				: insert administrator
	bin/cake roles				: insert 3 default roles [admin, manager, member]
	bin/cake settings			: insert default settings
	bin/cake scheduler 			: run task, let's create crontab schedule [scroll down to Crontab schedule]

EmailQueue

If you want to build an url point to your Controller, build it in the controller and set to the view

// Router

$routes->connect('/verify/:token/:email', [
	'controller' => 'Coupons',
	'action' => 'verify'
], [
	'token' => '[a-z0-9]+',
	'email' => '^[A-Za-z0-9._%+-]+@([A-Za-z0-9-]+\.)+([A-Za-z0-9]{2,4}|museum)$',
	'pass' => [
		'token',
		'email'
	]
]);

// Build url

use Cake\ORM\TableRegistry;
use Cake\Routing\Router;

TableRegistry::get('EmailQueue')
	->enqueue(
		$emailAddress,
		[
			'user' => 'Anh Tuan',
			'variable_url' => Router::url([
				'controller' => 'Coupons',
				'action' => 'verify',
				$tokenString,
				$emailAddress,
				'_full' => true
			])
		], [
	        'subject' => __('Issue the coupon'),
	        'template' => 'Coupon/issue',
	        'format' => 'html',
	        'layout' => 'default'
	    ]);


// Email view (src/Template/Email/html/Coupon/issue.ctp)

<?= __('Hi {0},', $user)?>
<?= $this->Html->link(__('Verify'), $url)?>

Bake

You can use bake to generate CRUD code, then you're ready to use.

bin/cake bake all Posts --prefix admin

Template theme

Backend

Email

Add menu to the backend

Edit src/Template/Element/Admin/navbar_side.ctp to add more menu

Included Plugins

MinifyHtml

TinyAuth

CookieAuth

Search

Backend Template:

This skeleton use Flat Admin v2 as new bake template

You just do bake code, you're good to go.

Crontab schedule:

Open crontab crontab -e then add cronjob:

*/5 * * * * cd /path/to/app && bin/cake Scheduler

Compress project to ship

Go to deploy folder then double click on compress.sh

Set up nginx Web server

I recommend you to use nginx server.

Use this simple script to set up optimized nginx on ubuntu in 4 simple steps.

test

Demo

Login page

Lost password

Register

Maintenance mode

File Manager

Setting member

Change password

Task schedule

CRUD

Index

Add

Edit

View

crabstudio/app 适用场景与选型建议

crabstudio/app 是一款 基于 JavaScript 开发的 Composer 扩展包,目前已累计 376 次下载、GitHub Stars 达 15, 最近一次更新时间为 2016 年 05 月 07 日, 在 PHP 生态内属于活跃度较高的组件。

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

围绕 crabstudio/app 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

  • Stars: 15
  • Watchers: 5
  • Forks: 393
  • 开发语言: JavaScript

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-05-07