All Projects → ivoba → Superleansilexplate

ivoba / Superleansilexplate

Silex Superlean Starter

Labels

Projects that are alternatives of or similar to Superleansilexplate

Pimple
A small PHP dependency injection container
Stars: ✭ 2,491 (+3983.61%)
Mutual labels:  silex
silex-example
silex-example.pagodabox.com/
Stars: ✭ 13 (-78.69%)
Mutual labels:  silex
Silex Skeleton
A skeleton to get started with Silex
Stars: ✭ 805 (+1219.67%)
Mutual labels:  silex
silex-ddd-skeleton
A simple skeleton of silex application using ddd arquitecture
Stars: ✭ 19 (-68.85%)
Mutual labels:  silex
hello-world-app-php-silex
Hello World sample app in PHP and Silex
Stars: ✭ 23 (-62.3%)
Mutual labels:  silex
Silex
[DEPRECATED -- Use Symfony instead] The PHP micro-framework based on the Symfony Components
Stars: ✭ 3,646 (+5877.05%)
Mutual labels:  silex
Silex Webprofiler
Stars: ✭ 207 (+239.34%)
Mutual labels:  silex
Silex
Silex is a static website builder in the cloud.
Stars: ✭ 958 (+1470.49%)
Mutual labels:  silex
ResponsibleServiceProvider
Silex service provider for seamless HTTP content negotiation
Stars: ✭ 35 (-42.62%)
Mutual labels:  silex
Silex Kitchen Edition
This project is a sample or a bootstrap silex application
Stars: ✭ 645 (+957.38%)
Mutual labels:  silex
sm-groupcheck-web
GroupCheck web API.
Stars: ✭ 14 (-77.05%)
Mutual labels:  silex
silex-starter-pack
A starter pack for beginning development with the Silex PHP framework. Includes a basic admin control panel, and user login system.
Stars: ✭ 12 (-80.33%)
Mutual labels:  silex
Bolt
Bolt is a simple CMS written in PHP. It is based on Silex and Symfony components, uses Twig and either SQLite, MySQL or PostgreSQL.
Stars: ✭ 4,136 (+6680.33%)
Mutual labels:  silex
Slugify
Converts a string to a slug. Includes integrations for Symfony, Silex, Laravel, Zend Framework 2, Twig, Nette and Latte.
Stars: ✭ 2,697 (+4321.31%)
Mutual labels:  silex
Cache Service Provider
A Cache Service Provider for Silex, using the doctrine/cache package
Stars: ✭ 23 (-62.3%)
Mutual labels:  silex
Transport
Swiss public transport API
Stars: ✭ 215 (+252.46%)
Mutual labels:  silex
FacebookServiceProvider
Silex service provider that injects the Facebook SDK as a service
Stars: ✭ 28 (-54.1%)
Mutual labels:  silex
Silex
something to help you spark
Stars: ✭ 61 (+0%)
Mutual labels:  silex
Silexstarter
Starter app based on Silex framework with mvc and modular arch, scaffold generator, and admin panel
Stars: ✭ 11 (-81.97%)
Mutual labels:  silex
Pinboard
Realtime PHP monitoring system which aggregates and displays Pinba data.
Stars: ✭ 479 (+685.25%)
Mutual labels:  silex

Superlean Silex Starterplate

As Silex is end of life this boilerplate is abandoned!

Build Status

This project is supposed to be a lean starterkit for your Silex app.
Its superlean, so basically only essential things are included.

If you need full power try: https://github.com/lyrixx/Silex-Kitchen-Edition

It aims mainly at simple applications that need routing and just some additional logic.
F.e. its a good container for javascript driven apps that get their data through API calls.

It provides:

  1. Web infrastructure
  1. REST Api infrastructure
  2. Console infrastructure
  3. Misc

Install

Via composer create-project

composer create-project -s dev ivoba/superleansilexplate PATH/TO/YOUR/APP 2.*
cd PATH/TO/YOUR/APP

If you want to base your app on this starter i recommend to do the following after create-project.

  • remove .git and init your own git (you should be prompted for this by composer already)
  • remove composer.lock from .gitignore, so you can store your dependency lock
  • you might want to replace the namespace from "Superleansilexplate" to something more custom

Requirements

  • bower, composer will call bower install

Usage

Api and web are designed to run on their own resp. subdomains with their resp starting point in /web. If you want to only have one starting point copy this to web.php:

$api = require __DIR__ . '/Controller/api.php';
$app->mount('/api', $api);

Config

In dev environment we use dotenv for configuration, so you can use a .env file in the project root to mimic Env vars.

Templates

Start hacking in resources/views/*.twig

Controller

Start hacking in src/Controllers/*.php

Provider

Add provider in src/app.php

Cli Commands

Create cli commands in src/Command and
register them in src/cli.php

Run

Run it with the php integrated webserver: http://silex.sensiolabs.org/doc/web_servers.html
or create a apache / nginx vhost.

Run Web

 php console server:run

 # in prod env
 php console server:run -e prod

and open http://127.0.0.1:8000

Run Api

 php console server:run -i api

and open http://127.0.0.1:8000

Run Cli

SILEX_ENV=dev php -d variables_order=EGPCS console silex:hello-world
# for cache clear
php console cache:clear

Tests

vendor/bin/phpunit

Heroku

Superleansilexplate is heroku ready.

Because we utilize bower, you will need to run multipacks while creating your heroku app:

heroku create --buildpack https://github.com/heroku/heroku-buildpack-multi

Then just initialize your heroku app as stated in the docs and push it:

git push heroku master

Docker

A docker setup for apache with php7 is provided.

For using docker in dev environments run docker-compose and check on http://localhost:8088:

docker-compose up

For a production build run:

docker build -t superleansilexplate -f docker/apache-php7-prod/Dockerfile . docker run -it --rm -p 8088:80 --env SILEX_ENV=prod --name run-superleansilexplate superleansilexplate

TODO:

  • yeoman setup with grunt/gulp usage
  • scrutinizr
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].