Metadata-Version: 2.4
Name: liberty-next
Version: 7.0.59
Summary: Liberty Next — connector-driven low-code framework (SQL + API connectors, React admin UI, AI tool-use assistant, dependency-aware deployment packaging)
Author-email: Franck Blettner <franck.blettner@nomana-it.fr>
Maintainer-email: Franck Blettner <franck.blettner@nomana-it.fr>
License: Open framework (free); licensed connectors sold separately — see repository
Project-URL: Homepage, https://github.com/fblettner/liberty-next
Project-URL: Documentation, https://docs.nomana-it.fr/liberty/getting-started/
Project-URL: Source, https://github.com/fblettner/liberty-next
Project-URL: Issues, https://github.com/fblettner/liberty-next/issues
Project-URL: Releases, https://github.com/fblettner/liberty-next/releases
Project-URL: Container Registry, https://github.com/fblettner/liberty-next/pkgs/container/liberty-next
Project-URL: Deployment Configs, https://github.com/fblettner/liberty-next/tree/main/release
Keywords: low-code,framework,fastapi,react,sql,connector,postgres,oracle,dashboard,etl,scheduler,openapi,anthropic,ai,tool-use,admin,toml
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Web Environment
Classifier: Framework :: FastAPI
Classifier: Framework :: Pydantic :: 2
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: System Administrators
Classifier: Intended Audience :: Information Technology
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Database :: Front-Ends
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
Classifier: Topic :: Office/Business
Classifier: Typing :: Typed
Requires-Python: >=3.12
Description-Content-Type: text/markdown
Requires-Dist: fastapi>=0.115
Requires-Dist: fastapi-cli>=0.0.7
Requires-Dist: uvicorn[standard]>=0.32
Requires-Dist: pydantic>=2.9
Requires-Dist: sqlalchemy[asyncio]>=2.0.36
Requires-Dist: asyncpg>=0.30
Requires-Dist: oracledb>=2.5
Requires-Dist: aiosqlite>=0.20
Requires-Dist: httpx>=0.27
Requires-Dist: anthropic>=0.40
Requires-Dist: authlib>=1.3.2
Requires-Dist: itsdangerous>=2.1
Requires-Dist: argon2-cffi>=23.1
Requires-Dist: python-multipart>=0.0.9
Requires-Dist: PyJWT>=2.9
Requires-Dist: cryptography>=42
Requires-Dist: tomli-w>=1.0
Requires-Dist: tomlkit>=0.13
Requires-Dist: openpyxl>=3.1
Requires-Dist: python-socketio>=5.11
Requires-Dist: apscheduler<4,>=3.11
Requires-Dist: watchfiles>=0.21
Requires-Dist: markdown>=3.7
Requires-Dist: jinja2>=3.1
Provides-Extra: reports
Requires-Dist: weasyprint>=63.0; extra == "reports"
Provides-Extra: ldap
Requires-Dist: ldap3>=2.9; extra == "ldap"
Provides-Extra: alembic
Requires-Dist: alembic>=1.13; extra == "alembic"
Requires-Dist: psycopg2-binary>=2.9; extra == "alembic"
Provides-Extra: all
Requires-Dist: liberty-next[alembic,ldap,reports]; extra == "all"
Provides-Extra: dev
Requires-Dist: liberty-next[all]; extra == "dev"
Requires-Dist: pytest>=8.3; extra == "dev"
Requires-Dist: ruff>=0.17; extra == "dev"
Requires-Dist: pytest-asyncio>=0.24; extra == "dev"
Requires-Dist: pytest-html>=4.1; extra == "dev"
Requires-Dist: aiohttp>=3.10; extra == "dev"

# Liberty Next

