F.I.N.I.S.: Flatnux Is Now Infinitely Scalable
FINIS is a PHP framework and CMS. A site is a folder of sections (pages), modules (section types) and themes; data is kept in tables described by XML descriptors and stored, by default, in plain PHP/XML files, so a site runs without a database server. The same code can run as a complete CMS with its control center, or as a library that an application calls to run its own sections in PHP, Python or Node.js.
- Database layer (xmetadb): one API for the
xmlphp(files, default),mysql/MariaDB,sqlite3,sqlserver,csvandserializedrivers; tables and forms generated from the XML descriptors inmisc/fndatabase/; SQL-like queries withFN_XMETADBQuery(). - Sections and modules: one folder per page; section types for static pages, database views
with search, cards and record sheets (
dbview), news, login and registration, search, file manager, table editor, site map, and PHP, Python 3 and Node.js scripts. - Themes and templates: site and control center themes,
{variables},<!-- if -->and<!-- foreach -->blocks, module templates that a theme can override. - Multilingual content and interface (English, Italian, German, French, Spanish).
- Control center (
index.php?fnapp=controlcenter): contents, blocks, settings, themes, users and groups, API keys, event log and other utilities. - Users and security: groups and permissions per section, registration with confirmation, password recovery, login with external OAuth providers, signed login cookies, bcrypt passwords, login attempt limiter, captcha.
- AI clients: an MCP server (
index.php?fnapp=mcp) that lets an AI client (Claude Desktop, claude.ai, Claude Code, ...) read and, when allowed, edit the site as a FINIS user, with personal API keys or an OAuth 2.1 login. - Extensions: a folder of modules, sections and tables loaded with
$FINIS->addExtension()without copying it into the site (for example thefncommercee-commerce extension).
- PHP 7.1 or higher (PHP 8.x supported)
- A web server (Apache with mod_rewrite for friendly URLs; any server for
index.php?...URLs) - Optional: MySQL/MariaDB, SQLite 3 or SQL Server; APCu for a faster cache; the
opensslextension to let the administrators show the users' API keys
- Upload the content of
src/to your website folder - Rename
index.php.exampletoindex.php - To use MySQL instead of the files, copy
config.vars.local.php.mysql.exampletoconfig.vars.local.phpand set the connection data - Make the data folder
misc/writable by the web server - Go to
http://[your website]/and run the wizard - The control center is at
http://[your website]/index.php?fnapp=controlcenter
config.vars.local.php holds the settings of the installation (database, display_errors,
trusted_proxies, home_section_force, ...); the defaults are in
src/include/config.vars.php. The data folder also gets the site secret
misc/secret.key.php: keep it with the backups and never commit it.
See the Installation Manual for the details.
The examples/ folder holds ready-made sites that use the sources in src/:
examples/website- a site with the default sectionsexamples/fullcms- the complete CMS with control centerexamples/ecommerce- a shop built on thefncommerceextension
FINIS includes comprehensive documentation in the /doc folder:
- Manual - General documentation
- Installation Manual - Detailed installation instructions
- Administration Manual - Managing a FINIS website
- Developer Guide - Guide for developing with FINIS
- Theme Guide - How to create and customize themes
- Database Guide - Working with the database abstraction layer
- API Documentation - Complete API reference
- MCP Guide - MCP server, API keys and OAuth login for AI clients
- Migration Guide - Migrating and upgrading
- Migration from Flatnux - Guide to migrate from Flatnux
- LLM Guide - Reference for AI coding assistants
- Manuale Generale - Manuale generale
- Manuale di Installazione - Istruzioni di installazione
- Manuale Amministrazione - Gestione di un sito FINIS
- Manuale Sviluppatore - Guida per lo sviluppatore
- Guida Temi - Creazione e personalizzazione dei temi
- Guida Database - Livello di astrazione del database
- Documentazione API - Riferimento delle API
- Guida MCP - Server MCP, chiavi API e login OAuth per i client AI
- Guida Migrazione - Migrazione e aggiornamento
<?php
require_once "path_src_finis/FINIS.php";
$FINIS = new FINIS(array("src_application" => "."));
$FINIS->finis();The application folder (src_application) holds its own sections/, themes/, modules/,
misc/ and config.vars.local.php; what it does not have is taken from the FINIS sources.
$FINIS->finis() serves the site and the other entry points selected with ?fnapp=
(controlcenter, api, mcp, oauthserver, thumb, ...).
<?php
require_once "path_src_finis/FINIS.php";
$FINIS = new FINIS(array("src_application" => "."));
$FINIS->addExtension("path/to/fncommerce/");
$FINIS->finis();Modules, their configuration files and the control center sections are looked up in the application, then in FINIS, then in the extensions; at the first install the sections and the table descriptors of the extensions are copied into the site.
./sections/home/section.en.html
<h1>FINIS !!!</h1>./sections/home/section.php
<?php
global $_FN;
echo "<h1>FINIS !!!</h1>";
echo $_FN['siteurl'];example.php
<?php
require_once "../finis/FINIS.php";
$FINIS = new FINIS();
$FINIS->runSection("home");./sections/home/section.py
import json
import sys
json_data = sys.argv[1]
# Parse the JSON data
FN = json.loads(json_data)
print(f"""
Site url: {FN['siteurl']}
""")./example.php
<?php
require_once "../finis/FINIS.php";
$FINIS = new FINIS();
$FINIS->runSection("home");./sections/home/section.js
// Current date and time
function getCurrentDateTime() {
const now = new Date();
const date = now.toLocaleDateString();
const time = now.toLocaleTimeString();
return {date, time};
}
// HTML content of the page
function createHtmlContent() {
const {date, time} = getCurrentDateTime();
const message = "Welcome to our site!";
return `
<h1>${message}</h1>
<p>Date: ${date}</p>
<p>Time: ${time}</p>
`;
}
console.log(createHtmlContent());
try {
const FN = JSON.parse(process.argv[2]);
console.log("<pre>");
console.log("Site url:" + FN['siteurl']);
console.log("User:" + FN['user']);
console.log("</pre>");
} catch (error) {
const FN = {};
}Every user allowed by the administrators can connect an AI client to the site:
- API key: generate it in the profile page, then point the client at
https://[your website]/index.php?fnapp=mcpwith the headerAuthorization: Bearer <key> - OAuth login: Claude Desktop and claude.ai connect with the username and password of the user, no key to copy
Reading is open to the users with a key; the write tools (edit pages, blocks, users, ...) are
reserved to the administrators and to the group mcp_write. Details in the
MCP Guide.