MiMiMi framework & CMS

What is the MiMiMi?

MiMiMi framework & CMS is a lightweight software package for easy website development. The package includes the latest version of the "MiMiMi" framework and several variations of the CMS based on it. The package distributed under license CreativeCommons CC BY 4. You are free to download and use this software for personal or commercial purposes.

Why is it developed?

Once upon a time I had experience with different packages for creating websites. There were freeware or commercial systems, visual site constructors or integrated development environments, frameworks or CMSes, popular or unknown platforms, complex or simplified engines.

Each package represents a good solution for a certain range of tasks. But those packages had a common flaw - is tangible complexity of their source code. Moreover, they were created over 10 years ago. This means that their source code is ancient.

I asked myself, "Is it possible to develop a framework to be as small, simple, and pretty as a little kitten?" I found this idea interesting to implement. And the working name of my framework was chosen consonant with the triple feline "Meow", written with the triple phoneme "Mi".

Then I wrote a draft framework during January 2022 and posted this first version on the Internet. Next, I will develop new versions of the MiMiMi framework and publish them for free access on this website.

How to install?

To get started, you need to download the latest version of the framework using the button Download at the top of this page. The downloaded file is a ZIP archive containing 3 components: the MiMiMi Core, the MiMiMi CMS, the MiMiMi Installer. You must unzip this archive into the website's root folder and open the home page in a browser. You will see the welcome window of the MiMiMi Installer.

It will allow you to go through the installation process and select the desired framework configuration. Installation consists of 3 steps: choosing the installation directory, configuring database access, choosing which modules to install. As a result, you will install the MiMiMi framework & CMS on the website.

What is the MiMiMi Core?

.htaccess - it is a configuration of the Apache web server to forward incoming requests to the starting point of your website. The forwarding logic is defined by the following rules:

Details
  • Rule 1. Block requests for the unsafe files. For example, any dumps like *.sql, any backups like *.bak, any server scripts like *.cgi, and so on.
  • Rule 2. Disable URIs ended with index.php and redirect them to the same URI without this ending.
  • Rule 3. Disable URIs with the trailing slash and redirect them to the same URI without the slash.
  • Rule 4. Skip requests for non-script files located in the root media folder.
  • Rule 5. Skip requests for theme files located in any subdirectory (css, or fonts, or images, or js) of the root themes folder.
  • Rule 6. Skip requests for the root *.ico, or *.txt, or *.xml file.
  • Rule 7. Send other requests to the starting point of your website.

In addition, some content negotiation options are disabled in this file. For example:

  • The MultiViews option is disabled, otherwise the server will look for the nearest matching directory for the unrecognized URI.
  • The Indexes option is disabled, otherwise the server will declassify the list of files in any directory that does not contain a standard index file.

favicon.ico - it is a favorite icon of your website.

index.php - it is the starting point of your website. The file just loads the default application (Core) or its modified version (CMS or Installer) and launches that application. This file also contains the following constants:

Details
  • MIMIMI_CORE_VERSION - the official version of the framework
  • MIMIMI_CORE_FOLDER - where the framework (Core) is located
  • MIMIMI_MODULES_FOLDER - where is its modules
  • MIMIMI_CMS_FOLDER - where is its modified version (CMS)
  • MIMIMI_INSTALL_FOLDER - where is its modified version (Installer)

This file also defines the following global variables:

  • $cms - the application's object to access it from the theme PHP scripts

mimimi.core / Config.php - it is a list of configuration constants. The file contains the following constants to configure the database access:

Details
  • MIMIMI_DATABASE_DRIVER - it is one of these values:
    • cubrid, dblib, firebird, ibm, odbc-ibm, informix, mssql, mysql, odbc, oci, oracle, pgsql, sqlsrv, sybase, odbc, odbc-access, sqlite
    • EMPTY STRING if no database on your website
  • MIMIMI_DATABASE_HOST
  • MIMIMI_DATABASE_PORT
  • MIMIMI_DATABASE_USER
  • MIMIMI_DATABASE_PASSWORD
  • MIMIMI_DATABASE_NAME
  • MIMIMI_DATABASE_TABLE_PREFIX
  • MIMIMI_DATABASE_CHARSET
  • MIMIMI_DATABASE_COLLATION

The file also contains these constants for selected theme:

  • MIMIMI_CORE_THEME
  • MIMIMI_CMS_THEME
  • MIMIMI_INSTALL_THEME

