GithubHelp home page GithubHelp logo

quantacms / quanta Goto Github PK

View Code? Open in Web Editor NEW
33.0 14.0 5.0 19.84 MB

An innovative, DB-free CMS for web and application development, based on the principles of Quantum physics.

Home Page: http://www.quantacms.com

License: MIT License

HTML 1.39% CSS 9.54% JavaScript 24.89% PHP 62.96% C++ 0.22% Hack 0.76% SourcePawn 0.23%
cms content php php7 quant quantum jquery json schema-org schema javascript content-management-system content-management knowledge-management cmf

quanta's Introduction

alt text

Quanta Cms

An innovative, DB-free Framework for web and application development, based on the principles of Quantum physics.

Originally designed by Aldo Tripiciano in 2014, Quanta is now proudly free and open source.

Detailed info is available at the official website: https://www.quanta.org

The Author

Aldo Tripiciano is a seasoned italian IT Developer, consulting for 15+ years on the major CMS players (Drupal, Wordpress, Joomla, etc.) for global companies and organisations such as the United Nations and the European Commission. After mastering the top tools in the market, he decided to go one step beyond and build something new, to better fit the new generation of the Web.

Quanta's Features

Quanta is a CMS thought for developers, offering a number of features out of the box:

  • Pre-defined installation profiles (including modules, themes and general entities)
  • A customizable UI backend ("Shadow"), also used for overlay forms
  • Qtags, an agnostic markup language allowing the creation of nestable Tags that are incapsulated into templates, allowing the creation of complex applications with huge reduction of coding times
  • Inline editing of content
  • A batch tool (Doctor) for installing, updating, diagnostic and repairing the system.
  • User management tools
  • Inline Form management
  • Workflow management (Draft->Published statuses, etc.)
  • Taxonomy management
  • Multilingualism / Internationalization
  • Widget / Web service tools based on Qtags
  • Many Pre-defined integrated Qtags (Blog, Carousels and Slideshows, Galleries, Media Playlists, Maps, XML Sitemaps, Widgets, and much more)

Quanta's Architecture

Quanta's Architecture is built on a modular, Object Oriented PHP approach, not adhering to the traditional MVC model.

Quanta uses the follow design patterns:

Factory

All Quanta entities such Nodes, Pages, Templates, Qtags, etc. are constructed and manipulated via static methods implemented in Factory classes. The classes are dynamically loaded at run-time using an autoload routine.

Front Controller

All requests (excluding static files, that are served directly) are elaborated and served via the centralized boot.php file. The boot file processes the request, bootstraps Quanta and renders.

Template Method

Through the use of "hooks" function, custom modules can intercept every phase of the content loading phase, manipulate the data and change the behavior of standard processes.

Quanta's internal architecture is based on:

  • a 100% file-system based DB architecture structured on hierarchical system folders πŸ“ (no SQL involved).
  • Internal caching and indexation of directories through an internal vocabulary
  • JSON storage of data and metadata
  • Template engine allowing creation and override individual template for individual or multiple entities
  • CSS Grid approach natively supported by Qtags
  • Node-level access control (roles, permissions, etc.)
  • Views system

Pre-Requisites

Quanta can only be installed on any UNIX-based OS (Linux, OSx, etc.).

General Requisites:

Apache 2.4+ or Nginx 1.15+ PHP 5.6+ (7 strongly advised!) including libraries: GD, CURL Composer

For Apache users:

The rewrite and headers modules must be enabled.

For Windows / XAMP users:

As Quanta only runs on UNIX, in order to run Quanta on Windows, you will have to install a VM (VMware, VirtualBox, etc.) with your distribution of choice.

Installation

Quick kickstart guide:

  1. Clone the latest release of the Quanta repository

  2. Create a host pointing to your quanta folder (i.e. myproject.com => /var/www/quanta)

  3. Run Doctor:

./doctor myproject.com

and follow the steps until installation is completed.

  1. run Composer:
composer install
  1. Done! Check your brand new site at http://myproject

and start customizing it.

Detailed information about Quanta's installation process is available on the website: https://www.quanta.org/installation-instructions/

Customization

Once you have, you can start:

... and become a Quanta pro by having a look at:

Support

Found any issue? Got any idea? Quanta's contributors and enthusiasts are always happy to help.

If you feel like something needs attention, don't hesitate in opening a new issue in the github repository: https://github.com/quantacms/quanta

Quanta needs you to make every day new steps to become the best CMS ever created!

quanta's People

Contributors

aldus83 avatar dariokf avatar mohamedtaha880 avatar toretto460 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

quanta's Issues

