Hello everyone, on Habré already for 6 years and only now decided to write my first post, although I am still not sure that this is a good idea.
Foreword
For more than 6 years I have been developing web applications, starting with
layout ,
javascript ,
php ,
python , etc., in general, for all the time I went through all the stages of creating a website from design in photoshop and ending with creating a full-fledged website.
')
Decision on your bike
In 2012, I was tired of using third-party CMS, some had a poor API, others had problems with the flexibility of templates, in general, each system took a lot of time to develop modules and I had the idea to create my own bike, although it is even more hemorrhoids, but in it I I can do everything as I like, programmer.
It was decided not to write from scratch, but to take as a basis the example of the implementation of modules from different CMS, which, it seemed to me, effectively cope with their task, as well as popular ready-made libraries, well, here is a list of what was included in the system:
- WolfCMS (Modules: pages, templates, snippets, settings, plugins, users)
- FlexoCMS (javascript, loading pages)
- OpenConstructor (Datasource module, Hybrid data (analog information blocks in Bitrix), organization of templates, widgets)
- Kohana framework as core
- Twitter Bootstrap as UI
- FontAwesome
- Ace as a code editor
- elFinder as a file manager
- Select2 for drop-down lists
- Fancybox for popup windows
- jQuery UI
- Dropzone
- jQuery Nestable to sort the page tree
- Backbone (Used in the list of plugins and for parts of pages)
- RedactorJS (free version) as a text editor
Well, a small list of difficulties that had to face for 2 years of developing the system alone:- Updating the kohana framework to the latest versions and catching related bugs. As a result, PSR-0 had to be abandoned, due to the difficulty of correcting the names of all classes and the names of their files. It does not give me rest to this day.
- In 2014, the third version of Twitter Bootstrap was released , I took a long time to last, but I still collected my strength and spent a week updating the HTML code of all the site templates for the latest version, the same goes for all the Font-Awesome icons, which changed syntax. This is all long and tedious.
- Layout of templates is the most unloved thing for me and in this connection the development of the system has sometimes been inhibited, since Sometimes I had to force myself to impose HTML pages on the interface and write JavaScript for it.
- The creative crisis also visited me once in half a year and wanted to abandon the project.
- Website creation for CMS. Due to the fact that I am developing one system, there is no extra money for the development of the OpenSource project and I had to force myself to make a website for my own system, which, as far as I remember, went through two designs for which $ 20 was spent and a lot time to write content, etc., which is already outdated ... I completely forgot about translating the site into English, which I did as well, the translation is terrible and I try once again not to think about how bad it is, but this is better than nothing .
- Creating a demo site. The first version of the demo site was super simple, it showed only a small part of all the possibilities, and due to the lack of time to redo it, he lived a very long time. This year a new version of the demo site was released, a template for $ 5 was also bought for it and most of the system features were implemented.
- System update. Until now, the problem with updating the database system and structure has not been solved. At the moment, this is partially resolved as follows. The Github API retrieves the system file tree and compares the size of each file, as well as comparing the local CMS version and the version number specified on the github, which helps the user to learn about the release of the new version, the database update module also produces monitoring changes in structure and in case of discrepancies helps to fix.
- Several silent videos were recorded that would help new users navigate the system.
About the system
And now I want to introduce my OpenSource system to you -
KodiCMS , which turned
2 years old on August 15, during this time
2175 commits were made,
250 issue was closed, although many were created by me, work on the system continues today.

Key features:
- Kohana framework core
- Backend UI based on Twitter Bootstrap 3.2.0 and PixelAdmin themes
- Dashboard with the ability to create widgets
- Expansion with plugins
- Modularity
- Using Observer to extend basic functionality
- Handling erroneous URLs. (If the visitor made a URL error, most likely he will not receive in response: Page not found)
- Widgets
- File manager elFinder
- Ace Visual Editor
- Differentiation of rights for users (ACL)
- Integration with soc. by networks
- Mail Templates and Events for Email Notifications
- Running tasks on a schedule
- Installer
- REST API
- Caching (file, sqlite, apc, memcache, mongodb)
- Ability to select the session storage location (native, cookie, database)
- Creating your own sections (News, Articles, etc.)
Unfortunately, the bottleneck of the system is documentation, it is there, but it is very small (https://github.com/butschster/kodicms/wiki) and the creation of this laborious process, which I don’t have to pull, and the system’s capabilities know a lot. :(
System structure
Developing a CMS, I tried to change the code of the kohana core as little as possible, or rather not even the system folder is not touched completely, some classes were expanded through modules and refined, but in fact it is Kohana version 3.3.2.
The system is divided into modules and plug-ins, the original idea was to realize the connection of the modules to each other through Observer's, in practice 70% of the modules and plug-ins work through them, which allows you to safely disconnect part of the modules, I myself have not tried to do it, but I hope that it is.
API
The system has a full-fledged API that supports GET, POST, PUT, DELET requests via ajax and directly, has its own URl structure, access to it is allowed through the backend, or through the frontend with a unique key. The API is also implemented through controllers and actions. A little about him can be found
here .
Frontend works through the route, which is called the most recent, at the time of its call to the database, the pages are searched by url and the current page is output, all requests are cached by key and by tag.
Caching
CMS uses the kohana module - Cache for data caching. All cache types support caching tags. The system caches most requests:
- Download page
- Configs
- Widgets
- Snipples
- User meta info
- Table structure in ORM
Plugins
The system is expanded with plugins, but the plug-in for the system is the same module, only it is located in the plugins folder and is connected only after activation via the admin panel, but this is a full-featured kohana module, except that it has, in addition to the init.php file frontend.php and backend.php, in which you can include additional code that must be executed in a particular environment.

In general, this is only the beginning, there are also Mail templates and events, task execution through the kohana module - Minion, but settings via the admin panel, hybrid data, dashboard, configs, user meta data, etc. And I really want to tell everyone about it and show how it all works.
For familiarization with the system there is a demo site:
demo.kodicms.ru , please do not break the site, because others will not be able to see it.
Youtube channelProject repository:
github.com/butschster/kodicms , the latest updates in the
dev branch, there is also a
unittest branch in which the first tests appear, but again not enough for all the time.
Join the development;)In general, test, use, send your ideas for development and improvement in any form, issue, pull-request, PM, skype,
forum , comment
Thanks for attention.
Upd. Thanks to Habrahabr for the company blog.