Skip to main content

Project layout

The Liberty Framework is split between two repositories that work together at runtime: the framework binary (liberty-next) reads its per-section configuration from the apps repo (liberty-apps). This page is the file map — where each piece lives, what is committed, what is per-installation.


At a glance​

liberty-next (the framework)liberty/backendfrontend/Reactconfig/app.tomlAdminister → Appconfig/auth.tomlusers, rolestests/liberty-apps (your configuration)config/ ← LIBERTY_APPS_DIRconnectors.tomlConnectors, Poolsdictionary.tomlDictionaryscreens.toml · menus.tomlScreens, Menusdashboards.toml · charts.tomlactions.toml · theme.tomlplugins/Python packagesnomaflow/jobs.tomlNomaflow jobsThe frameworkupgraded, not editedYour configurationwritten by the Settings pagesplugins/next to config/

The framework is told where the apps repo lives via the LIBERTY_APPS_DIR environment variable. Out of the box, with LIBERTY_APPS_DIR unset, the framework reads its per-section TOML from liberty-next/config/ — convenient for local experimentation but not the production layout.


liberty-next — the framework binary​

liberty-next/
├── start.sh ← run/dev helper (build, init-db, init-config, …)
├── pyproject.toml ← Python deps + CLI entry points
├── liberty/ ← FastAPI backend (Python 3.12)
│ ├── main.py ← app factory, lifespan, routers
│ ├── config.py ← TOML loading + env expansion
│ ├── connectors/ ← SQL / API connector engine, dictionary (dictionary.py)
│ ├── auth/ ← local users, OIDC, JWT, permissions
│ ├── screens/ ← screen engine (grid + dialog runtime)
│ ├── dashboards/ ← dashboard layout + widget rendering
│ ├── charts/ ← chart definitions
│ ├── menus/ ← menu tree + permission pruning
│ ├── jobs/ ← Nomaflow (jobs, steps, scheduler)
│ ├── actions/ ← shared actions
│ ├── notify/ ← notifications
│ ├── ai/ ← Anthropic tool-use assistant
│ ├── licensing/ ← RS256 license-key verification
│ ├── web/ ← HTTP routes (one module per area)
│ └── *_cli.py ← CLI entry points (admin, connectors, crypto, license)
│
├── frontend/ ← React 19 + Vite SPA (built to frontend/dist/)
│ └── src/
│ ├── pages/ ← pages, including Settings/ (one editor per configuration type)
│ ├── common/ ← shared UI parts (fields, lists, dialogs, SQL editor…)
│ ├── components/ ← layout (sidebar, app picker, tabs)
│ ├── locales/ ← interface texts, en and fr
│ └── api/ ← REST client
│
├── config/ ← bundled templates + per-installation files
│ ├── app.toml ← application settings — edited in Liberty Next → Administer → App
│ ├── auth.toml ← local users — created by init-db, gitignored
│ ├── *.toml.example ← templates for connectors / dictionary / menus / screens / charts / dashboards
│ └── *.toml ← real per-section files (only when LIBERTY_APPS_DIR is unset)
│
├── tests/ ← pytest suite
└── docs/ ← framework-internal planning notes (not the public docs)
FileStatusEdited by
liberty/, frontend/, pyproject.toml, start.shCommittedFramework maintainers — don't edit per-installation.
config/app.tomlPer-installationLiberty Next → Administer → App.
config/auth.tomlPer-installation, gitignoredliberty-admin CLI / the Liberty Next pages.
config/*.toml.exampleCommittedFramework maintainers — bundled templates.
config/*.toml (without .example)Per-installation, gitignoredEditable from the Liberty Next pages when LIBERTY_APPS_DIR is unset.

liberty-apps — your configuration​

liberty-apps/
├── README.md
├── config/ ← per-section TOML — read by liberty-next at runtime
│ ├── connectors.toml ← pools, connectors and their queries / endpoints
│ ├── dictionary.toml ← data items, enums, lookups, sequences
│ ├── menus.toml ← one menu per app
│ ├── screens.toml ← grids and dialogs
│ ├── charts.toml ← saved charts
│ ├── dashboards.toml ← dashboards
│ ├── actions.toml ← shared actions
│ └── theme.toml ← colours and branding
│
├── plugins/ ← Python packages (functions called by steps and actions)
│ ├── <package>/ ← one folder per package, with __init__.py
│ └── nomaflow/
│ └── jobs.toml ← the Nomaflow job catalogue
│
└── docs/ ← deployment & operations notes (per-installation)
FileEdited byNotes
config/connectors.tomlBuild → ConnectorsOwns the pool registry plus every connector.
config/dictionary.tomlBuild → DictionaryPer-column metadata reused by screens and charts.
config/menus.tomlBuild → MenusOne root per app, optional folder/leaf hierarchy.
config/screens.tomlBuild → ScreensGrids + dialogs + per-field conditions.
config/dashboards.tomlBuild → DashboardsKPI, chart and table widgets.
config/charts.tomlBuild → ChartsChart definitions referenced by dashboards.
config/actions.tomlBuild → ActionsShared actions called by screens.
config/theme.tomlAdminister → ThemeColours and branding.
plugins/nomaflow/jobs.tomlNomaflow → JobsThe job catalogue.
plugins/*/*.pyDeveloperCustom step callables — exposed to the framework via sys.path.

Every file is plain TOML you can read with cat, diff with git, edit in vim. The Liberty Next pages uses the same on-disk format — what you save in the browser is what git status reports.


How the framework finds your config​

The wiring is one environment variable:

export LIBERTY_APPS_DIR="$HOME/work/liberty-apps/config"

When LIBERTY_APPS_DIR is set:

ConfigRead from
connectors.toml, dictionary.toml, menus.toml, screens.toml, charts.toml, dashboards.toml${LIBERTY_APPS_DIR}/<name>.toml
app.tomlliberty-next/config/app.toml (stays per-host)
auth.tomlliberty-next/config/auth.toml (stays per-host)
plugins/ packages${LIBERTY_APPS_DIR}/../plugins/ added to sys.path

When LIBERTY_APPS_DIR is unset, every file is read from liberty-next/config/. Convenient for a single-host dev install; in production keep them separate.

The full env-var contract is documented under Configuration → Environment variables.


Naming conventions​

  • App identifier — every screen, menu and job carries an app field (e.g. nomajde, nomasx1, tutorial). It's the namespace for screen ids and the prefix of the sidebar entry.
  • Connector name — short, kebab-case (jdedwards, tasks, crm-sql). The same name surfaces in the catalog page, the AI assistant tool list and the URL of a query.
  • Pool name — short, lowercase. default is reserved for the framework's own pool.
  • Permission code — sql:<connector>:<query> for SQL queries and api:<connector>:<endpoint> for HTTP/API endpoints. The Liberty Next pages builds them automatically; no manual code is needed.

Version control conventions​

  • liberty-next is upgraded by switching git tags — the framework binary is treated as an external dependency, not modified in place. The liberty-apps repo stays untouched across framework upgrades.
  • liberty-apps is committed normally — every TOML edit done in the Liberty Next pages ends up as a diff in the repo. Commits made by the operator are reviewable like any other code change.
  • Secrets — JWT signing key, master key, license key, AI key — live in the environment, not in either repo. See Encryption & secrets.

What's next​