Better interface for Doctor messages

In terms of colors, Doctor messages in the bash currently look a bit random.

schermata 2018-11-02 alle 11 57 11

While it's "just" a bash script, we should consider enhancing it so that it looks better. Compare black terminal screen with white terminal screen in the process.

Setup automated testing - BEHAT

We need to integrate Behat tests (using composer) in Quanta, in order to facilitate testing, preventing regressions, allow continuous integration, etc.

5-10 basic tests with custom behaviors (i.e. login, add node, etc.) would be a good start.

Integration of PhantomJS or similar library would also be benefical, for testing all Quanta features on an emulated browser.

Redirect after login / logout

At the moment, login and logout action, after being performed, redirect the user to the homepage.
We need to support for the [LOGIN] qTag a redirect attribute (as we do with the [REGISTER] qTag) allowing to setup a target for redirecting the user after a successful login/logout.

A way to span qtags into multiple rows.

Is there a way to span tags into multiple rows? I'm not sure if it's currently available. I tried but the tags were not rendered.

At times your qtags might become very lengthy. It would be nice to span it into multiple lines for readability sake.

An example:

[MENU|links={LINK|title=about:about}---{LINK|title=work:work}---{LINK|title=services:services}---{LINK|title=partners:partners}---{LINK|title=blog:blog}---{LINK|title=contact:contact}|menu_class=menu text-center...]

Into something like:

 [MENU
       |links={LINK|title=about:about}---{LINK|title=work:work}---{LINK|title=services:services}---{LINK|title=partners:partners}---{LINK|title=blog:blog}---{LINK|title=contact:contact}
       |menu_class=menu text-center...
    ]

Or:

    [MENU
      |links=
        {LINK|title=about:about}---
        {LINK|title=work:work}---
        {LINK|title=services:services}---
        {LINK|title=partners:partners}---
        {LINK|title=blog:blog}---
        {LINK|title=contact:contact}
      |menu_class=menu text-center...
    ]

Integrate custom qtag access filters

A qtag can be filtered using the access module:
i.e.
[QTAG|filter=role@logged]

The filter are currently defined in access.hook.inc

We need to create a hook (i.e. hook_access_filters()) , so that each module can define its own custom filters.

Coding Style fixing & git pre-push hook

We need to integrate an automated coding style check (i.e. PHPCodeSniffer) and add the check in a git pre-push hook, so that it's impossible to commit wrong code.

  1. Integrate PHPCS in composer
  2. Add rules that are good for Quanta
  3. Add a git pre-push hook that prevents pushing formally incorrect code

tpl^ priority

The "catch-all" tpl (tpl^) should be works only if no other tpl is set.
the priority is:

  • tpl (nodes in same folder)
  • tpl- (nodes in sub-forlders)
  • tpl-- (nodes in sub-sub-forlders)
  • tpl---
  • tpl----
  • tpl-----
  • tpl^ (all nodes, from current forlder to all sub-folders)

Current bug: at the moment, if you set
/folder/tpl^
and
/folder/tpl-

nodes in /folder/sub-folder/ will take tpl^ instead of tpl-

Use attributes generated into a qTag into qtag hooks

the hook_qtag function allows modules to interact with qtags while they are being rendered, .
I.e. the no_amp attribute can be applied to any tag to prevent it from appearing when user is navigating in an AMP mode.
i.e.
[LINK|no_amp:home]

The problem comes when you want to setup an attribute inside the qtag rendering itself,

function qtag_MYQTAG($env, $target, $attributes) {
$attributes['no_amp'] = TRUE;
....
}

While formally correct (and very useful) this won't work, because the hook_qtag is ran BEFORE the qtag is actually rendered, so the attribute no_amp (from the above example) won't exist yet.

We need a smarter way to attach parameters inside the qtag definition as well.

Fix output icons for OPERATIONS qtag

The OPERATIONS qtag renders in sequence;

  • ADD qtag
  • EDIT qtag
  • DELETE qtag

Currently only ADD qtag create a correct output -> a βŠ• icon.
The other 2 tags renders as the ADD qtag icon code, "⊕", instead of edit and delete icon.

I think that it deals also with filter_xss function...

Add a form field to assign roles to users using Shadow

At the moment, roles are assigned manually, by altering the JSON of the user node by hand.
We would rather have something visual, like a dedicated Shadow form, to allow administrators creating and assigning roles visually.

This approach should include rules for deciding "which role can assign which role"

Support inline upload of single / multiple files

We need to create a way to do inline replacement of single files (i.e. node thumbnail, user avatar...).
This should (probably?) be done using Shadow, with its single display output.

