The Optimal Framework is the fastest path to building any modern multi-user system

framework python mongodb
pip install of==1.0.1


Optimal Framework

The Optimal Framework is the equivalent of a Content Management System for systems development. One could call it a Function Management System. An FMS.

The fastest route to building a system is to start out halfway there.

It is a modern, plugin-based, multi-user system, and it differs from many other frameworks because it is a runnable server as-is. The goal is to create something that not only provides the framework for solving, but actually has already implemented the most common problems in systems programming. Adding functionality to the Python backend is just to add classes and properties to the system, it is a highly intuitive approach.

There is also an optional administrative UI-plugin, written in Typescript and Angular and easily extensible. If one want to add an application UI, any client-side framework that can work against the backend will work.

Behind the backend resides a MongoDB database, which covers a surprising range of usage scenarios, but there are no problems with additionally using an RDBMS backend.

A typical usage scenario would be someone moving a traditional desktop client-based system to web based clients or apps.

Table of Contents


  • Messaging (messaging between different components in a multi-user system is not merely a chat function)
  • Settings and resource management - Central tree structure
  • JSON Schema based integrity control
  • Centralized schema and input form management using JSON Schema and Angular Schema Form
  • Users and groups
  • Permissions
  • Rights
  • Authentication and session management
  • Logging, auditing (categories, severities, local, remote)
  • Administrative User interface
  • Dependency-aware plug-in framework
  • Installer


  • Locking

More features, commercial and non-commercial, ranging from to actual extensive commercial systems like Optimal BPM and will be available through a plug-in ecosystem.


If you have questions or problems, please create an issue.

If you just wan't to reach out and discuss, please check out the gitter room.


Outside the Github community, there will be commercial grade support packages available.



There are four major concepts in the Optimal Framework: broker, nodes, plugins and schemas.


There will be a repository with an example plugin shortly, meanwhile, look at Optimal BPM.


The general API is documented in the wiki.

Also, try and visually browse the github source tree, there are README:s for most packages.


Installation is done using an installation program, optimalsetup. This is useful, because it can download an instruction of what to install. So applications using the framework will only need to provide a JSON-file to make an installation.

These are the prerequisites:

  • MongoDB
  • Python3.4 or newer.

To install them...


These versions comes with Python 3.4 or newer:

  • Debian Jessie (v8.0)
  • Ubuntu Trusty (v14.04)
  • OpenSuSE 13.2
  • Fedora 22
  • RHEL/Centos(manual install)


sudo apt-get install mongodb python3 python3-pip

Pip is for some reason not included in some distributions

OSX(using brew):

brew install mongodb python3



Download and install


Download and install Python Remember to click "add to path", or you will have to write the full path to the Python executable

Installing the framework/system/application

Download the installer:

The installer uses setup files to define what to install, it also installs the pip of-package and its dependencies. It should be run with administrative/sudo priviliges, because when run, the installer makes sure that its dependencies are installed. The dependencies are distlib, dulwich and on windows win32api. On some debian distributions python3-tk needs to be installed, and if so it does.

But to just install the basic installation of the Optimal Framework, run the setup with the --default_of_install option: `python --default_of_install' simply installs a bare installation of the framework in the "of" folder of the users' home folder.


In the install folder, the scripts for starting the initializing the database and the broker is located, .sh- and .bat-files for the respective platforms.

  • initdb - initiates the database
  • broker - starts the broker.

So first, run the initdb script, and then the broker script. The admin interface should now be reachable on:

Login using with the root user and then use "root" as the password. You are now logged in.

Which is sort of the point. You now have a running system that already have all these features from the get go.

Now just add your own functionality in a plugin that you simply add next to the admin interface plugin. If there is a folder there, and a definitions.json-file, it is a plugin and will be loaded by the framework.


For those wanting to contribute to OF itself, feel free to make pull requests.
However, please try and not include too much in each, and work against the development branch unless it is a brief and non-breaking bug fix.

OF strictly follows semantic versioning.

Source structure

The structure of the Optimal Framework source:

  • /broker - The Optimal Framework broker
  • /common - Libraries used by the broker and those interacting with it
  • /schemas - The JSON schemas, and functionality to resolve the of:// scheme
  • /forms - JSF forms used by any user interfaces.


It was first built as a base for the Optimal BPM process management system. However, as development moved on, it became clear that:

a. as that system needed to have a plug-in structure, and

b. that one would have in some way treat parts of Optimal BPM as plug-ins,

..there was no reason to not write Optimal BPM itself as a plug-in.

And as an answer to the question "a plug-in to what?", the Optimal Framework was born.

It is not primarily thought of as something to build a web site, but rather for creating sector-specific computing systems.