dappur/framework
Composer 安装命令:
composer require dappur/framework
包简介
A stylish PHP application framework crafted using Slim, Twig, Eloquent and Sentinel designed to get you from clone to production in a matter of minutes.
关键字:
README 文档
README
A stylish PHP application framework crafted using Slim, Twig, Eloquent and Sentinel designed to get you from clone to production in a matter of minutes.
Built on the Slim PHP Micro Framework, Twig templating engine, Eloquent ORM database interactions, Phinx database migrations, Sentinel user management, Monolog w/ Logentries Support, form validation with CSRF protection, cookie management, database controlled config,Cloudinary CMS integration, blog, SEO, oauth2 login, and two-factor authentication.
This is a lightweight full featured framework intended for PHP developers who need an open source, fast and reliable platform to build your apps from. Have your new projects up and running in minutes with the provided basic bootstrap pages and basic bootstrap admin.
Important Links
Demo
Documentation
Changelog
dApp CLI
Quick Start Via Vagrant
Once installed, run vagrant up in the project root to provision a box that contains:
- Ubuntu 18
- PHP 7.2
- Composer
- Phinx
- MariaDB 10.3
- Apache 2
The script will also fetch dependencies, create a dev database, and run the initial migration for you. Services will be accessible through:
- Web Server: http://localhost:8181
- Phpmyadmin: http://localhost:8181/phpmyadmin
- MySQL Direct: localhost:8306
Frontend Theme
This framework comes with several pre-made Bootstrap pages to help get your project moving. All of these pages and their respective controllers/views provide you an insight into how the framework functions including form validation, CSRF, working with Eloquent ORM and other plugins. You can expand on the default template or create a completely new template using Twig and the front-end framework of your choosing.
Dashboard Theme
In addition to the few basic front end templates, this framework also comes pre-built with a basic Bootstrap 3 admin dashboard. This dashboard can be accessed automatically by logging in with the admin user credentials.
//TODO
- Create Documentation
- Beef up the dApp CLI
- Add Unit Testing
Pre-Requisites
PHP - PHP is a popular general-purpose scripting language that is especially suited to web development
MySQL Server - MySQL Server, the world's most popular open source database, and MySQL Cluster, a real-time, open source transactional database.
Composer - Dependency manager is required in order to use the Dappur PHP Framework. Installation Instructions
Phinx - Phinx is required in order to utilize the database migrations. It is recommended that you install Phinx globally via composer by running:
$ composer global require robmorgan/phinx
Install with dApp (Experimental)
This command clones your project via the composer create-project command and downloads the themes as well as prepare your settings.json file.
$ dapp new new_app
Install Via Composer
Step 1 (Create the project)
You can start a new project user the Composer create-project command.
$ composer create-project dappur/framework new_app
Step 2 (Install the themes)
If you install via composer, you will have to install both of the themes manually. Simply copy the theme folder from the theme repository into you app/views folder inside your project. If you are using a custom theme, you will have to change the initial migration to support that theme before you migrate your database.
Step 3 (Prepare settings.json file)
Inside the root of your project, you will need to copy the settings.json.dist to settings.json.
$ cp settings.json.dist settings.json
Once copied, open settings.json and change the "framework" name to your project name. You can also set up any other options as well as your database credentials.
Initial Database Migration
If you are not using Vagrant, you have one more step to go before you are live. You will need to ensure that you database credentials are correct in settings.json and then run the following command in a terminal from your root project directory:
$ phinx migrate
Run & Test Project
If you've chosen to use vagrant, you can simply visit the configured URL:PORT after completing the vagrant up command. Otherwise, once you have successfully done the initial migration, you can simply use PHP's built in web server to test your application by running the following from your root project directory:
$ php -S localhost:8181 -t public
Navigate to http://localhost:8181 to view your project.
Default Admin Username: admin
Default Admin Password: admin123
It is HIGHLY recommended that you change the password immediately after your initial migration.
Created Using
- Slim - Slim is a PHP micro framework that helps you quickly write simple yet powerful web applications and APIs
- Slim Twig-View - Slim Framework 3 view helper built on top of the Twig 2 templating component
- Slim Flash Messaging - Slim Framework Flash message service provider
- Slim CSRF - Slim Framework 3 CSRF protection middleware
- Slim Validation - A validator for Slim micro-framework using Respect\Validation
- Cartalyst Sentinel - PHP 5.4+ Fully-featured Authentication & Authorization System
- Illuminate Database - The Illuminate Database component is a full database toolkit for PHP, providing an expressive query builder, ActiveRecord style ORM, and schema builder.
- Monolog Logging - Send logs to files, sockets, inboxes, databases and various web services.
- Fig Cookies - Cookies for PSR-7 HTTP Message Interface.
- Phinx Database Migrations - Phinx makes it ridiculously easy to manage the database migrations for your PHP app.
- Cloudinary Image CDN - Cloudinary is a cloud service that offers a solution to a web application's entire image management pipeline.
- PHPMailer - A full-featured email creation and transfer class for PHP.
- Paginator - A lightweight PHP paginator, for generating pagination controls in the style of Stack Overflow and Flickr.
- UUID - A PHP library for generating RFC 4122 version 1, 3, 4, and 5 universally unique identifiers (UUID).
- Jobby - Manage all your cron jobs without modifying crontab. Handles locking, logging, error emails, and more.
- TwoFactorAuth - PHP library for Two Factor Authentication (TFA / 2FA)
dappur/framework 适用场景与选型建议
dappur/framework 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 513 次下载、GitHub Stars 达 63, 最近一次更新时间为 2017 年 04 月 11 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「framework」 「twig」 「email」 「monolog」 「recaptcha」 「github」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 dappur/framework 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 dappur/framework 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 dappur/framework 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
PHP Framework HLEB2 is the foundation of the web application. Provides ease of development and application performance.
Shoot aims to make providing data to your templates more manageable
This Symfony bundle integrates PhpSpreadsheet into Symfony using Twig.
A Twig extension to insert css as inline styles with a tag
Caching and compression for Twig assets (JavaScript and CSS).
Twig extensions for Tracy Debugger
统计信息
- 总下载量: 513
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 63
- 点击次数: 14
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-04-11