The file also contains these constants to inform your masters about website's events.

  • To inform by email (these constants are strings with comma-separated list of emails):
    • MIMIMI_EMAILS_FOR_WEBMASTER
    • MIMIMI_EMAILS_FOR_CONTENT_MASTER
    • MIMIMI_EMAILS_FOR_TRAFFIC_MASTER
    • MIMIMI_EMAILS_FOR_SECURITY_MASTER
  • To inform by SMS (these constants are strings with comma-separated list of telephones):
    • MIMIMI_PHONES_FOR_WEBMASTER
    • MIMIMI_PHONES_FOR_CONTENT_MASTER
    • MIMIMI_PHONES_FOR_TRAFFIC_MASTER
    • MIMIMI_PHONES_FOR_SECURITY_MASTER
  • To inform by Telegram chat (these constants are strings with comma-separated list of @identifiers):
    • MIMIMI_TELEGRAMS_FOR_WEBMASTER
    • MIMIMI_TELEGRAMS_FOR_CONTENT_MASTER
    • MIMIMI_TELEGRAMS_FOR_TRAFFIC_MASTER
    • MIMIMI_TELEGRAMS_FOR_SECURITY_MASTER

mimimi.core / Routines.php - it is a miniature library of helper routines to bootstrap your application to the starting point of the website. The file contains these routines:

Details
  • mimimiCheck()
    • to check for the existence of main constants
  • mimimiCreate($name[, $cms[, $testing]])
    • to load a named module as the same property of the CMS object
  • mimimiInclude($filename[, $fromCore[, $once]])
    • to load a required PHP file
  • mimimiDump($filename[, $fromCore])
    • to output a required TEXTUAL (style.css, script.js, and so on) file
  • mimimiModule($filename[, $fromCore])
    • to load a required TEMPLATE (header.php, footer.php, and so on) file
  • mimimiInform($subject, $message, $to[, $details])
    • to inform your masters by email
  • mimimiCookie($param[, $def])
    • to retrieve a named COOKIE's parameter
  • mimimiEnvironment($param[, $def])
    • to retrieve a named ENV's parameter
  • mimimiFiles($param[, $def])
    • to retrieve a named FILES's parameter
  • mimimiGet($param[, $def])
    • to retrieve a named GET's parameter
  • mimimiPost($param[, $def])
    • to retrieve a named POST's parameter
  • mimimiRequest($param[, $def])
    • to retrieve a named REQUEST's parameter
  • mimimiServer($param[, $def])
    • to retrieve a named SERVER's parameter
  • mimimiSession($param[, $def])
    • to retrieve a named SESSION's parameter
  • mimimiStop($message[, $code])
    • to stop execution and send a message to the user's browser with such HTTP status code
  • mimimiSite([$toDisplay])
    • to display or retrieve the domain's absolute URI
  • mimimiRoot([$toDisplay])
    • to display or retrieve the relative path's offset to the Core's folder
  • mimimiUri([$toDisplay])
    • to display or retrieve the page's relative URI
  • mimimiFolders($dir[, $except])
    • to retrieve a list of folders in specific directory

The file also contains these constants:

  • MIMIMI_CLASS_PREFIX

mimimi.core / Module.php - it is the basis for other system modules of the application.

Details
  • This file introduces the MimimiModule class.
  • And the file defines some public methods for this class:
    • __construct([$owner]) - to create an instance of the class
    • run([$params]) - to perform some actions required for a basic start of the module
  • Also, the file defines some protected properties:
    • $cms - to access the application from the module

mimimi.core / ModuleWithTable.php - it is the basis for system DB modules that use the database table.

Details
  • This file introduces the MimimiModuleWithTable class.
  • And the file defines some protected methods for this class:
    • createTable() - to create the module's table
    • deleteTable() - to remove the module's table
    • clearTable() - to empty the module's table completely
    • addRecord($params) - to append a record to the module's table
    • updateRecord($id, $params) - to update the table's record by its identifier
    • deleteRecord($ids) - to delete the table's records by their identifiers
  • Also, the file defines some protected properties:
    • $table - to name a module's table
    • $tableFields - to list the table's columns
    • $tableKeys - to list the table's indexes
    • $tableOptions - to list the table's options

mimimi.core / Application.php - it is a class for the default application. This file is the simplest controller (in MVC terminology) and it contains a minimum of methods for working with your application.

Details
  • This file introduces the MimimiApplication class.
  • And the file defines some public methods for this class:
    • __get($property) - to load related module when this application's property is touched
  • Also, the file overrides these methods:
    • run([$params]) - to send a response to the user browser

mimimi.core / Themes / default / home.php - it is a template for the home page.

mimimi.core / Themes / default / helper.php - it is a library containing some routines to be used in files of this template.

mimimi.core / Themes / default / css / style.css - it is a CSS style for the home page.

mimimi.core / Themes / default / images / icons.svg - it is a SVG icons for the home page.

mimimi.core / Themes / default / js / script.js - it is a JavaScript logic for the home page.


What does the Core's homepage look like?

It depends on the design and layout of the default theme present in the framework. It is reasonable to assume that as new versions of the framework are released, some changes will be made to this theme. Of course, the changes will be related to the functionality of the new version. Therefore, to see the actual look of the home page, you should launch the actual version of the MiMiMi framework on your local machine.

