PHP Skeleton Project - Skelly
Tired of setting up small sites that need user login? Want a easy to use PHP Project Bootstrap with a pre-installed Admin Template for a UI? Well look no further. https://github.com/geggleto/skelly (Bam!).
Visuals
Let's take a look at what it looks like.
Technologies
A quick look in the composer.json shows all the things you will likely need for your project.
{
//...
"require": {
"slim/slim": "^3.8",
"slim/twig-view": "^2.3",
"php-di/slim-bridge": "^1.0",
"doctrine/orm": "^2.5",
"vlucas/phpdotenv": "^2.4",
"ramsey/uuid-doctrine": "^1.4",
"mailgun/mailgun-php": "^2.3",
"php-http/curl-client": "^1.7",
"guzzlehttp/psr7": "^1.4",
"paragonie/random_compat": "^2.0"
}
//...
}
Overview
On the surface, this skeleton includes Slim v3 with TWIG and PHP-DI. Slim 3 is a super light-weight micro service framework. Twig is an amazing templatationg library. PHP-DI is a suberb container that supports auto-wiring.
For persistence this package uses Doctrine's ORM with Annotations. Doctrine supports a variety of configurations including XML and YAML.
For Email this package uses Mailgun. I recommend mailgun to everyone as it's cheap and reliable (first 10,000 emails are free which is enough for almost everyone).
For Configuration I have chosen to use phpdotenv. I love this package as it's super simple to use even in production (he doesn't recommend it, and I mostly agree however when you have a choice of either spending more time on Dev-Ops or coding; I choose coding 100% of the time).
Giver a Try
Installation
php composer.phar create-project geggleto/skelly [my-app-name]
Configuration
- Copy
config/.env.sample
toconfig/.env
and fill in the details - Use
composer db
to sync the database schema - Create your users,
php cli/newUser.php <email> <password> <firstName> <lastName>
- Login and Build!