Giter Site home page Giter Site logo

spout's Introduction

Mackstar.Spout

The resource centric CMS written in BEAR.Sunday and Angular.js

Why do we need another PHP CMS?

  • To create a resource centric CMS.
  • To make all pages, blog posts, menus and blocks available as resources.
  • To integrate Angular.js for a better experience.
  • To have a fully responsive CMS.
  • To create a CMS with more speed.
  • To allow overriding of core CMS activity using DI and AOP.
  • To provide a platform that modern PHP developers are more comfortable developing in.
  • To maximise integration with other composer based PHP libraries.
  • Everything is a resource, you can manipulate anything in any REST client.

Contributing

This project will be hard to get off the ground without some of you pitching in! It is about writing a CMS framework that can be extended but one that developers will love using. Spout has been designed to be easy to test and is very much 'Test driven'.

Other tools

  • phpunit.xml for phpunit
  • .travis.yml for Travis CI
  • Grunt
  • Angular.js
  • Karma
  • Jasmine
  • Twitter Bootstrap

Requirements

  • PHP 5.4+

Getting started

Installation

Edit database configuration files in apps/Admin/var/conf/{environment}.php to match up to your database.

Database

####SQLite

<?php

$config = [
    'driver' => 'pdo_sqlite',
    'path' => '../../test_db.sqlite3', // sets DB location to root path
    'charset' => 'UTF8'
];

return [
    'master_db' => $config,
    'slave_db' => $config
];

####MySql

My production.php file looks something like this:

// @Named($key) => instance
$config = [
    // database
    'master_db' => [
        'driver' => 'pdo_mysql',
        'host' => 'localhost',
        'dbname' => 'spout',
        'user' => $id,
        'password' => $password,
        'charset' => 'UTF8'
    ],
    'slave_db' => [
        'driver' => 'pdo_mysql',
        'host' => 'localhost',
        'dbname' => 'spout',
        'user' => $slaveId,
        'password' => $slavePassword,
        'charset' => 'UTF8'
    ],
    // constants
    'app_name' => __NAMESPACE__,
    'tmp_dir' => "{$appDir}/var/tmp",
    'log_dir' => "{$appDir}/var/log",
    'lib_dir' => "{$appDir}/var/lib",
    'upload_dir' => "{$appDir}/var/www/uploads"
];


return $config;

Apache

Set your DocumentRoot to "/Users/MackstarMBA/Sites/Mackstar.Spout/apps/Admin/var/www"

Command line - from project root.

$ composer install
$ sudo npm install -g grunt-cli
$ npm install
$ grunt migrate -env={environment} // By default this is development
$ grunt phpunit // to run PHP tests
$ grunt karma // to run Javascript tests

Create Admin user - only able to do when no user is available

curl -XPOST 'http://localdomain/api/users/index' -d '{
    "email": "[email protected]",
    "password": "secret",
    "name": "Richard McIntyre",
    "role": {
        "id": "1",
        "name": "Admin"
    }
}';

Admin Access

You can access the control panel at

http://localdomain/spoutadmin

Migration

 $ vendor/robmorgan/phinx/bin/phinx migrate -p php -c config.php -e development

Rollback

$ vendor/robmorgan/phinx/bin/phinx rollback -e testing -c config.php -t 0

Environments

  • development
  • testing
  • production

CSS

CSS files live in apps/Admin/var/lib/less and you can compile the css by running

grunt css

spout's People

Watchers

James Cloos avatar NEKOGET ( Takako Miyagawa ) avatar

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.