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
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 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 is built on a modular, Object Oriented PHP approach, not adhering to the traditional MVC model.
Quanta uses the follow design patterns:
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.
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.
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
Quanta can only be installed on any UNIX-based OS (Linux, OSx, etc.).
Apache 2.4+ or Nginx 1.15+ PHP 8.5+ including libraries: GD, CURL Composer
The rewrite and headers modules must be enabled.
The image built from the Dockerfile at the repo root runs nginx + php-fpm
(supervised by supervisord); the vhost, the php-fpm pool and the nginx cache
zones live under docker/. .htaccess is not used there β its rewrite map is
reproduced in docker/nginx/quanta.conf, so keep the two in sync when adding
routes.
The container entrypoint (docker/docker-entrypoint.sh) does the site setup
before supervisord starts: the writable directories Quanta expects (db/_users,
db/_translations, the jobs queue, static/tmp/β¦), the host-alias symlinks, the
ownership fixes php-fpm needs, the CSS/JS bundles, the doctor passes, PHP error
display and the quanta_db kill switch. It is driven by environment variables:
| Variable | Default | Meaning |
|---|---|---|
QUANTA_DIR |
/var/www/quanta |
Quanta source root |
QUANTA_SITE |
localhost |
canonical site directory under sites/ |
IS_PRODUCTION |
unset (dev) | true/1 turns PHP error display off |
QUANTA_DB_ENABLED |
1 |
0/off unloads quanta_db.so and runs the legacy filesystem paths |
SITE_ALIASES |
empty | comma-separated extra hostnames symlinked to the site |
QUANTA_ASSETS_DIR |
/usr/local/share/quanta/assets |
where the image keeps the CSS/JS bundles |
QUANTA_BOOT_CLEAR_CACHE |
1 |
run doctor <site> clear_cache on start (drops cached node paths and all thumbnails) |
QUANTA_BOOT_CHECK |
0 |
run doctor <site> check on start (the broken-symlink repair pass) |
The CSS/JS bundles are built when the image is built, not on every start:
quanta-build-assets (docker/build-assets.sh) runs doctor <site> check and
keeps css.min.css / js.min.js in QUANTA_ASSETS_DIR, and the entrypoint
copies them into static/tmp/<site>/files/ β the same place the CMS has always
read them from. They are derived from the modules' assets, which the image
already contains, so rebuilding them per container (into a volume every pod
shares, while the others serve from it) was repeated work.
Nothing in src/ is involved in this, so a native installation is unaffected:
doctor <site> check keeps aggregating and minifying into each site's own
static/tmp/<site>/files/, which is also what a single source tree serving
several hosts needs, as each host's _modules may add its own includes.
php-fpm runs as www-data, while a docker exec / kubectl exec runs as root.
doctor started as root therefore switches to the owner of the site dir
(www-data once the entrypoint has run) before it does anything, so what it
writes stays writable by php-fpm. It does that in place: the arguments, -d
options, output and exit status are the same as before. Set
QUANTA_DOCTOR_AS_ROOT=1 to keep root on purpose, as the entrypoint and
quanta-build-assets do before they fix ownership themselves. Other PHP run as
root (php -r β¦, scripts) still writes as root, except that the quanta_db
extension creates its own files as the owner of the directory they go in (see
qdb/docs/usage.md).
This image is meant to be used as a base: an application image FROMs it and
layers on its site code only. Such an image should not set its own
ENTRYPOINT β doing so replaces all of the above, and also resets the inherited
CMD to null. Application-specific start-up steps go in a *.sh dropped into
/docker-entrypoint.d/, which the entrypoint sources (in glob order, as root,
under set -e) after its own setup and before it execs the CMD. If its own
modules add CSS/JS includes, it should also RUN quanta-build-assets after
copying its site in, so those assets land in the bundle.
Application code logs through \Quanta\Common\Logger, which writes one JSON
object per line. Its levels and method names are the PSR-3 / RFC 5424 ones
(debug, info, notice, warning, error, critical, alert, emergency):
use Quanta\Common\Logger;
Logger::get()->info('User {name} logged in', array('name' => $name));
Logger::get('payments')->error('Charge failed', array('order' => $id, 'exception' => $e));{"time":"2026-01-01T12:00:00.123456+00:00","level":"error","channel":"payments","message":"Charge failed","context":{"order":42,"exception":{"class":"RuntimeException","message":"β¦","code":0,"file":"β¦:12","trace":"β¦"}},"request_id":"9f86d081884c7d65","host":"example.com","method":"POST","uri":"/checkout/"}PHP's own warnings, notices, deprecations and fatal errors (uncaught exceptions
included) go through the same logger, on the php channel, and PHP's plain-text
error log is switched off. display_errors, error_reporting, the @ operator
and the 500 status on a fatal error work exactly as before.
{key} placeholders in the message are filled from the context. The argument to
get() is the channel, naming the subsystem that logs (default app).
request_id is taken from an upstream X-Request-Id header when there is one,
so records from one request can be grouped. Configuration comes from the environment:
| Variable | Default | Meaning |
|---|---|---|
QUANTA_LOG_LEVEL |
info |
lowest level written |
QUANTA_LOG_OUTPUT |
stderr |
stderr, stdout, error_log (PHP's error_log()), or an absolute file path |
In the Docker image, stderr ends up in the container log alongside nginx's JSON access log.
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.
Quick kickstart guide:
-
Clone the latest release of the Quanta repository
-
Create a host pointing to your quanta folder (i.e. myproject.com => /var/www/quanta)
-
Run Doctor:
./doctor myproject.comand follow the steps until installation is completed.
- run Composer:
composer install- 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/
Once you have, you can start:
- structuring your folders structure -> https://www.quanta.org/approaching-quantas-structure-nodes-folders-and-datajson-files/
- playing around with qTags -> https://www.quanta.org/what-is-a-quanta-tag-qtag/
- creating a basic layout -> https://www.quanta.org/the-index-html-file/
- building up great templates -> https://www.quanta.org/the-tpl-html-file/
- creating a custom module -> https://www.quanta.org/creating-a-custom-quanta-module/
... and become a Quanta pro by having a look at:
- the documentation -> https://www.quanta.org/documentation/
- the tutorials -> https://www.quanta.org/tutorial/
docs/ is a small static site: a landing page, an animated walkthrough of
qdb, and the documentation itself, rendered from the Markdown files that
already live in this repository. docs/site/ holds its source; everything else
under docs/ is generated from that and committed.
Read it locally with:
npm install # once β the build needs one dev dependency (marked)
npm run docs:serve # http://localhost:4000 β rebuilds as you editThen open http://localhost:4000/ and stop the server with Ctrl+C.
npm run docs:build regenerates docs/ without serving, and npm run docs:check
verifies that every internal link and anchor still resolves. Nothing is
published anywhere yet β this is a local preview only.
See docs/site/README.md.
Found any issue? Got any idea? Quanta's contributors and enthusiasts are always happy to help.
- the FAQ -> https://www.quanta.org/faq/
- the Community -> https://www.quanta.org/community/
- the Facebook Group -> https://www.facebook.com/groups/quantacms
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!