Shadow is very powerful but (still) poorly documented so far; keep in mind that you can select the tabs to appear in shadow by adding javascript parameters. See in example the standard node edit buttons:

The qtag qtag_EDIT
https://github.com/quantacms/quanta/blob/master/engine/modules/core/node/node.qtags.inc#L283

and the JS
https://github.com/quantacms/quanta/blob/master/engine/modules/core/node/js/node.js

NODE PATH being looked for in .git folder

by creating a node named "tags", the system complained that it existed already.
I realized that "tags" is a subfolder of .git (full path: ./.git/refs/tags), meaning that Quanta is also looking for nodes within this folder, that means performance loss and incongruencies.
Fix the Environment->nodePath function so that it skips .git when searching for real node paths.

Different file view modes in manage files

In "manage files" tab, in node edit screens, we want to support multiple view modes.

Just as it happens in normal OSs views, we want at very least to support:

  • list mode (similar to what we already have now)
    image

  • icons + preview mode
    image

User should be able to switch between view modes using icons on top:

image

Create bash version of Doctor

We need to create a bash version of Doctor, similar to what drush is in Drupal.
Browser version might be supported for the future, while that's still under brainstorming, as there is no safe way to grant access, assuming that sometimes Doctor needs to run even in a broken environment where even login could be impossible.

Make Links Object-Oriented

The [LINK] qtag is growing big and getting a bit messy.
We need to convert it to an object oriented approach, creating a new class (Link.class.inc), eventually in a separated link module, to handle all the attributes and parameters, and render them appropriately.

Better Doctor check for File System requirements

Doctor check should make sure that file system requirements are met:

  • temporary folder must be writable by the web server (check folder owner and / or permissions and compare with web server user...)
  • thumbnails folder must be writable (same as above)
  • site folder must be writable (same as above)

Use hook_doctor_check() for integrating the checks above.

Create a hook to change the password generation algorithm

Currently we are using a standard MD5 / salt algorithm to store passwords.
It would be good to let the user choose a personal algorithm in his modules, to open the way to different, customizable encryption methods.

public static function passwordEncrypt($pass) {

  1. Pass $env variable to the passwordEncrypt() method, wherever it's called (so it will look like -passwordEncrypt($env, $pass)

  2. Create a hook function that will allow other modules to change the default algorithm
    so it will look something like this

$vars = array('string' => $string)
$env->hook('passwordEncrypt', &$vars) 
if (!isset($vars['encrypted_string'])) {
   $encrypted_string = substr((md5(substr($pass, 0, 5) . 'ABC' . substr($pass, 5, 2) . 'nginE')) . md5($pass), 0, 50);
}
else {
  $encrypted_string = $vars['encrypted_string'];
}
return $encrypted_string;

Qtags security - full analysis

Qtags are Quanta's core feature, and they are extremely powerful - but from great power, comes great responsability, especially when we consider that Qtags can be added (by design) anywhere, included the body, comments, etc. - and therefore, are virtually accessible to any registered and non registered user of a Quanta web application.
That's why we need to walk through the whole list of core qTags:
https://www.quantacms.com/qtags-overview/
and perform a security check of each of them.
It would not be acceptable in example if a qTag was discovered being able to access files and folders outside of its scope, or - even worst - system files.

Please perform a full security check, and do a short report per each qTag.
This is a paid (bounty) issue!

[JS:external:...] results to 404

When you do something like

[JS|external:/assets/js/script.js]

It returns the document root path like:

<script src="/var/www/html/quanta/sites/quanta.test//assets/js/script.js"></script>

Instead of

<script src="/assets/js/script.js"></script>

Possible line of code

ElasticSearch integration

In order to support exposed filters and advanced querying of content, we need to create ElasticSearch support in Quanta.

This feature should include at very least:

  • elastic search inclusion in Quanta (via composer and / or docker?)
  • indexing of nodes on cron
  • rendering of faceted search filters as [FACETS:fieldname] qtags
  • rendering of search results as [RESULTS]Β qtag

Will then be extended with other attributes and features.

Allow input file (multiple uploads) to be used outside of shadow forms.

At the moment, the [INPUT|type=file] field, being used for drag & drop / multiple file uploads, can only be used inside a Shadow form.
This happens because the javascript needed by this input is loaded inside an invisible shadow tab:

https://github.com/quantacms/quanta/blob/master/engine/modules/core/node/tpl/node_data.inc

We need to make this more consistent, so that:

  • the JS is loaded when there is an actual [INPUT|type=file], independently from where it's called
  • the JS is never loaded two times

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.