Divengine Open Source
Build software. Shape your tools.
Divengine is an open-source ecosystem of applications, frameworks, libraries and developer tools. IDEs for the terminal (divide runs in a browser too), a framework for terminal applications, the Div template engine, and the pieces around them. Small, readable, and free to use, change and share.
- Free software
- PHP and Python
- Linux and Windows
- Terminal and browser
Open-source first
Built in public, improved by contributors, and shared openly.
Small building blocks
Each project does one job well and fits cleanly with the others.
Generators, not boilerplate
Write the rules once and let a checked generator write the repetitive code.
Featured
What we are building now
Ecosystem
One ecosystem, many focused tools
Divengine libraries share a pragmatic philosophy: explicit mappings, readable code, and minimal dependencies. Each project stands alone, yet they connect naturally when combined.
Core principles
- Transparent APIs over magic
- Small footprints, real-world constraints
- Documentation as a first-class artifact
Contributor focus
- Open to new contributors and maintainers
- Built in public, shared globally
- GitHub issues and discussions drive the roadmap
Stack coverage
- Templates, routing, and runtime tooling
- Data modeling, storage, and knowledge mapping
- Interop between server and browser
Project Atlas
Applications, frameworks, libraries and tools
Every project solves one problem well. Some are complete applications, others are pieces you build with.
Applications
Complete tools you install and use every day.
divide
Build, test and debug code generators made with Div templates. It renders with the real engine, traces how Div reached its output, and runs in a terminal or in your browser.
Discover divide Repository
turbodoo
An IDE for Odoo addons, in the terminal: models and fields at a glance, a Python language server, debugging and git.
RepositoryFrameworks
Foundations to build your own applications on.
TurboFrame
A Python framework for desktop-style terminal applications in the Turbo Vision tradition: windows, menus, dialogs, themes, and a web mode. divide and turbodoo are built on it.
Discover TurboFrame Repositoryways
A control-point router for HTTP and CLI flows with hooks, rules, and modular dispatch.
View on GitHubLibraries
Focused building blocks for PHP projects. Use one, or combine several.
div
A PHP template engine and code generator with recursive compilation and custom dialects.
View on GitHubmatrix
Spreadsheet-like matrices with formulas, ranges, and export formats like CSV, JSON, and SQL.
View on GitHubnodes
A file-based node database with schemas, indexing, and lightweight search.
View on GitHuborm
A minimal ORM that maps records and tables to PHP objects with explicit class hierarchies.
View on GitHublaze
Lazy immutable values backed by closures and optional constraints for safe runtime config.
View on GitHubenum
A class-based enum pattern with inheritance for legacy PHP and polymorphic workflows.
View on GitHubajaxmap
Expose PHP functions and static methods to the browser through a focused AJAX mapping layer.
View on GitHubDeveloper tools
Engines and helpers for the development workflow.
Runner
A lightweight PHP engine that runs flows: ordered blocks of steps that share one context. divide designs, checks and simulates its Flows.
View on GitHubDialector
Create your own Div dialect, the set of tags a template uses, section by section. It is also built into divide.
View on GitHubpyvault
Generates Obsidian vaults from Python codebases, mapping modules, classes, and call relationships.
View on GitHub<?php
require 'vendor/autoload.php';
use divengine\div;
echo new div('Hello {$name}', ['name' => 'Divengine']);
Result
Outputs: Hello Divengine.
<?php
require 'vendor/autoload.php';
use divengine\ways;
ways::listen("get://home", function($data) {
echo "Hello {$data['user']}";
}, "home");
ways::hook(DIV_WAYS_BEFORE_RUN, "home", function($data) {
$data['user'] = "Peter";
});
ways::bootstrap('_url', 'home');
Result
Outputs Hello Peter when the home control point runs.
<?php
require 'vendor/autoload.php';
use divengine\matrix;
$nums = new matrix([
["", 1, 2, 3],
["", 4, 5, 6],
]);
echo $nums->get(1, 3);
Result
6
pyvault ./my_project ./vault_output
Result
Creates an Obsidian vault with module pages, class maps, and navigation indexes.
<?php
require 'vendor/autoload.php';
use divengine\laze;
laze::define('APP_NAME', fn () => 'Laze Demo');
echo laze::read('APP_NAME');
Result
Prints Laze Demo and caches the evaluated value.
<?php
require 'vendor/autoload.php';
use divengine\enum;
abstract class Temperature extends enum {}
class HOT extends Temperature {}
class COLD extends Temperature {}
function advise(Temperature $t): string
{
if ($t instanceof HOT) {
return 'Drink water';
}
return 'Wear a coat';
}
echo advise(new HOT());
Result
Outputs Drink water for the HOT enum.
server.php
<?php
require __DIR__ . '/vendor/autoload.php';
use divengine\ajaxmap;
function sum($x, $y) {
return $x + $y;
}
class Enterprise {
public static function getEmployees() {
return [
["name" => "Thomas Hardy", "salary" => 1500],
["name" => "Christina Berglund", "salary" => 1200],
];
}
}
$server = new ajaxmap();
$server->addMethod('sum');
$server->addClass('Enterprise');
$server->go();
index.html
<script src="server.php?lib"></script>
<script>
var api = new ajaxmap("server.php");
var result = api.sum(20, 10);
var employees = api.Enterprise.getEmployees();
console.log(result, employees[0].name);
</script>
Result
The client logs 30 and the first employee name from PHP.
<?php
require 'vendor/autoload.php';
use divengine\nodes;
$db = new nodes("database/contacts");
$id = $db->addNode([
"name" => "Peter",
"age" => 25
]);
$contact = $db->getNode($id);
Result
Returns the stored contact data from the file database.
<?php
require 'vendor/autoload.php';
use divengine\orm;
class PublicMap extends orm
{
protected $__map_type = self::SCHEMA;
protected $__map_schema = 'public';
protected $__map_identity = 'id = :id';
}
class PersonMap extends PublicMap
{
protected $__map_type = self::RECORD;
protected $__map_name = 'person';
protected $__map_class = Person::class;
}
class Person extends PersonMap
{
public $id = self::AUTOMATIC;
public $name;
}
$pdo = orm::buildPDO([
'type' => 'pgsql',
'host' => 'localhost',
'port' => 5432,
'name' => 'mydb',
'user' => 'me',
'pass' => 'secret'
], true);
$person = new Person(['name' => 'Peter']);
$person->insert();
Result
Inserts a Person record using the defined map classes.
Divengine Studio
Software Engineering Platform
Divengine Studio is the platform where these libraries are used as components. It lives at divengine.com and is built from the divengine.github.io repository.
Contributions are welcome: open issues, propose improvements, or submit pull requests on the project repositories.
Mentor and Organizer
Rafa Rodriguez
Software engineering mentor and organizer of the Divengine open source ecosystem. Author of the libraries featured here, focused on clear reasoning, explicit design, and practical software craft.