Features

Explore all DressAPI features: automatic CRUD, advanced filtering, authentication, caching, multi-format output, and more.

Automatic CRUD from Database Schema

DressAPI reads your database schema at runtime and generates complete REST endpoints for every table. It supports GET, POST, PUT, and DELETE operations with automatic validation based on column types and constraints. No model classes, no route definitions, no boilerplate — just your database.

Generated Endpoints
GET /product # List all products GET /product/42 # Single product by ID GET /product/full # With related tables POST /product # Create new product PUT /product/42 # Update product DELETE /product/42 # Delete product

Advanced URL Query System

Filter, sort, and paginate directly via URL parameters. DressAPI supports equality, comparison, and contains operators. Combine multiple filters in a single request for precise data retrieval.

URL Parameters
GET /product/ob/price-DESC # Order by price descending GET /product/p/1,20 # Page 1, 20 items per page GET /product/price>10 # Price greater than 10 GET /product/name~shirt # Name contains "shirt" GET /product/status=active # Exact match filter GET /product/full # Include related data

Automatic Relation Management

DressAPI automatically detects relationships between tables based on naming conventions. Foreign keys prefixed with id_ are recognized as references to other tables, and the framework resolves them transparently. With /full you get all related data in a single request. Many-to-many relationships via crosstables are also handled automatically. The naming convention is configurable to adapt to any existing schema.

DressAPI auto-resolved foreign key dropdown
Relations Example
# Crosstable "product_tag" in DB: id | id_product | id_tag 1 | 3 | 7 2 | 5 | 4 # GET /product_tag/full → auto-resolved: id | id_product | id_tag 1 | Television | Electronics 2 | USB Cable | Accessories # Naming convention (configurable): id_product → product.name id_tag → tag.name

Cache System

Automatic file-based and Redis caching with intelligent invalidation. Cache is cleared automatically when data changes, so responses are always fresh. Lazy database connections mean the DB is not touched when cache hits occur, dramatically improving performance.

config.php
// File cache (default) define('CACHE_DRIVER', 'file'); // Or Redis cache define('CACHE_DRIVER', 'redis'); define('REDIS_HOST', '127.0.0.1'); define('REDIS_PORT', 6379);

Automatic Form Generation

In CMS mode, DressAPI generates complete CRUD forms automatically from your database schema. Each field gets the appropriate HTML control based on its type: foreign keys become <select> dropdowns populated with related table data, ENUM columns become radio buttons, TEXT fields become rich text editors with a full toolbar, image fields get a file uploader, and standard fields receive the correct input type. No templates to write, no form definitions — everything is derived from the database.

DressAPI auto-generated CRUD form

Authentication and ACL

JWT-based authentication with role-based access control. Define granular permissions (read, insert, update, delete) per role and per module. Support for owner-only restrictions, so users can only modify their own records. Session-based auth is also available for HTML pages.

DressAPI ACL permissions table

Template Engine

Twig-like template syntax with variables, modifiers, and modular page frames. Use for data binding, for local variables, and translatable for auto-translated strings. Components like hero, cards, accordions, tabs, and modals are rendered from simple configurations.

Template Syntax
<!-- Variable binding --> <h1></h1> <p></p> <!-- Translated strings --> <a href="/features">Learn more</a> <!-- Local variables --> <span></span> <!-- Modifiers --> <p></p>

Multi-Language System

The translation system works at two levels: the _T() function looks up strings in the _translation table, and @@XX tags embed multiple language variants inline for titles and descriptions. Auto-learning mode detects untranslated strings and adds them to the database for later translation. Supports any number of languages.

Translation
<!-- In templates --> <p>Welcome to our site</p> <!-- In PHP --> print _T('Hello world'); <!-- Inline @@XX tags (for titles) --> @@EN Hello @@IT Ciao @@FR Bonjour
DressAPI translation management form

Menu System with Drag-and-Drop

The hierarchical menu system supports multiple menu groups (main menu, footer, sidebar). Menus can be reordered via drag-and-drop in the admin panel. Each menu item can link to pages, external URLs, or special commands. Role-based visibility allows showing different menus to different user roles.

DressAPI drag-and-drop menu editor

Modular Architecture & Plugins

DressAPI has a fully modular architecture. Each module follows a standard structure with controller, model, views, and configuration. CMS plugins can override core modules to customize behavior without modifying the framework.

The CComponent system provides reusable UI components (accordion, card, hero, modal, dropdown, carousel, and more), each with its own HTML template, CSS, and JavaScript. You can create your own custom components following the same structure.

Plugin & Component Structure
# Module/Plugin structure modules/{name}/ config.php controller/ CxxxController.php model/ CxxxModel.php views/{framework}/ page-frames/ *.tmpl.php components/ reusable UI # Component structure components/{name}/ {name}.html # HTML template css/{name}.css # Styles js/{name}.js # Behavior
DressAPI CComponent visual editor

File Repository

DressAPI includes a built-in file repository with folder management, file upload, and image preview. The repository supports creating folders, uploading files, and organizing assets directly from the admin panel. Uploaded images are automatically optimized and can be referenced in page content.

DressAPI file repository manager

Task Scheduler

The integrated task scheduler allows you to automate recurring operations like cache clearing, data synchronization, and report generation. Tasks can be configured with fine-grained scheduling: select specific years, months, days of the week, or exact dates. Each task is managed entirely from the admin panel without touching crontab.

DressAPI task scheduler