If you are unable to launch the framework now, I will use a screenshot of the homepage from a previous version of the framework as a quick example.

The theme shown above has minimal functionality. Only one page has been implemented. The technique of generating markup by including independent PHP files (they are like HTML blocks) was not used. In addition, the theme implements an asynchronous handler for the "GDPR notice" box. The following logic is programmed into this handler:

  • If the user visits the website for the first time, the "GDPR notice" box is shown to him.
  • If the user has clicked the "Disable analysis" button, an implicit request with action=disable parameter is sent to the website to remember the user's choice in the user's session using setSession routine and then hide the "GDPR notice" box.
  • The next time the user visits the website, a request using getSession routine will be made to the user's session to determine their previous choice regarding "GDPR notice" display.

In addition to the hidden state, the box has 3 additional states (visible, pending, error), which are shown below.

You might be wondering how complex the program code is in this framework. I hasten to please that the code is incredibly simple. I tried to write it as easy as possible. And the result, in my opinion, is very impressive.

The user's request goes to the index.php file and leaves the website as a response from the home.php file. These input and output places are shown as blue dots in the following image.

The index.php file launches the Core's application. It is the Application.php file. This place is marked with a green dot, and a green bar indicates a public method run, which is like a router. Currently, this router always causes the home.php template to be rendered regardless of the input URI.

The template implements some logic, for which it loads the simplest routines located in the helper.php file. This place is marked with a purple dot, and the names of loaded routines are marked with a purple bar.

