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 get | What it does |
|---|---|
| A data dictionary | You describe an entity and its fields as ordinary rows. Triggers create the real table, its columns, its indexes, and its search. |
| Permissions | Permissions, roles, and a permission hierarchy, with loop detection built in. |
| Row-level security | Every generated table gets policies that ask the permission system who is reading before returning a row. |
| Business logic | Validation, computed fields, and row visibility, written as JsonLogic and evaluated in the database. |
| An audit trail | Every change to a record, and every change to the schema, recorded in a table. |
| A message queue | Queues with topic routing, plus permission-checked functions to read and write them. |
| API keys | Generate 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.
| Route | Best for |
|---|---|
| Semantius Open Source | The 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 image | Trying it out, and most setups you run yourself. The extension is already installed when the database starts. |
| Installing the extension | A PostgreSQL 18 server you already run and administer. |
The pg_semantius CLI | Neon, Supabase, and other hosted databases, which do not allow custom extensions. |
Next Steps
- Self-Hosting: the whole platform, in one command.
- Run the Docker Image: the fastest way to a working database, with nothing to compile.
- Install the Extension: put it on a PostgreSQL 18 server of your own.
- Reference: the functions, the roles, and every error the install can raise.