The JanelKit ecosystem
What ships with janelkit, what each package adds, and how they fit together.
pip install janelkit-routerEcosystem packagejanelkit-storeShared application data: stores with actions, controlled writes and change tracking, one instance per application, and persistence.pip install janelkit-storeEcosystem packagejanelkit-desktopSystem services: native file and message dialogs, and the clipboard. It adds no interface controls.pip install janelkit-desktopEcosystem packagejanelkit-i18nTranslation catalogs, plurals, locale-aware number, currency and date formats, and language switching at run time.pip install janelkit-i18nEditor extensionjanelkit-vscodeSyntax highlighting for .janel files in Visual Studio Code.code --install-extension janelkit.janelkit-janelEverything to build a one-screen app is in the core
pip install janelkit gives you the .janel language and its compiler, reactivity, components, every built-in element and control, layout, styles and themes, windows and screens, async work and timers, video, headless testing and the janel command. A one-screen application needs nothing else.
The packages add what not every application needs. Each one is installed on its own, documented in its own section here, and uses only the public API of the core, like a package you could write yourself.
| I need… | It lives in | Install |
|---|---|---|
| Windows, layout, controls (<button>, <textfield>, <list>, <tabs>, <image>, <video>…) | janelkit (core) | Already installed |
| State, computed values, components, async work, timers, several windows and screens | janelkit (core) | Already installed |
| Interface language and right-to-left layout (locale), themes | janelkit (core) | Already installed |
| Headless tests (janelkit.inspect) and the janel command | janelkit (core) | Already installed |
| Several screens in one window: page stacks with Back, a sidebar with sections | janelkit-router | pip install janelkit-router |
| Data shared by several views or windows, remembered between sessions | janelkit-store | pip install janelkit-store |
| Native file and message dialogs, the clipboard | janelkit-desktop | pip install janelkit-desktop |
| Translation catalogs, plurals, number, currency and date formats | janelkit-i18n | pip install janelkit-i18n |
| .janel syntax highlighting in VS Code | janelkit-vscode | VS Code extension |
How the line between core and packages is drawn
A feature belongs in the core when an application cannot be written, run or composed without it, when it needs internal details that must stay private, or when everything else relies on its behavior. That is why controls, layout and reactivity are core: like HTML elements, the controls are what the platform gives you.
A feature becomes a package when it can be built entirely on the public API and only some applications need it. Packages never import framework internals, and the core never imports them; the repository tests enforce both rules.
One split surprises people: the interface language is core, but translations are not. The current language and its writing direction change the layout of every element, so janelkit.locale lives in the core. Catalogs, plurals and formats live in janelkit-i18n, which changes that core language when you switch.
Common mistakes
- Do not install janelkit-desktop to get controls or windows. It contains only dialogs and the clipboard.
- Do not import pages, persisted, dialogs, clipboard, t or i18n from janelkit. They come from janelkit_router, janelkit_store, janelkit_desktop and janelkit_i18n.
Lowercase is the core, uppercase is imported
In a template, a lowercase tag is something the core gives you: <text>, <button>, <column>. A tag with a capital letter is something your script imports, whether it comes from your project or from a package: <TodoItem>, <Pages>. So a package can add elements without ever clashing with the core’s, and you always know where a tag comes from by reading the script.
One series for every package
A version has four numbers, E.S.M.m. The packages share the series with the core, the first two numbers: janelkit-router 0.2.x.x works with janelkit 0.2.x.x, and each package declares it (janelkit>=0.2,<0.3). When the series changes, every package moves to it, even without changes of its own, so compatibility shows in the number. The last two numbers belong to each package and follow the same policy for its own API. The continuous integration tests every package against the core of the same branch, so no core version that breaks a package of the repository is published.
| Package | Version | Works with janelkit | Python |
|---|---|---|---|
| janelkit-router | 0.2.x.x | ≥ 0.2, < 0.3 | ≥ 3.10 |
| janelkit-store | 0.2.x.x | ≥ 0.2, < 0.3 | ≥ 3.10 |
| janelkit-desktop | 0.2.x.x | ≥ 0.2, < 0.3 | ≥ 3.10 |
| janelkit-i18n | 0.2.x.x | ≥ 0.2, < 0.3 | ≥ 3.10 |
| janelkit-vscode | 0.1.0 | Any (editor only) | Not required |
Learn moreChanges and migration ↗
English documentation based on the JanelKit source. For additional details, browse the source docs ↗.