Show the color hints on image Hide the color hints
Version 1.0 - 2022.01.11Download [21 kb]Released
January 11, 2022
.htaccess A configuration of the Apache web server.
favicon.ico A favorite icon of your website.
index.php A starting point of your website.
[-] mimimi.core This is a folder for the framework Core's files.
Application.php A class for the default application.
Routines.php A miniature library of helper routines.
[+] Has The Has module. It checks for the existence of other modules in the specific framework folder.
[+] LinkOfficer The LinkOfficer module. It is used to provide access to some specific actions of the LinkOfficer component from the backend of your website.
[-] themes This is a folder for your themes.
[-] codemaster A frontend theme named CodeMaster.
[+] css The design's styles to be used on the frontend.
[+] js The UI's scripts to be runned on the frontend.
Version 2.0 - 2022.01.19Download [32 kb]Released
January 19, 2022
.htaccess A configuration of the Apache web server.
favicon.ico A favorite icon of your website.
index.php A starting point of your website.
[-] mimimi.core This is a folder for the framework Core's files.
Application.php A class for the default application.
Config.php NEW A list of configuration constants.
Module.php NEW A basis for other system modules.
ModuleWithTable.php NEW A basis for system DATABASE modules.
Routines.php A miniature library of helper routines.
[+] Ban NEW The Ban module. It checks if the current visitor has restrictions.
[+] Db NEW The Db module. It is used to read records from your database.
[+] Has The Has module. It checks for the existence of other modules in the specific framework folder.
[+] LinkOfficer The LinkOfficer module. It is used to provide access to some specific actions of the LinkOfficer component from the backend of your website.
[+] themes This is a folder for your themes.
Version 3.0 - 2022.01.27Download [45 kb]Released
January 27, 2022
.htaccess A configuration of the Apache web server.
favicon.ico A favorite icon of your website.
index.php A starting point of your website.
[-] mimimi.core This is a folder for the framework Core's files.
Application.php A class for the default application.
Config.php A list of configuration constants.
Module.php A basis for other system modules.
ModuleWithTable.php A basis for system DATABASE modules.
Routines.php A miniature library of helper routines.
[-] Theme NEW A frontend theme for the MiMiMi Core only installation.
helper.php NEW A library containing some routines for this theme.
home.php NEW A template for the home page.
icons.svg NEW A kit of the SVG icons.
script.js NEW A JavaScript logic.
style.css NEW A design's CSS style.
[-] mimimi.modules NEW This is a folder for the framework Core's modules.
[+] Ban The Ban module. It checks if the current visitor has restrictions.
[+] Db The Db module. It is used to read records from your database.
[+] Has The Has module. It checks for the existence of other modules in the specific framework folder.
[+] LinkOfficer The LinkOfficer module. It is used to provide access to some specific actions of the LinkOfficer component from the backend of your website.
[+] Visitor NEW The Visitor module. It retrieves the data (IP, host, browser agent, etc.) of the current visitor.
[+] themes This is a folder for your themes.
Version 3.1 - 2022.02.03Download [50 kb]Released
February 3, 2022
.htaccess A configuration of the Apache web server.
favicon.ico A favorite icon of your website.
index.php A starting point of your website.
[-] mimimi.core This is a folder for the framework Core's files.
Application.php A class for the default application.
Config.php A list of configuration constants.
Module.php A basis for other system modules.
ModuleWithTable.php A basis for system DATABASE modules.
Routines.php A miniature library of helper routines.
[-] Themes NEW This is a folder for your Core's themes.
[-] default NEW A frontend theme named Default.
helper.php A library containing some routines for this theme.
home.php A template for the home page.
[+] css NEW The design's styles to be used on the frontend.
[+] images NEW The design's images to be displayed on the frontend.
[+] js NEW The UI's scripts to be runned on the frontend.
[+] mimimi.modules This is a folder for the framework Core's modules.
[+] themes This is a folder for your themes.
Version 4.0 - 2022.02.16Download [87 kb]Released
February 16, 2022
.htaccess A configuration of the Apache web server.
favicon.ico A favorite icon of your website.
index.php A starting point of your website.
[-] mimimi.core This is a folder for the framework Core's files.
Application.php A class for the default application.
Config.php A list of configuration constants.
Module.php A basis for other system modules.
ModuleWithTable.php A basis for system DATABASE modules.
Routines.php A miniature library of helper routines.
[+] Has NEW The Has module. It checks for the existence of other modules in the specific framework folder.
[+] Themes This is a folder for your Core's themes.
[-] mimimi.install NEW This is a folder for the framework Installer's files.
Application.php NEW A class for the Installer application.
[+] Ban NEW Specific version of the Ban module for the Installer.
[+] Db NEW Specific version of the Db module for the Installer.
[-] Themes NEW This is a folder for Installer's themes.
[-] default NEW A frontend theme named Default.
helper.php NEW A library containing some routines for this theme.
home.php NEW A template for the HOME page - it is "Welcome to the Installer!".
step-1.php NEW A template for the STEP-1 page - it is "Choose the directories".
step-2.php NEW A template for the STEP-2 page - it is "Choose the themes".
step-3.php NEW A template for the STEP-3 page - it is "Choose the modules".
step-4.php NEW A template for the STEP-4 page - it is "Configure database".
step-5.php NEW A template for the STEP-5 page - it is "Specify contacts".
final.php NEW A template for the FINAL page - it is "Installing".
error404.php NEW A template for the ERROR page - it is "Page not found!".
[-] blocks NEW The theme's blocks to be used in the template files.
header.php NEW Template to display the page's top.
form-1.php NEW Template to display the page's form named FORM-1 - it is "Choose the directories".
form-2.php NEW Template to display the page's form named FORM-2 - it is "Choose the themes".
form-3.php NEW Template to display the page's form named FORM-3 - it is "Choose the modules".
form-4.php NEW Template to display the page's form named FORM-4 - it is "Configure database".
form-5.php NEW Template to display the page's form named FORM-5 - it is "Specify contacts".
footer.php NEW Template to display the page's bottom.
[+] css NEW The design's styles to be used on the frontend.
[+] images NEW The design's images to be displayed on the frontend.
[+] js NEW The UI's scripts to be runned on the frontend.
[+] mimimi.modules This is a folder for the framework Core's modules.
Version 5.0 - 2022.06.20Download [97 kb]Released
June 20, 2022
.htaccess A configuration of the Apache web server.
favicon.ico A favorite icon of your website.
index.php A starting point of your website.
[-] mimimi.core This is a folder for the framework Core's files.
Application.php A class for the default application.
Config.php A list of configuration constants.
Module.php A basis for other system modules.
ModuleWithTable.php A basis for system DATABASE modules.
Routines.php A miniature library of helper routines.
UmbrellaModule.php NEW A basis for system modules having an umbrella structure.
[+] Has The Has module. It checks for the existence of other modules in the specific framework folder.
[+] Themes This is a folder for your Core's themes.
[+] mimimi.install This is a folder for the framework Installer's files.
[-] mimimi.modules This is a folder for the framework Core's modules.
[+] Ban The Ban module. It checks if the current visitor has restrictions.
[+] Db The Db module. It is used to read records from your database.
[+] Helper NEW The Helper module. It provides generic routines for theme templates.
[+] LinkOfficer The LinkOfficer module. It is used to provide access to some specific actions of the LinkOfficer component from the backend of your website.
[+] Session NEW The Session module to work with data stored in user's session.
[+] Settings NEW The Settings module to work with the settings database table.
[+] Visitor The Visitor module. It retrieves the data (IP, host, browser agent, etc.) of the current visitor.
Version 5.1 - 2022.06.25Download [99 kb]Released
June 25, 2022
Version 5.2 - 2023.11.28Download [1320 kb]Released
November 28, 2023
Version 5.3 - 2024.05.20Download [4301 kb]Released
May 20, 2024
Version 6.0 - 2024.08.24Download [5404 kb]Released
August 24, 2024