Make your ideas a reality

Platform PHP for web artisans. An application 100% Laravel


Summary

  • installation
  • included in this package
  • First steps
  • Following guidelines
  • A demo?
  • Licence
  • General Concept
  • Play with code
  • How to manipulate code in templates blade?
  • How to use toolkits code and Apps?
  • multilingual website
  • How are managed user's permissions ?
  • What is a role? and How are managed roles of users?
  • Installation

    Easy installer solution simplecommandinstall :

    PHP version 5.5.9 or higher must be installed.
    A webserver http must be configured.
    Mysql database instance must be running.

    Composer must be installed : https://getcomposer.org/
    git must be installed : https://git-scm.com/
    Configure your virtual host.
    by default the / redirect to install page groovel, and /admin to the admin console, /blogs to blog. Log with your account you create.


    download the installer by executing the following command :

    composer create-project groovel/simplecommandinstaller --stability dev

    Then follow :

    1.) First configure the file with your correct parameters to connect to mysql in: simplecommandinstaller/config/.env file:

    DB_CONNECTION=mysql
    DB_HOST=
    DB_PORT=
    DB_DATABASE=
    DB_USERNAME=
    DB_PASSWORD=

    2.) run the command :

    your-project-name : the name of your future application.

    php groovelinstall createproject=your-project-name

    3.) it will install a ready platform in directory simplecommandinstaller/dist/
    logs are in directory log.
    the database will be created with DB_DATABASE name.
    default account john/john as admin don t forget to change password! or to delete account.
    So each steps you see :


    Each steps of the install will be showng in dir /packages.log.



    If all success you will see on /:



    Finished!

    included in this package

    • Bootstrap : to have clean css design.

    • codemirror : to edit the code template online.

    • filemanager : to download , manage files on server.

    • tinymce : code assistant editor for person which doesn't like html.

    • jquery : to play with HTML dom and Ajax.

    • Some stuffs to reuse in your code :

    • toolkits code: contact form, nav bar.

    • toolkits app: blog, forum.

    First steps

    After install, if everything is ok in your config (virtualhost http, access database)
    you will find install page on/


    you will find by default a nice blog on "/blogs"

    and you will can accessible to backend console on /admin


    To have a quick view of where to start try to :
      create some blog posts, you must log on first.
      post some comments on blog.
      add new Content types and update, delete
      add new Contents and update, delete
      create,delete,update users
      administrate users permission
      search contents

    Let's play
     connect to your account
     post some blogs contents :


    you will find an editor tinymce where you add some contents
    don t forget to check publish box to see your post.



    You will find a nice starter look.



    Following guidelines

    Groovel has been reviewed in the way of how users will use it.
    Start to see the blue menu links, is better to understand.
    When you build a web site, the workflow is :

    Create a layout :general template (layout) of site which contains Head( import of css js) Header (title, introduction),footer
    Different fields :
      Choose your layout : your layout must be attached to one template(the generic design of your site),
      you see all templates that are available with groovelcms
      (search in resources/views and starter-templates, a collection of blade sources)
      Language : groovel can serve layout in your own language.
      Logo : yours
      Title : yours
      Header : yours
      Footer : yours
    All these properties should be referenced in the template code.



    Create a menu : A nav bar helps you to navigate through pages.



    Easy to understand, you can build a hiearchical menu.

    Create some pages :



    You need to fill the following fields
      title : the title of your page.
      page name : the name of your page.
      url : the url to access to your page.
      type : in the groovel package you have a predefined set of layouts , choose one to duplicate an existent template page.
      Later we will explain how to modify it.This is how is a layouts blade example for example blog layout
      You see a name called index.blade.php, it is an important file, and must be here for all your templates
      that you will create for groovelcms.
      When you click on save page , it creates and copies the index.php in a new file called with name of page you choice.



    activate : Enable it in order to access it.
    Design some pages : open a page pages->list pages -> click for edit on the pencil symbol.
    You will see the picture below:


    This is an extract page of a blog , in the black section , you can edit the code and can modify it online!
    Add contents : to your page.



    Select which kind of content you want to add.




    The most important fields to understand are :
      layout: Your content will be attached to one layout for example product will be attached to ecommerce layout, and blogpost
      to blog layout.
      Groovel can manage several layout, several websites in one instance.
      language: Groovel can manage different country language.
      weight: This is an important information, if you create a list of blog post content, the biggest value of weight you set,
      means that your blogpost will be shown first.
      tag: it is a key word used by the search engine to find your content.
      description: This is important to fill this field in order to know of what contents are.
    Create and design a content type and create contents :



    You can create whatever you want :


    You drag and drop widget on the left into the surface area.
    Click on the pencil.


    Set a field name in the section title, we just had a field text.


    You can no create some contents with :

    Play with code

    How to link the contents that we add to the page.?
    the menu to a page.?
    the layout to a page.?
    So in this section we open a page template.



    As you see you get session variables contents which contains all the contents and parsed it.
    Same for layouts and menus :

    A demo?

    Very simple all the groovel website , blog and ...are built with groovelcms. :-)

    Licence

    All Groovel code is Copyright 2014 - 2015 by the original author.
    Please make a link to http://wwww.groovelcms.com in your program.
    and refer the name groovel
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or (at
    your option) any later version.
    This program is distributed in the hope that it will be useful, but
    WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
    or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
    for more details.
    You should have received a copy of the GNU General Public License
    along with this program as the file LICENSE.txt; if not, please see
    http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
    Groovel is a registered trademark of Varnier Francois.
    Groovel includes works under other copyright notices and distributed
    according to the terms of the GNU General Public License or a compatible
    license

    General Concept

    Groovel workflow is designed as :



    Middlewares check requests
    The accesses are controlled in accordance of users rights
    The pages are built and generated by the blade template Engine.

    How to manipulate code in templates blade?

    A short introduction of the system. The laravel package is organized as follow :



    All your pages are in directory ressources/views, this these pages that are shown on website
    Images,css etc..are on the public packages
    The core groovel package is in directory vendor.
    For more go and visit Laravel Documentation
    The package template is designed as the follow rules :
    Look the code in a blade template page



    We reference other page in a beautifull way : @extends('groovelcms.base.core') and contents are accessed by sessions variables $contents.

    For more about blade visit Laravel Documentation Blade

    How to use toolkits code and Apps?

    Starter templates


    When i start an application i don't like to start from nothing,
    Starter apps where you can customized as you want is a good way , blog is one that every websites have and it is a good way to show how to implement new features.
    Groovelcms proposes in its package a simple blog :
    • where you can play to post blogs contents
    • play with language content
    • see how to interact with groovel.
    These templates are in the follow directory :

    Toolkits apps

    In my development work and jobs , i mutualize code and design in groovelcms , a small directory you will find blade for login,contact form, menu....

    You can include in your own code and share it with other and complete it too!



    Here here an example of how to use toolkit code.Look at the @include



    multilingual website

    Depending of the website extension we redirect to english or french contents. For the moment only french and English languages with extension mapping to .com and .fr are done. More coming soon!

    How are managed user's permissions ?

    How are managed the rules permissions of a user?

    If you open the panel view system page by example:


    The fields that we focus on: action

    A set of pages belongs to a type ex: groovel, in order to discriminate groovel pages from other pages than users can create
    When you access to a page, it is in order to make an action : CRUD : Create,Read,Update,Delete
    In our example, when you access to dashboard, it is in order to make a read action
    To each user you define a role which is a set of permissions.

    PUBLIC is the default role which is giving to new users.
    When a user accesses to an uri, the system reads the user's role, load its permissions and compares if
    uri and action match with uri and action defined in the page
    If not the access is refused.

    What is a role? and How are managed roles of users?

    We have seen how we manage the users permissions, now we introduce the concept of users roles
    In groovel we can define some roles, they skip permissions of users, now only one role is defined: ADMIN, but you can define others.
    The role ADMIN gives to the user all permissions , it's avoid to set all permissions rules.


    As we can see it is easier to define role , but you must keep in mind that you will remember, what you can do with a role.