All Projects → vijinho → F3 Boilerplate

vijinho / F3 Boilerplate

Licence: other
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.

Projects that are alternatives of or similar to F3 Boilerplate

Android Templates And Utilities
Collection of source codes, utilities, templates and snippets for Android development.
Stars: ✭ 1,099 (+1032.99%)
Mutual labels:  skeleton
Php Library Starter Kit
A tool to quickly set up the base files of a PHP library project.
Stars: ✭ 75 (-22.68%)
Mutual labels:  skeleton
App
Spiral Framework Skeleton HTTP Application: Queue, Console, Cycle ORM
Stars: ✭ 90 (-7.22%)
Mutual labels:  skeleton
Skeleton
🔨 Nepxion Skeleton is a generic codes and files generator based on freemaker for any text formats, and provides skeleton of Spring Cloud with docker deployment 基于Docker & Spring Cloud的代码和文件的脚手架生成平台
Stars: ✭ 61 (-37.11%)
Mutual labels:  skeleton
Creature godot
2D Skeletal Animation Creature Runtime for Godot Engine
Stars: ✭ 70 (-27.84%)
Mutual labels:  skeleton
Open Desk Lamp Firmware
Open source firmware for the xiaomi desk lamp
Stars: ✭ 78 (-19.59%)
Mutual labels:  lamp
Desk Lamp Alternative Firmware
An alternative firmware for the Mijia Xiaomi Desk Lamp
Stars: ✭ 54 (-44.33%)
Mutual labels:  lamp
Lamp Yum
Yum Install LAMP(Linux + Apache + MySQL/MariaDB + PHP ) for CentOS
Stars: ✭ 93 (-4.12%)
Mutual labels:  lamp
Skeleton
A ready-to-use CodeIgniter skeleton with tons of new features and a whole new concept of hooks (actions and filters) as well as a ready-to-use and application-free themes and plugins system. Facebook Page: http://bit.ly/2oHzpxC | Facebook Group: http://bit.ly/2o3KOrA. Help me carry on making more free stuff → http://bit.ly/2ppNujE ←
Stars: ✭ 74 (-23.71%)
Mutual labels:  skeleton
Laravel Package Maker
Get a 📦 skeleton and all other `make` commands from laravel base for package development.
Stars: ✭ 89 (-8.25%)
Mutual labels:  skeleton
Flui
A powerful UI framework for Google Flutter.
Stars: ✭ 1,153 (+1088.66%)
Mutual labels:  skeleton
Slim3
Slim Framework 3 Skeleton Application
Stars: ✭ 70 (-27.84%)
Mutual labels:  skeleton
Dredd Example
Example application using Dredd and CI
Stars: ✭ 79 (-18.56%)
Mutual labels:  skeleton
Familamp
Cloud-synchronized lamps
Stars: ✭ 59 (-39.18%)
Mutual labels:  lamp
React Native Skeleton Content Nonexpo
A customizable skeleton-like loading placeholder for react native projects not using expo.
Stars: ✭ 92 (-5.15%)
Mutual labels:  skeleton
Skeleton Vue
A skeleton for building Spatie's Vue components
Stars: ✭ 55 (-43.3%)
Mutual labels:  skeleton
Sanic Nginx Docker Example
Sanic + Nginx + Docker basic example
Stars: ✭ 77 (-20.62%)
Mutual labels:  skeleton
Bodyskeletontracker
Human body skeleton detection an tracking from video camera in real time. It was developed for an Orbbec Astra camera DRGB (Depth-RGB), uses the OpenNI2 driver, it also works with Asus Xtion and Prime sense. It works with normal webcam too, in the case of background is smooth and white.
Stars: ✭ 94 (-3.09%)
Mutual labels:  skeleton
Setup
My own front end web development set up, covering everything from operating system to analytics.
Stars: ✭ 93 (-4.12%)
Mutual labels:  lamp
Awesome Skeleton
🎉 Release 3.0 is released! Awesome Skeleton for modern development on PHP 7.4+ (incl. PHP 8). Contains quality tested packages, thoughtful structure and everything you need to develop microservices.
Stars: ✭ 83 (-14.43%)
Mutual labels:  skeleton

f3-boilerplate

Use the branch skeleton-nodb-nobs for a skeleton setup with no database features enabled (commented-out), no bootstrap files and empty .md files.

Travis CI Build Status Code Coverage Scrutinizer Code Quality

f3-boilerplate homepage screenshot

Skeleton PHP7 Fatfree-framework MVC website codebase.

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

## Usage

  • Clone the project
  • Change the app/config/default.ini and config.example.ini files to suit your project - create your local setup config.ini file from this.
  • Change the files in app/lib/App and the associated routes in app/config/routes-*.ini to suit.
  • Run composer dump to update your the autoloader with your newly created classes

PHP7 only now! - see CHANGELOG.md

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.

  • 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:[email protected]: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

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

  • Copy app/config/config.example.ini to config.ini
  • Edit app/config/config.iniand add anything extra from default.ini for overrides
  • In the top level folder run composer install

### Database

  • Create a database dumpfile to auto-import in data/db/sql/create.sql (set ini option for db.create=true)

Folders & Permissions

Setup empty website folders as follows:

mkdir -p tmp/cache tmp/sessions tmp/uploads tmp/logs data
sudo chown -fR www-data:www-data tmp data
sudo chmod -fR 777 tmp data

Description of Project Layout

Note: The files that were in lib/FFMVC have now been split-out into their own repository https://github.com/vijinho/FFMVC 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/App/App.php - start fatfree project by including this file and executing Run();
  • lib/ - all external library files/classes
  • app/lib - local application-specific libraries
  • app/lib/App/Controllers - MVC Controllers
  • app/lib/App/Controllers/API - MVC Rest API Controllers
  • app/lib/App/CLI - Controllers for when executing in a command-line environemnt
  • 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 inapp/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
  • tests - unit tests see docs/TESTING.md

Supplemental Files/Paths

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

  • lib/FFMVC/App.php - Base Application Class to start/shutdown app
  • lib/FFMVC/App/Helpers - Auxillary helper functions and utility libraries specific to the project

External Libraries

  • DICE dependency injection container
  • Whoops for nicer error handling if level of DEBUG=4
  • Climate is used for the CLI utility methods.

SSL (Optional)

Test certificates in app/config/webserver/ssl/ Use Let's Encrypt to generate a real live valid SSL certificate for production environments.

Dummy certificate (example)

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

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

    SSLCertificateFile ssl/f3-boilerplate.crt
    SSLCertificateKeyFile ssl/f3-boilerplate.key

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

Running from the CLI

From the base folder run:

php app/lib/App/CLI.php /

The output will be:

CLI Script
FFCMS\CLI\Index::index
Hello World!
Finished.
Script executed in 0.048 seconds.
Memory used 2.29 MB.

-- 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].