Skip to content

QuantumWeb applications from declarative pages

Database, forms, sessions and AI in the language. No build chain, no JavaScript, no front-end framework.

Welcome to Quantum ​

Quantum builds web applications from declarative XML pages — the same page also runs in a terminal and in a desktop window. Inspired by ColdFusion and Adobe Flex, it lets you build internal tools, dashboards and AI applications without writing JavaScript. Why Quantum?

Quick Example ​

A page that lists notes from a database and adds one from a form — the rule on the field, the insert and the message after it included:

xml
<q:component name="Notes">
  <q:action name="add" method="POST">
    <q:param name="title" required="true" minlength="3" />
    <q:query name="added" datasource="db">
      INSERT INTO notes (title) VALUES (:title)
      <q:param name="title" value="{title}" type="string" />
    </q:query>
    <q:redirect url="/" flash="Added: {title}" />
  </q:action>

  <q:query name="notes" datasource="db">SELECT title FROM notes ORDER BY id</q:query>

  <h1>Notes ({notes_result.recordCount})</h1>
  <q:if condition="flash"><p class="flash">{flash}</p></q:if>
  <form method="POST" action="/?action=add">
    <input name="title" />
    <button>Add</button>
  </form>
  <ul>
    <q:loop query="notes"><li>{notes.title}</li></q:loop>
  </ul>
</q:component>

This page and its test run on every change — see the recipe A first test with quantum test.

Key Features ​

Core Language ​

  • Components - Reusable .q files with parameters and return values
  • State Management - q:set for variables with validation and type checking
  • Loops - Range, array, list, and query iterations with q:loop
  • Conditionals - Full q:if/q:elseif/q:else support
  • Functions - Define reusable logic with q:function

Screens (ui:*) ​

  • A core set - windows, boxes, panels, tables, lists, forms and fields (UI)
  • Three renderers - browser, terminal and desktop window, from the same page
  • Forms from actions - fields, rules and errors come from the action's q:param
  • Tables from queries - pagination, search as you type, sortable and editable cells

Backend Features ​

  • Database Queries - SQL with parameters, schema plans, change history, quantum check
  • Authentication - Session management and role-based access control
  • Data Import - JSON, CSV, and XML data sources
  • Files and Mail - Uploads, protected downloads and q:mail (guide)
  • AI - q:llm with sources and streaming, q:knowledge, q:agent (guide)

Philosophy ​

Simplicity over configuration

Quantum prioritizes readability and ease of use while maintaining powerful capabilities. If you know XML and SQL, you can build full applications.

Getting Started ​

bash
pip install quantum-framework
quantum start          # in an application folder; the guide builds one step by step

Read the full Getting Started guide

MIT Licensed · Built with VitePress