All Projects → vijinho → f3-cms

vijinho / f3-cms

Licence: other
PHP7 Fat-Free Framework https://fatfreeframework.com based CMS extending original https://github.com/vijinho/f3-boilerplate project and using UI-kit http://materializecss.com/

Programming Languages

PHP
23972 projects - #3 most used programming language
CSS
56736 projects
HTML
75241 projects

Projects that are alternatives of or similar to f3-cms

F3 Boilerplate
PHP7 Fat-Free Framework (http://fatfreeframework.com) example - A skeleton i18n web application which implements an MVC structure ( https://github.com/vijinho/FFMVC ) and includes the files from the https://getbootstrap.com project.
Stars: ✭ 97 (+223.33%)
Mutual labels:  lamp
Baota
宝塔Linux面板 - 简单好用的服务器运维面板
Stars: ✭ 3,163 (+10443.33%)
Mutual labels:  lamp
demet
Simple and useful LAMP & LEMP and more stack environments to use on Docker.
Stars: ✭ 76 (+153.33%)
Mutual labels:  lamp
Vagrant Lamp Bootstrap
A super-simple Vagrantfile / bootstrap.sh to setup a LAMP stack inside Vagrant 100% automatically
Stars: ✭ 132 (+340%)
Mutual labels:  lamp
Lamp
Install LAMP(Linux + Apache + MySQL/MariaDB + PHP ) for CentOS/Debian/Ubuntu
Stars: ✭ 2,456 (+8086.67%)
Mutual labels:  lamp
omeka-s-docker
Omeka-S in Docker containers.
Stars: ✭ 18 (-40%)
Mutual labels:  lamp
Setup
My own front end web development set up, covering everything from operating system to analytics.
Stars: ✭ 93 (+210%)
Mutual labels:  lamp
learning-docker
Docker 入门指引及相关资料整理
Stars: ✭ 22 (-26.67%)
Mutual labels:  lamp
Lnmp
LEMP stack/LAMP stack/LNMP stack installation scripts for CentOS/Redhat Debian and Ubuntu
Stars: ✭ 2,488 (+8193.33%)
Mutual labels:  lamp
ReaLocate
ASP.NET MVC 5 Real Estate Application
Stars: ✭ 18 (-40%)
Mutual labels:  mvc-application
Oneinstack
OneinStack - A PHP/JAVA Deployment Tool
Stars: ✭ 1,983 (+6510%)
Mutual labels:  lamp
Php Examples For Aws Lambda
Demo serverless applications, examples code snippets and resources for PHP
Stars: ✭ 177 (+490%)
Mutual labels:  lamp
ShellVhostManager
Helps you managing LAMP basic needs (virtualHost, Ftp users, Mysql Database)
Stars: ✭ 34 (+13.33%)
Mutual labels:  lamp
Vagrant Php7
A simple Vagrant LAMP setup with PHP 7.1 running on Ubuntu 16.04 LTS
Stars: ✭ 112 (+273.33%)
Mutual labels:  lamp
fatfree-snippets
🔝 Fat-Free Framework snippets for Sublime Text 2/3
Stars: ✭ 20 (-33.33%)
Mutual labels:  fatfree-framework
Lamp Yum
Yum Install LAMP(Linux + Apache + MySQL/MariaDB + PHP ) for CentOS
Stars: ✭ 93 (+210%)
Mutual labels:  lamp
TwistPHP
A fresh, new PHP MVC framework built from the ground up
Stars: ✭ 27 (-10%)
Mutual labels:  lamp
cygnite-application
Cygnite PHP Framework- Skeleton Application
Stars: ✭ 26 (-13.33%)
Mutual labels:  mvc-application
f3-events
Event system for the PHP Fat-Free Framework
Stars: ✭ 24 (-20%)
Mutual labels:  fat-free-framework
f3-mailer
Fat-Free Sugar Mailer Plugin
Stars: ✭ 18 (-40%)
Mutual labels:  fat-free-framework

f3-cms

Consider this a work-in-progress and an 'alpha' release. Contributions are welcome!

Travis CI Build Build Status Scrutinizer Code Quality Code Coverage

f3-cms homepage screenshot

Skeleton PHP 7 Fatfree-framework MVC CMS website codebase based on the simpler example project f3-boilerplate.

Project Goal: Be a good and extremely flexible starting-point for implementing any kind of CMS project in F3.

Usage

  • Clone the project
  • Change the app/config/default.ini and config.example.ini files to suit your project.
  • Change the files in app/lib/FFCMS and the routes in app/config/routes-*.ini to suit your files.

Is this project for you?

I wrote this project for myself, but if you are thinking to use it, thinking on the points below will help you decide.

General

  • You want to implement a website using the Fat-Free Framework
  • You need a stable project that can be easily adapted and altered to suit whatever your web development needs are.
  • You need to quickly and easily integrate composer classes into a project structure to get up and running ASAP.
  • You need to write some boilerplate code to add project structure and initialise some commons tasks like config, logging, database connections, set up environments for production and development etc
  • You may want the ability to setup your database connections in the http format - dbms://user:host@server:port/databasename
  • You are thinking to run f3 on the command-line and want to see how it could be done.
  • You are thinking to write an API based on REST responses and would like a starting point for to how to implement it in f3.
  • You would like to see a real-life example of f3 features for render markdown, display geo-location, database connectivity.
  • You want to have your project configuration split up into different files for the main configuration as have a local override file.
  • You would like to have your script log how long it took to run and how much memory it used after executing when in 'development' mode.
  • You need to make sure that ALL script input is normalised and cleaned by default.
  • You want to use namespaces in your project

CMS-Specific:

  • CSRF protection
  • Blacklisted IP protection (across whole site or just on login/signup pages)
  • Access to a REST JSON API via Basic Authentication or OAuth2
  • UNIX-like group-based permissions system
  • Minimal database setup tables to get up-and-running
  • Optional SQL database creation and changes using migrations
  • Data validation and filtering added to Fat-Free DB Mapper classes
  • Acceptance and Unit Tests using Codeception
  • Changes to the database are tracked in an audit table (optional)
  • Pages can be made generically to any website path in the CMS or customised on a per-page basis
  • Basic features: signup/register, confirm via email
  • See doc/GUIDE.md for more

Setup

Composer and Webserver

  • Get Composer - curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin -filename=composer
  • Run composer update
  • Setup webserver config from app/config/webserver
  • OR run with php in-built webserver from www: php -S http://127.0.0.1:8080 and browse to http://127.0.0.1:8080

Configuration

  • Edit data/phinx.yml with database settings for database configuration and migrations
  • Copy app/config/config.example.ini to config.ini
  • Edit app/config/config.ini and add anything extra from default.ini for overrides
  • In the top level folder run composer install

Folders & Permissions

Setup empty website folders permissions on the command-line as follows:

mkdir -p tmp/cache tmp/sessions tmp/uploads tmp/logs
find tmp -type d -exec chmod go+rwx {} \;

Ubuntu/Debian

File ownership should be as follows:

sudo chown -fR www-data:www-data tmp data

Setup Database

There are 3 methods to create the database, by default it is automatically created. See docs/DATABASE.md for full details of database schema.

Manual method

Import the sample empty database dump file data/db/create.mysql into an empty database directly.

#### Automatic method

If the config has db.create set to true the file www/index.php or app\lib\FFCMS\CLI.php will attempt to list tables when booting the app and cache them for 10 minutes, if they don't exist, it will execute `app/lib/Functions/Setup::database' to:

  • import to the database defined in the config using the sql file data/db/create.mysql,
  • cache the list of tables (10 minutes)
  • create a default admin user using the config.ini setting email.from as the email address with 'admin' as the password
  • create an entry in the oauth2_apps table to give the new admin user full REST API access

Login and change the settings for this user ASAP!

#### Migration method

For database migrations using phinx - read the documentation

cd data
./phinx migrate

Note: On a previously created database using the manual/automatic methods above, import the SQL dump data/db/sql/phinx.sql and then create new migrations.

Seeding Test Data

Use faker to seed the database. Phinx has integration for this.

cd app/data
php phinx seed:run
Fat-free phinx?

With phinx the following packages are installed, which might be too heavy, so it can be removed if you don't care about migrations:

  • symfony/config (v3.1.3)
  • symfony/filesystem (v3.1.3)
  • symfony/console (v3.1.3)
  • symfony/polyfill-mbstring (v1.2.0)
  • symfony/yaml (v3.1.3)
  • fzaninotto/faker (dev-master)
  • robmorgan/phinx (dev-master)

SSL (Optional)

I recommend using Let's Encrypt to generate a real live valid SSL certificate for production environments.

Dummy certificate

openssl req -new -newkey rsa:4096 -days 365 -nodes -x509 -subj "/C=GB/ST=STATE/L=TOWN/O=Office/CN=f3-cms.local" -keyout f3-cms.local.key -out f3-cms-local.crt

Add to apache virtual host (and also see the f3-cms-ssl.local files in app/config/webserver/

    SSLCertificateFile ssl/f3-cms.local.crt
    SSLCertificateKeyFile ssl/f3-cms.local.key

MAMP lets you add the SSL file in the Hosts/SSL tab.

Description of Project Layout

Note: The files that were in app/lib/FFCMS have now been split-out into their own repository https://github.com/vijinho/FFCMS They can then be included in your own project by adding the same lines in your composer.json as used in mine here.

Core Files/Paths

  • lib/bcosca/fatfree-core - fatfree framework (core) lives here
  • www - website and public doc root (aka public_html or htdocs etc)
  • www/index.php - start website application here - is the default file used by .htaccess for routing
  • app - the website application lives outside the webroot for security
  • app/lib/FFCMS/App.php - start fatfree project by including this file and executing Run();
  • lib/ - all external library files/classes
  • app/lib - local application-specific libraries
  • tmp/cache tmp/sessions tmp/uploads - temporary files
  • tmp/logs - application logfiles
  • data - website data storage folder
  • docs - application documentation (markdown files)
  • app/config - application configuration files
  • app/config/vhost - application virtual host configuration files (apache and nginx supported)
  • bin/cli.php - symlink to command-line runner in app/lib/App/CLI.php' which uses routes in app/config/routes-cli.ini`
  • app/en/templates/error/ - these files are standard php includes, not f3 templates, used by the error handler function
  • app/en/templates/error/debug.phtml - debug error page (if DEBUG=3)
  • app/en/templates/error/404.phtml - 'friendly' file not found page
  • app/en/templates/error/error.phtml - 'friendly' error page
  • app/lib/FFCMS/App - Base Application Classes
  • app/lib/FFCMS/Models - MVC Models
  • app/lib/FFCMS/Controllers - MVC Controllers
  • app/lib/FFCMS/Controllers/Api - MVC Rest API Controllers
  • app/lib/FFCMS/Helpers - Auxillary helper functions and utility libraries specific to the project
  • app/lib/FFCMS/Traits - Shared class traits
  • app/lib/FFCMS/CLI - Controllers for when executing in a command-line environemnt

Supplemental Files/Paths

Used for bootstrapping the application and generic enough to be separate from the main project.

External Libraries

  • DICE dependency injection container
  • Climate is used for the CLI utility methods.
  • Wixel GUMP for data validation
  • Retry for retrying failed operations
  • PHPMailer for outgoing emails
  • Whoops for nicer error handling if level of DEBUG=4
  • php-exif for parsing EXIF data in images

Javascript Libraries

-- http://www.urunu.com

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].