Meet Asqueel JS

Asqueel.
In JavaScript.

Asqueel is written in Python. Asqueel JS is its JavaScript counterpart, with models, queries, calculations and writes — including schema migrations.

A shared model structure and the same conventions let you reuse query expressions in Python and JavaScript. The language changes; the way you describe and query your data stays familiar.

Gramlot is the first application framework to put Asqueel JS to work, bringing the Python model into the browser.

SQLite todayBrowser · Node.js · BunApache 2.0

Two languages. A shared model.

AsqueelPython
Asqueel JSJavaScript
TABLES & RELATIONSHIPSQUERIES & CALCULATIONSWRITES & MIGRATIONS
Define the structure in Python and send its Source to JavaScript, or declare your model directly in JavaScript.
JavaScript runs SQLite locally.
No Python process needed.

In the browserSQLite runs on the device, with local data that can survive closing and reopening the app.

On the serverNode.js and Bun already run Asqueel JS with SQLite.

Next: PostgreSQLA PostgreSQL driver is planned for server applications running on Node.js.

Familiar capabilities

The Asqueel approach,
across languages.

Use the same table names, relationship paths and query conventions in both environments: $column for a field, @relation.column for a related value.

01 / MODEL

More than tables
and columns.

Relationships, aliases, formula columns and hierarchies give your data a vocabulary that queries can reuse.

02 / QUERY

Ask through
the model.

Follow relationship paths, filter and sort records, build subqueries and aggregate related data with familiar Asqueel expressions.

03 / WRITE

Give changes
their own rules.

Insert, update and delete records. Use JavaScript hooks, transactions and rollback, or import data from CSV, JSON and TYTX.

Migration is included

The model arrives.
The database follows.

Asqueel JS reads the actual SQLite structure and compares it with the model. It produces a migration plan, applies supported changes and checks the resulting schema.

That is how a browser can prepare its local database from a structure defined in Python — before receiving any records.

01

CompareRead the model and the existing SQLite schema.

02

Plan & applyCreate tables and add supported columns and indexes.

03

VerifyRead the schema again and check that it matches.

In practice · taking orders offline

The next customer
has no signal.

A sales representative needs the customer list, the catalogue and a way to take an order. The work should continue when the connection stops.

  1. 01 / PREPARE

    Take what you need.

    The Python application sends the model Source to Gramlot in the browser. Asqueel JS prepares SQLite, then loads the representative’s customers, products and prices.

  2. 02 / WORK

    Keep taking orders.

    Without a connection, the representative looks up products and records orders and their lines. Queries and writes run against the local SQLite database.

  3. 03 / REOPEN

    Pick up where you left off.

    The offline app retains both the model and the data. Close it, reopen it and continue working with the orders already collected.

  4. 04 / RETURN

    Bring the orders back.

    When a connection is available, the application sends the collected orders to Python for validation and recording in the central database.

One structure, two places to work.

The central database can be PostgreSQL. The browser works with a portable SQLite version of the selected model and data. The application decides what to send and how to accept the returned orders.

Another application · a condominium meeting

Run the meeting.
Even without a signal.

An owners’ meeting works with a small, well-defined set of data. An application built with Asqueel JS and Gramlot could bring that data into the room and keep the meeting moving without a reliable connection.

01 / BEFORE THE MEETING

Prepare a coherent
set of records.

Send the model and the records needed for this meeting: owners, units, ownership shares, the budget, proposed resolutions and relevant documents. SQLite is prepared locally before the meeting starts.

02 / IN THE ROOM

Record what happens,
as it happens.

Register attendance, record votes and check quorum using the rules configured for the meeting. Draft the minutes, add notes and attach documents. The application works against the local database throughout.

03 / AFTER THE MEETING

Return the results
to the central system.

Export attendance, votes, resolutions, minutes and attachments. When connected, the application can return this package to the central system for validation and recording.

The same calculations, in the room and on the server.

Attendance totals, ownership shares and quorum checks expressed with supported model formulas can run in both environments, without implementing the calculations twice. The application defines the voting rules. This workflow needs a coherent starting dataset and a completed result to return; continuous synchronization is not required.

The first adopter

Gramlot puts
the model to work.

Gramlot is the first application framework to use Asqueel JS. Asqueel JS handles the model and SQLite; Gramlot provides the application interface. Together they support a working offline application, including a self-contained HTML export with SQLite built in.

The repository includes a working Python-to-browser transfer example, local editing and export back to Python.

For developers

Install the JavaScript package:

npm install @asqueel/asqueel-js
Shared model, explicit compatibility

Compatibility covers the model structure, query expressions and conventions implemented in both runtimes, with tests against Python. You can reuse those expressions while calling them through Python or JavaScript syntax. This does not imply identical language syntax or coverage of every Python API. Python functions and classes stay on the server; application hooks used locally are written in JavaScript.

Read the capability matrix ↗
What SQLite migrations handle today

Create tables with keys and relationships, add nullable columns and supported indexes. Changes that need table rebuilding or unsupported alterations are reported and block application of the plan.

Explore the migration implementation ↗
Returning data to the server

Source and data transfer are available today. Automatic synchronization, duplicate detection and conflict resolution belong to the application. The Python receiver can load a returned snapshot into a separate SQLite database for inspection before integration.