Derafu DEV
Five things worth a look
The projects where we think Derafu does something that is hard to find done well elsewhere.
Your Markdown, as a website and as a tool for AI agents
Point Derafu Content at a directory of Markdown files and get documentation, a blog, FAQs and courses, with navigation, tags and search.
Every page is also available as Markdown, PDF and JSON, and an MCP endpoint lets AI agents fetch your content directly. This website runs on it.
Write an operation once. Serve it over HTTP, the CLI and Python.
With Derafu Backbone, a method marked as an operation becomes an HTTP endpoint with an OpenAPI 3.1 description, a console command and a call from Python, without a controller or a command class for each one.
Results are always serializable and failures come back as problem details, so any caller can use them.
Define a form once. Render it, validate it, reuse it.
A Derafu Form is a JSON Schema plus a UI Schema in the style of JSON Forms. It is rendered on the server and its data goes through four phases (cast, transform, sanitize and validate) with Derafu Data Processor.
The errors come back ready to render the form again. CSRF tokens and captchas (hCaptcha, Turnstile, reCAPTCHA v3 and ALTCHA) plug in.
Let your users write queries in the URL, without opening your SQL
Derafu Query reads a short, URL-safe expression, such as the filters of a data table or a report, with its joins and its condition, and builds the SQL for you. Values are always bound as parameters, and your application decides what can be asked.
It has its own SQL builder and bridges for Doctrine DBAL and ORM, Eloquent and API Platform. For the queries that you write yourself, keep using your ORM or SQL.
Business documents and electronic invoicing, end to end
Derafu UBL models every UBL document type, from version 2.1 to 2.5, as typed PHP classes that read and write XML, JSON and YAML and validate against the official schemas.
It works with Derafu XML (XML to arrays and back, XSD validation and XPath) and with Derafu Certificate and Derafu Signature for X.509 certificates and XML digital signatures.
A look at the code
Small examples taken from the documentation.
resources/content/
├── docs/
│ ├── getting-started.md → /docs/getting-started
│ └── getting-started/
│ └── installation.md → /docs/getting-started/installation
├── blog/
│ └── 2026-11-03-first-post.md → a blog post, dated by its file name
└── academy/
└── course.md → course, modules and lessons come from the folders
# Every page is also served as Markdown, PDF and JSON:
# /docs/getting-started.md /docs/getting-started.pdf /docs/getting-started.json
# And AI agents can search and read it all through an MCP endpoint: POST /api/content/mcp
// A normal class with a normal method. The #[Operation] attribute is all it takes
// to publish "build" as an operation: no controller and no command class.
class InvoiceBuilderWorker extends AbstractWorker implements WorkerInterface
{
#[Operation]
public function build(string $number, int $amount): array
{
// Your business logic.
}
}
// From here, the same operation can be called as an HTTP endpoint (described in
// OpenAPI 3.1), as a console command, or from Python, by its id.
// A form is data. The schema says what the data is and which fields are required;
// the UI schema says how the fields are laid out. It is rendered on the server.
$definition = [
'schema' => [
'type' => 'object',
'properties' => [
'name' => ['type' => 'string', 'title' => 'Full Name'],
'email' => ['type' => 'string', 'format' => 'email'],
],
'required' => ['name', 'email'],
],
'uischema' => [
'type' => 'VerticalLayout',
'elements' => [
['type' => 'Control', 'scope' => '#/properties/name'],
['type' => 'Control', 'scope' => '#/properties/email'],
],
],
];
// The user writes the filter (in the URL of a data table, for example) as a single
// expression. This one means "customers that have an invoice over 1000":
//
// customers __ invoices[on:id=customer_id] __ total ? >1000
// first table join and its condition column filter
//
$qb->where('customers__invoices[on:id=customer_id]__total?>1000');
// The builder writes the rest:
// FROM customers
// INNER JOIN invoices ON customers.id = invoices.customer_id
// WHERE invoices.total > :param (1000 is sent as a bound parameter)
// $yaml is a UBL document (here, a Quotation) written in YAML, following the
// OASIS "UBL JSON Alternative Representation". JSON and XML work the same way.
// The result is a typed PHP object of the UBL version you use, not an array.
$quotation = (new Deserializer())->deserialize($yaml, 'yaml');
// Read it or change it as plain PHP, then write it as the official UBL XML.
$xml = (new Serializer())->serialize($quotation, 'xml');
Powering SaaS Innovation at Derafu Corp
In addition to free software tools, Derafu DEV is behind the design, architecture, and continuous evolution of all SaaS products commercialized by Derafu IO. Our team ensures every platform is secure, scalable, and developer-friendly from the inside out.
We embrace domain-driven design, automated testing, and modern PHP and Python standards to deliver robust solutions, from electronic invoicing to API infrastructure.
Foundations and tools
The base that the rest of the projects stand on.
Derafu Foundation
UX Components for Twig
Array Selection and Filtering
Graphics with GD
Want to see more free software projects?
Check out the complete list of projects on the upper menu, or learn more about free software and our documentation.