[![PyPI](https://img.shields.io/pypi/v/liberty-next.svg)](https://pypi.org/project/liberty-next/)
[![Python](https://img.shields.io/pypi/pyversions/liberty-next.svg)](https://pypi.org/project/liberty-next/)
[![Docker](https://img.shields.io/badge/ghcr.io-liberty--next-blue?logo=docker)](https://github.com/fblettner/liberty-next/pkgs/container/liberty-next)
[![Release](https://github.com/fblettner/liberty-next/actions/workflows/release.yml/badge.svg)](https://github.com/fblettner/liberty-next/actions/workflows/release.yml)
[![Docs](https://img.shields.io/badge/docs-nomana--it.fr-blue)](https://docs.nomana-it.fr/liberty/getting-started/)

**A connector-driven low-code platform for business applications.** You describe your
data sources, screens, dashboards, jobs and rules in TOML, or build them in the Settings
editors; Liberty Next runs them: a React workspace, a REST API, a scheduler, a data
explorer, row-level security and an AI assistant that works on your configuration and
your data. Nothing is generated and nothing is stored as metadata tables: the form of a
screen comes from the query it runs, discovered at query time.

Three applications run on it in production, shipped as a separate licensed bundle:
**nomasx1** (JD Edwards security, segregation of duties and licence auditing), **nomajde**
(JD Edwards administration) and **nomaflow** (the ETL and scheduler). A demo application,
**nomademo** (sales analytics from spreadsheets), shows the whole platform on one case.

- 📚 Documentation — <https://docs.nomana-it.fr/liberty/getting-started/>
- 🐳 Image — <https://github.com/fblettner/liberty-next/pkgs/container/liberty-next>
- 🚀 Deployment (Compose, Swarm, TLS, backups, upgrades) — [`release/`](release/)
- 📦 Releases — <https://github.com/fblettner/liberty-next/releases> · 🐛 Issues — <https://github.com/fblettner/liberty-next/issues>

---

## What it does

**Connectors.** SQL pools on PostgreSQL and Oracle (thin driver, optional thick mode for
network encryption and LOBs over database links) with named queries, tables with their
read and write statements, schema and dblink placeholders, server-side filters, sequences
and audit mirrors; API connectors over HTTP with five authentication kinds. Secrets are
`ENC:` values encrypted at rest or `${ENV}` references, never plain text.

**Screens.** A screen is the business object: the columns and their rules, the filters
(cascading through lookups), the dialog with its tabs, nested forms and nested tables,
row actions and toolbar actions (chains of query, confirm, prompt, navigate, notify),
lifecycle hooks, row-level edit rules, bulk edit, Excel import and workbook export,
summary, tree and chart views, saved grid views shared or per user, record locks.

**Dictionary, menus, dashboards.** One dictionary of data items (labels in every
language, formats, enums, lookups, sequences, rules) shared by every screen. Per-app
menus. Dashboards of KPIs, charts and tables with a filter bar and a period picker,
compared with the period before.

**Data Explorer.** A model per app (a hub table and its dimensions) explored without SQL:
rows, measures, filters, a period, pivots, charts, drill to the detail and to the
screen's dialog, calculated fields, saved analyses and dashboards of analyses, shared or
private, exported to Excel and PDF. Apps ship analyses as a bundled catalogue.

**nomaflow.** Jobs made of steps: run a query, copy a table between databases,
load a spreadsheet or a CSV into a table (replacing the partitions the file carries,
refusing a closed period, checking a control total, reporting the rejected rows),
call an API, sync from LDAP, run a Python callable, call another job, render a saved
analysis or a report to Excel or PDF and send it with the run's files attached. Cron
schedules with presets and parameters, retries, missed-schedule detection, retention,
a run history with the step detail and the log.

**Notifications.** Rules on screen events, job events and actions deliver to the portal
inbox (live), by e-mail or through a connector; recipients are users, roles or addresses.

**AI assistant.** An Anthropic-backed assistant in a drawer over every page. It sees what
you are looking at (the screen, its filters, the row you clicked), knows what the
installation holds, queries your data read-only, follows the procedures the apps ship
(playbooks), proposes new queries, dictionary items, screens and menu items that you
apply with one click, and reads the server's jobs, log and integrity checks when the
operator allows it. Starter questions per app and screen, follow-up suggestions, a
model picker, a conversation that stays.

**Access.** Local users or OpenID Connect (any provider), roles with colon-glob
permissions, superusers, and **row-level data scope**: a role's rules on a dictionary
item or a column, with values from a user attribute, narrow every query, export,
explorer, digest and write. Login throttling, rotating refresh tokens.

**Operations.** Every configuration file is edited by a Settings builder, validated,
snapshotted before each save (version history with diff and restore), hot-reloaded, and
packaged with its dependencies for deployment to another install. The apps bundle merges
into the live configuration without clobbering the operator's changes; upgrades are
journaled with the release notes of each version. Health, readiness, request ids, a
technical dashboard with the log tail and the connected users.

---

## Install

**Full guide:** <https://docs.nomana-it.fr/liberty/getting-started/> and
[`release/README.md`](release/README.md).

### Docker Compose

A host needs only the `release/` directory:

```bash
git clone --depth 1 --filter=blob:none --sparse https://github.com/fblettner/liberty-next.git
cd liberty-next && git sparse-checkout set release && cd release
./install.sh full                     # light = the server + its database; full = + Traefik, pgAdmin, Portainer
./install-apps.sh /path/to/liberty_apps-X.Y.Z.whl   # licensed customers: the apps bundle
```

Then `./liberty status | doctor | start | stop | ssl | apps | upgrade | backup | restore | logs`.
The first boot prints the `admin` password once; the license key is set in
Settings → App → License (encrypted at rest).

### PyPI

```bash
pipx install 'liberty-next[all]'      # [all] = PDF reports (needs Pango), LDAP, Alembic
export LIBERTY_JWT_SECRET="$(openssl rand -base64 48 | tr -d '\n=+/')"
export LIBERTY_MASTER_KEY="$(openssl rand -base64 32 | tr -d '\n=+/')"
liberty-admin init-db                 # the auth store + the admin user (prints its password)
liberty-next                          # API + UI on http://localhost:8000
```

The licensed apps on a pipx install: `pipx inject liberty-next liberty_apps-X.Y.Z.whl`,
then `liberty-apps install --target <dir>`, `export LIBERTY_APPS_DIR=<dir>` and
`liberty-admin run-install-jobs`. `liberty-ops` is the Python install's counterpart of the
Docker `liberty` command (status, doctor, backup, restore, migrate, upgrade, rollback).

### From source

```bash
git clone https://github.com/fblettner/liberty-next.git && cd liberty-next
python3.12 -m venv .venv && .venv/bin/pip install -c requirements.txt -e ".[dev]"
./start.sh init-db                    # first run
./start.sh                            # builds the frontend when stale, serves on :8000
./start.sh dev                        # backend auto-reload · ./start.sh frontend → Vite on :5173
.venv/bin/pytest -q                   # 1 470 tests, no live database needed
(cd frontend && npm ci && npm run lint && npm test && npm run build)
```

---

## Configuration

Everything is TOML under `config/`, or under `LIBERTY_APPS_DIR` when the apps bundle is
installed. Every file has a Pydantic model, a Settings editor, a version history and
hot reload.

| File | What it carries | Editor |
|---|---|---|
| `app.toml` | Server, auth, AI, notifications, reports branding, license, OIDC, jobs settings; encrypted secrets | Settings → App |
| `connectors.toml` | Pools, SQL connectors (tables, queries, sequences, lookups), API connectors | Settings → Pools, Connectors |
| `dictionary.toml` | Data items: labels, formats, enums, lookups, sequences, rules | Settings → Dictionary |
| `screens.toml` | Screens: columns, dialogs, actions, hooks, views, exports | Settings → Screens (Visual Designer) |
| `menus.toml` | Per-app navigation and the app's home | Settings → Menus |
| `charts.toml` / `dashboards.toml` | Saved charts; dashboards of KPIs, charts and tables with filters and a period | Settings → Charts, Dashboards |
| `explorer.toml` | Data Explorer models and their bundled analyses and dashboards | Settings → Explorer |
| `actions.toml` | Shared workflows reused by screens | Settings → Actions |
| `notifications.toml` | Notification rules on screen, job and action events | Settings → Notifications |
| `ai.toml` | What the apps ship for the assistant: starter questions and playbooks | Settings → AI |
| `theme.toml` / `reports.toml` | Branding; operator report templates | Settings → Theme, Reports |
| `jobs.toml` | nomaflow jobs, schedules, presets, retention and missed-schedule policies | Nomaflow → Jobs |
| `auth.toml` | Local users and roles (or the database backend) | Settings → Access |

Two secrets stay in the environment: `LIBERTY_JWT_SECRET` and `LIBERTY_MASTER_KEY` (the
AES-256-GCM key behind every `ENC:` value).

---

## Framework and applications

The framework is open. The applications live in a separate repository and ship as a
wheel; connectors flagged `licensed = true` load only under an RS256 license key, set in
Settings → App → License and checked with `liberty-license verify`. Without a key the
framework runs in restricted mode. An installed bundle is merged into the live
configuration per entity: new entities are added, untouched ones refreshed, the
operator's overrides kept.

Building a new application on the framework is a configuration job, not a project. The
`nomademo` app is the worked example, and the repository ships a Claude Code skill,
`/build-app`, that assembles an application from a description of the need.

---

## Operating it

| URL | Purpose |
|---|---|
| `/` | The workspace: sign-in, tabs, Settings, the assistant drawer |
| `/docs`, `/redoc`, `/openapi.json` | The API reference |
| `/api/*`, `/admin/*` | The API; the operator endpoints (superuser) |
| `/health`, `/ready`, `/info` | Liveness, readiness (pool ping), public counts and versions |

Settings → History holds the per-file version history, the screen bundles and the
upgrade timeline with each version's release notes; Settings → Release notes the full
changelog in English and French (also in the wheel as `liberty/RELEASE.md` and
`RELEASE.fr.md`).

---

## Releasing

`develop` is the working branch; `main` is release-only. Every push to `develop` and
every pull request to `main` runs the CI (ruff, pytest, eslint, vitest, the build). A push
to `main` runs [`release.yml`](.github/workflows/release.yml): it reads the version in
`pyproject.toml` (and bumps the patch when that version is already tagged), requires a
real `## <version>` section in `liberty/RELEASE.md`, builds the wheel and the multi-arch
image, tags, and publishes to PyPI and GitHub. Bump the version in `pyproject.toml` before
merging for a minor or major release. If the PyPI publish fails, the version is burned:
bump and push again.

---

## Stack

Python 3.12 · FastAPI · SQLAlchemy 2.0 async · asyncpg · oracledb · Pydantic 2 · PyJWT ·
authlib · argon2 · APScheduler · python-socketio · tomlkit / tomli-w · openpyxl · WeasyPrint
(optional) · Anthropic SDK — React 19 · Vite · TypeScript · emotion · react-i18next ·
TanStack Table · Recharts · Monaco.

## Repository layout

```
liberty/        the framework: main.py (create_app), runtime.py (the reload path), config.py,
                connectors/ auth/ screens/ menus/ charts/ dashboards/ actions/ explorer/ ai/
                jobs/ etl/ reports/ notify/ changesets/ versioning/ userviews/ web/ (the HTTP layer)
                RELEASE.md · RELEASE.fr.md · the CLIs (cli, admin_cli, ops_cli, migrate_cli, license_cli, crypto_cli)
frontend/       React 19 + Vite + TypeScript; dist/ is served by the backend
config/         app.toml and the *.toml.example templates
release/        Docker Compose layouts, the `liberty` ops command, install / upgrade / backup scripts, Traefik
docker/         the entrypoint and the vendored Oracle Instant Client
tests/          pytest, SQLite fixtures, no live database
.claude/skills/ Claude Code skills shared with the repository (build-app)
```

See [`CLAUDE.md`](CLAUDE.md) for the map of the code and the rules of the house.

---

## License

The framework is free to use. `nomasx1`, `nomajde` and the other licensed applications
are sold separately and unlocked by a license key.
