Semantius Logo
DocsReferencepg_semantius

pg_semantius

On this page

pg_semantius is the core of Semantius, packaged as a PostgreSQL extension. Install it into a database you run yourself, and it adds the data catalog (a data dictionary that builds tables for you, a rule engine for permissions and business logic, and an audit trail) and a message queue.

All of it is enforced inside PostgreSQL rather than in an application sitting in front of it. Nothing can go around the rules. An agent, a script, a SQL client, and a second API all pass through the same checks.

Everything lives in semantius/semantius, under the MIT license.

What It Adds

What you getWhat it does
A data dictionaryYou describe an entity and its fields as ordinary rows. Triggers create the real table, its columns, its indexes, and its search.
PermissionsPermissions, roles, and a permission hierarchy, with loop detection built in.
Row-level securityEvery generated table gets policies that ask the permission system who is reading before returning a row.
Business logicValidation, computed fields, and row visibility, written as JsonLogic and evaluated in the database.
An audit trailEvery change to a record, and every change to the schema, recorded in a table.
A message queueQueues with topic routing, plus permission-checked functions to read and write them.
API keysGenerate a key against a user, and validate it later.

Four Ways To Get It

Pick one. They all give you the same database. The first also starts the rest of the platform around it; the other three differ in how much you do by hand.

RouteBest for
Semantius Open SourceThe whole data platform: the data catalog, a REST API, the web app and sign-in, started together in one command. It runs the Docker image below as its database.
The Docker imageTrying it out, and most setups you run yourself. The extension is already installed when the database starts.
Installing the extensionA PostgreSQL 18 server you already run and administer.
The pg_semantius CLINeon, Supabase, and other hosted databases, which do not allow custom extensions.

Next Steps