Skip to content

mrkodssldrf/TypiCMS

 
 

Repository files navigation

TypiCMS

Build Status Latest Stable Version License Scrutinizer Code Quality SensioLabsInsight

TypiCMS is a multilingual content management system built with Laravel 4.2.
Bower and gulp are used for assets management and user interface is build with Bootstrap 3 with Less.

Demo

TypiCMS screenshot

Table of contents

Features

URLs

This kind of urls are managed by the CMS :

Modules:

  • /en/events/slug-in-english
  • /fr/evenements/slug-en-francais

Pages:

  • /en/parent-pages-slug-en/subpage-slug-en/page-slug-en
  • /fr/parent-pages-slug-fr/subpage-slug-fr/page-slug-fr

Requirements

  • PHP >= 5.4.0
  • MCrypt PHP Extension
  • Memcached or APC

Installation

Quick installation

  1. Install Node.js, Bower and gulp

  2. Create an empty MySQL database

  3. Create a new project

    composer create-project sdebacker/typicms mywebsite
    
  4. Enter newly created folder

    cd mywebsite
    
  5. DB Migrate and seed, npm install, bower install and chmod dirs

    php artisan typicms:install
    
  6. Go to http://mywebsite.local/admin and log in:

    • email: admin@example.com
    • password: admin

Manual installation

  1. Create an empty database

  2. Download TypiCMS

    git clone https://github.com/sdebacker/TypiCMS.git mywebsite
    
  3. Enter newly created folder

    cd mywebsite
    
  4. Set a new encryption key

    php artisan key:generate
    
  5. Change cache prefix in app/config/cache.php

    php artisan cache:prefix yourCachePrefix
    
  6. Install dependencies with Composer

    composer install
    
  7. Fill in your database credentials in env.local.php

  8. Rename env.local.php to .env.local.php

    mv env.local.php .env.local.php
    
  9. Migrate and seed Database

    php artisan migrate --seed
    
  10. Set permissions

    chmod -R 777 app/storage
    chmod -R 777 public/uploads
    
  11. In development mode you should run

    php artisan debugbar:publish
    
  12. Go to http://mywebsite.local/admin and log in:

  • email: admin@example.com
  • password: admin

Bower & Gulp

In order to work on assets, you need to install Node.js, Bower and gulp, then cd to your website folder and run these commands:

  1. Install bower packages according to bower.json (directory app/assets/components)

    bower install
    
  2. Install Gulp packages according to gulpfile.js (directory node_modules)

    npm install
    
  3. Compile admin and public assets

    gulp
    

Configuration

  1. Set available locales and default locale in app/config/app.php
  2. Cache driver is set to memcached, you can change it to apc in app/config/cache.php

Modules

Pages

Pages are nestable with drag and drop, on drop, uris are generated and saved in database. A page has routes for each translation.

Menus

Each menu have nestable entries. One entry can be linked to a module, page, URI or URL. You can get a menu HTML formated with Menus::build('menuname'). An icon can easily be added to a menu item by filling icon class field.

Projects

Projects have categories, projects urls follows this pattern : /en/projects/category-slug/project-slug

Categories

Categories has many projects.

Tags

Tags are linked to projects and use Select2 js plugin.
It has many to many polymorphic relations so it could easily be linked to other modules.

Events

Events have starting and ending dates

News

Simple news module with linked files/images galleries.

Contacts

Frontend contact form and admin side records management.

Partners

A partner has a logo, website url, title and body content.

Files

Files module allows you to upload multiple files, it uses DropzoneJS.
Thumbnails are generated on the fly with Croppa.

Galleries

You can create as many galleries as you want, each gallery has many files.
Galleries are linkable to any module item through a polymorphic many to many relation, for now only News module is properly set up to support galleries.

Users and groups

Sentry 2 is used to manage users, groups and permissions.
Users registration can be enable through the settings panel (/admin/settings).

Blocks

Blocks are usefull for custom content to display in your views. You can get content of a block with Blocks::build('blockname').

Translations

Translations can be store in database through the admin panel (/admin/translations).
Each cell of the translation table is editable in place.

You can call DB translation everywhere with Lang::get('db.Key'), trans('db.Key') or @lang('db.Key').

Sitemap

Route sitemap.xml generate a sitemap file in xml format.
Configure modules to add to the site map in app/config/sitemap.php file.

Settings

Change website title, and other options trough the settings panel. Settings are saved in database.

Facades

Modules that have their own Facade: News, Events, Projects, Places, Partners, Galleries, Blocks and Menus.

In your views, you can call for example News::latest(3) to get the three latest news. Check available methods in each module's repository.

Artisan commands

Commands are located in app/TypiCMS/Commands

  • Initialisation of TypiCMS

    php artisan typicms:install
    
  • Set cache key prefix in app/config/cache.php

    php artisan cache:prefix yourCachePrefix
    
  • Initial migration and seed

    php artisan typicms:database
    

Roadmap

  • Improve user interface
  • Make modules as packages
  • Build more tests

Contributing

Feel free to fork and pull request!
TypiCMS follows PSR-2 standard.

Thanks to elvendor and jekjek for their contributions!

Testing

Some admin controllers are actually tested, more tests needed.

License

TypiCMS is an open-source software licensed under the MIT license.

About

Multilingual CMS built with Laravel 4.2

Resources

License

Stars

Watchers

Forks

Packages

No packages published