PHP Classes

pH7 PHP Web App Boilerplate: Start a Web app development using boilerplate code

Recommend this page to a friend!
     
  Info   Example   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 72 All time: 10,241 This week: 51Up
Version License PHP version Categories
ph7webappboilerplate 1.0.0GNU General Publi...5PHP 5, Libraries, Applications
Description 

Author

This package can start a Web app development using boilerplate code.

It provides a basic structure of an application that developers can quickly use to create new PHP Web applications.

This package uses other packages from the Symfony framework, Silex, and Twig.

Picture of Pierre-Henry Soria
  Performance   Level  
Name: Pierre-Henry Soria <contact>
Classes: 49 packages by
Country: United Kingdom
Innovation award
Innovation award
Nominee: 18x

Winner: 3x

Example

<?php

namespace PH7\Boilerplate;

use
Silex\Application;

require
dirname(__DIR__) . '/vendor/autoload.php';

$app = new Application();

$app['env'] = !empty($_ENV['env']) ? 'dev' : 'prod'; // phpunit.xml will set it to true
require dirname(__DIR__) . '/app/config/' . $app['env'] . '.php';
require
dirname(__DIR__) . '/app/bootstrap.php';
require
dirname(__DIR__) . '/app/routes.php';

$app->run();


Details

pH7 WebApp Boilerplate

A Powerful, Modern and Lightweight PHP 7.1+ Boilerplate to build quickly robust web apps or small/medium SaaS.

pH7WebAppBoilerplate is based on Silex. Since Symfony 4, it is now recommended to use Symfony 4 instead (Symfony 4 is as lightweight as using Silex). Silex isn't maintained anymore, so this project is now marked as archived.

The Problem

It is always tough to directly start a new "clean-code" project from scratch based on good programming principles. We always need to think about the best architecture/patterns for the project and spending time looking for the good libraries.

The Solution

pH7 Boilerplate gives the best coding practices for you, with already everything setup (.gitignore, .htaccess, composer file), the project already configured (for Silex and Twig and has all the good/useful libraries included that will make your new web app the best!

Simply clone it, and start developing your great web app!

Boilerplate Features

Installation

  • Be sure PHP 7.1 or higher is installed
  • Clone the repo
    git clone git@github.com:pH-7/pH7WebAppBoilerplate.git
    cd pH7WebAppBoilerplate
    
  • Install Composer (https://getcomposer.org)
  • Install the Boilerplate dependencies with `composer install`

About Me

I'm Pierre-Henry Soria, a passionate Software Engineer and creator of pH7CMS for instance.

Where to Contact Me?

You can by email at pierrehenrysoria+github [[AT]] gmail [[D0T]] com

License

MIT License. Enjoy :smiley:


  Files folder image Files (17)  
File Role Description
Files folder imageapp (2 files, 1 directory)
Files folder imagesrc (1 directory)
Files folder imagetests (1 file, 1 directory)
Files folder imageviews (3 files)
Files folder imageweb (4 files)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file phpunit.xml.dist Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files (17)  /  app  
File Role Description
Files folder imageconfig (2 files)
  Accessible without login Plain text file bootstrap.php Example Example script
  Accessible without login Plain text file routes.php Example Example script

  Files folder image Files (17)  /  app  /  config  
File Role Description
  Accessible without login Plain text file dev.php Aux. Auxiliary script
  Accessible without login Plain text file prod.php Aux. Auxiliary script

  Files folder image Files (17)  /  src  
File Role Description
Files folder imageController (1 file)

  Files folder image Files (17)  /  src  /  Controller  
File Role Description
  Plain text file MainController.php Class Class source

  Files folder image Files (17)  /  tests  
File Role Description
Files folder imageController (1 file)
  Plain text file AppTest.php Class Class source

  Files folder image Files (17)  /  tests  /  Controller  
File Role Description
  Plain text file MainControllerTest.php Class Class source

  Files folder image Files (17)  /  views  
File Role Description
  Accessible without login Plain text file error.twig Data Auxiliary data
  Accessible without login Plain text file index.twig Data Auxiliary data
  Accessible without login Plain text file layout.twig Data Auxiliary data

  Files folder image Files (17)  /  web  
File Role Description
  Accessible without login Plain text file .htaccess Data Auxiliary data
  Accessible without login Plain text file index.php Example Example script
  Accessible without login Plain text file index_dev.php Example Example script
  Accessible without login Plain text file robots.txt Doc. Documentation

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:72
This week:0
All time:10,241
This week:51Up