Code Monkey home page Code Monkey logo

schnoog / phpboilerplate Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 1.0 3.37 MB

A boilerplate for php webapps, without the need to go object orientated for every single step (using f.e. smarty , gettext i18n , bootstrap 4 , jQuery Validation )

License: MIT License

PHP 25.57% Smarty 14.04% Shell 0.06% CSS 5.42% JavaScript 54.80% Python 0.11%
php php-boilerplate php-applications skeleton skeleton-application smarty-template-engine i18n mysql composer bootstrap

phpboilerplate's Introduction

PHPBoilerPlate

What's that?

A boilerplate for php webapps, without the need to go object orientated for every single step.

It includes

  • User registration
  • User management
  • OAuth implementation
  • Cookie and Session Management
  • Multilanguage support (i18n, gettext. Supplied languages: en_GB & de_DE)
  • XSS and CSRF protection
  • Easy routing
  • Input validation in jQuery and php (with an interface function)
  • Growing documentation (within base installation)
  • Page generation (you decide if the new created page is automatically created with an ajax backend)
  • ACL for pages and navigation tree entries

The following libraries and plugins are used:

Requirements

  • A webserver capable to run php (with intl extension, PHP 7.1+, PDO extension , OpenSSL extension)
  • A MySQL database server (MySQL 5.5.3+ or MariaDB 5.5.23+)
  • To use internationalisation, you may need to run locale-gen on your linux server
  • composer

Prerequisites

  • You need the login data to an empty mysql database
  • You need the login data to an email server

Installation

The installation directory should not be web accessible. Only the public folder needs to be web readable.

I suggest to install this boilerplate over composer. This will ensure random salts are defined for the hashing functions.

Install with composer

To install the boilerplate, run this within the target directory

composer create-project schnoog/boilerplate . dev-master

or set a target directory

composer create-project schnoog/boilerplate targetdir dev-master

Installation with git or Download

  • Open the console and change the directory to the target directory, where you want to create the checkout

Get the files

git clone https://github.com/schnoog/PHPBoilerPlate.git .

or download the package and unzip it

https://github.com/schnoog/PHPBoilerPlate/archive/master.zip

Create the configuration

This can be done by a little helper script

php ./appconsole create

or by hand copy the distributed example

cp app/config/main_config.php.dist app/config/main_config.php

replace SECSALT1 and SECSALT2 with random strings by hand.

Configuration

Please adjust the settings in

app/config/main_config.php

to match your needings.

Initialization

Now you need to populate the database. This can be done by a little helper script

php ./appconsole db

or by importing each NUM_xxxx.sql file within app/SETUP/ (starting from 001_....)

mysql DATABASE < app/SETUP/001_UserTables.sql
mysql DATABASE < app/SETUP/002_PageStructure.sql
...
...

Done

You should now be able to access the system. The administrator login is Username: [email protected] Password: 1234abcd

Updates

I suggest to use the "php ./appconsole db" to install and update the database. This will set a database version tag to be able to update the database without dataloss in later releases.

phpboilerplate's People

Contributors

schnoog avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

juangarcia4ks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.