DressAPI CMS - Content Management System built on DressAPI Core.

Maintainers

Package info

git.dressapi.com/dressapi/cms

pkg:composer/dressapi/cms

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

3.0.8 2026-05-06 07:58 UTC

This package is not auto-updated.

Last update: 2026-05-06 08:03:59 UTC


README

DressAPI CMS is a server-side content management system built on DressAPI Core. It extends the core REST API framework with HTML rendering, a template engine, a plugin system, and support for two CSS frameworks: Bootstrap 5 and Bootstrap Italia 5 (the design system of the Italian Public Administration).

License: Apache 2.0 · Author: Tufano Pasquale · Version: 3.0.6

What DressAPI CMS adds to Core

FeatureDescription
HTML renderingServer-side page generation via CHtmlResponse
Template engine.tmpl.php templates with variables, loops and conditionals
Plugin systemPer-module overrides in plugins/ without touching core code
Bootstrap 5 (b5)Standard Bootstrap 5 UI components
Bootstrap Italia 5 (bi5)Italian PA design system UI components
Session authenticationCookie-based sessions for browser navigation (in addition to JWT)
Multilingual contentPer-record language variants and UI string translations
CMS pages and menuBuilt-in modules for pages and navigation management

Requirements

ComponentMinimumNotes
PHP8.1Extensions: pdo_mysql, curl, mbstring, json
MySQL5.7Or MariaDB >= 10.3
Apache2.4mod_rewrite, mod_ssl, mod_headers required
Composer2.x

Installation

Via Composer

composer require dressapi/cms

Via Git

git clone https://git.dressapi.com/dressapi/cms.git
cd cms
composer install

composer install downloads dressapi/core and all other dependencies automatically.

Configuration

Copy config.php.sample to config.php and edit:

<?php
define('DOMAIN_NAME', 'yourdomain.com');
define('APP_NAME',    'myapp');
define('APP_ENV',     'production'); // develop | stage | production

// CSS framework: 'b5' = Bootstrap 5, 'bi5' = Bootstrap Italia 5
define('CURRENT_VIEW_FOLDER', 'b5');

// IMPORTANT: change before going to production
define('TOKEN_SECRET_KEY', 'your-unique-jwt-secret');
define('PWD_CRYPT',        'your-unique-crypt-key');

// Database
define('DB_HOST',     'localhost');
define('DB_PORT',     3306);
define('DB_NAME',     'mydb');
define('DB_USERNAME', 'myuser');
define('DB_PASSWORD', 'mypassword');

// Languages (optional)
define('LANGUAGE_MULTI_CONTENTS', true);
define('LANGUAGES', ['EN', 'IT']);
define('DEFAULT_LANGUAGE', 'EN');

Database Setup

# Create database
mysql -u root -p -e "CREATE DATABASE mydb CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;"

# Import schema (framework tables + demo data)
mysql -u root -p mydb < _SETUP/dressapi_cms.sql

Default admin credentials (change immediately in production):

RoleEmailPassword
Adminadmin@dressapi.comadmin

Apache Configuration

sudo cp _SETUP/dressapi-cms.conf /etc/apache2/sites-available/
# Edit paths inside the file if your installation differs
sudo a2ensite dressapi-cms
sudo systemctl reload apache2

Template Engine

Templates are .tmpl.php files located in plugins/{module}/views/{framework}/page-frames/.

SyntaxDescription
{{variable}}Output a variable
{{locals::var}}Output a local variable
{{ 'text' }}Output a translatable string
[single] ... [/single]Block rendered once (single record)
[multiple] ... [/multiple]Block repeated for each record in a list
[if-exists variable] ... [/if-exists]Conditional block

Plugin System

Plugins in plugins/{module}/ override the corresponding core module. The structure mirrors the core module structure:

plugins/
  news/
    controller/   # CNewsController.php (extends CBaseController)
    model/        # CNewsModel.php (optional)
    views/
      b5/
        page-frames/    # *.tmpl.php templates
        processors/     # PreProcess.php, PostProcess.php
        inline-assets/  # js/, css/
      bi5/
        ...

To override a module, create the corresponding file in plugins/ — the framework loads it automatically.

Dependency on DressAPI API

The CMS admin interface uses DressAPI API to populate picklists (select elements for related tables). Make sure a running instance of dressapi/api is accessible and configured in your environment when using the CMS admin panel.

Related Projects

ProjectDescription
dressapi/coreFramework core library
dressapi/apiREST API (required for picklists in CMS admin)

License

Apache 2.0 — free for personal and commercial use.

Official site

dressapi.com