lin-pulsar-core is the core front-end library of LinPulsar, the component catalog of LinOpenFactory.
LinOpenFactory is a front-end and API building block to quickly create configurable applications. On the front-end side, an application is made of:
| Part | Role |
|---|---|
| LinOpenFactoryUi | Default host application: bootstrap, BFF, authentication, loading of the application config.json. |
| linPulsar | Module Federation remote providing the component catalog: components, generic pages, default modules. |
| Business remotes | Optional Module Federation remotes providing application-specific modules and components. |
| lin-pulsar-core | This library: the contracts and the shared runtime used by the host and by every remote. |
flowchart LR
config[config.json] --> host[LinOpenFactoryUi<br/>host]
host -- Module Federation --> pulsar[linPulsar<br/>catalog remote]
host -- Module Federation --> business[Business<br/>remotes]
core((lin-pulsar-core<br/>shared singleton))
host --- core
pulsar --- core
business --- core
host --> api[LinOpenFactory API]
lin-pulsar-core is shared as a singleton between the host and all remotes: every application part uses the same HTTP client, i18n instance, Pinia stores, UI design and Module Federation instance, all provided by the host at boot.
- Module lifecycle: standardized initialization of federated modules, driven by the application configuration
- Zones: injection of federated or host-local components into named zones of the UI
- Configuration-driven entities: entity and API endpoint configuration, generic CRUD service, field validation
- UI design: Quasar component props defined in configuration files, by namespace
- Filters: filter model, URL synchronization and saved searches stored as user preferences
- Shared services and composables: HTTP client, i18n, notifications, dialogs, dates, templates, formatters, tree and pagination helpers
- Shared TypeScript types for all of the above
| Area | Technology |
|---|---|
| Language | TypeScript |
| Framework | Vue.js (Composition API) |
| UI Toolkit | Quasar Framework |
| Module System | Module Federation |
| Package Manager | pnpm |
Ensure the following requirements to use or develop the library:
- Node.js β₯ 22.19
- Package manager: npm or pnpm to install the library, pnpm β₯ 11 to develop it
- Vue.js 3 project
- Quasar Framework if using UI components
- A bundler supporting Module Federation (Webpack 5, Vite, Rsbuild and Rspack)
Install the library from npm:
npm install @linagora/lin-pulsar-corepnpm add @linagora/lin-pulsar-coreThe library expects the following exact versions, which must be the same in the host and in all remotes:
| Package | Version |
|---|---|
vue |
3.5.39 |
quasar |
2.21.1 |
vue-router |
5.1.0 |
vue-i18n |
11.4.6 |
pinia |
3.0.4 |
axios |
1.18.1 |
rxjs |
7.8.2 |
dayjs |
1.11.21 |
interactjs |
1.10.27 |
@module-federation/enhanced |
2.7.0 |
The host and every remote must share the library as a strict singleton, so that they all use the same version and the same instances:
federation({
// ...
shared: {
'@linagora/lin-pulsar-core': {
singleton: true,
strictVersion: true,
},
},
});This project is licensed under: GNU Affero General Public License version 3
A full technical documentation is available in the docs/ directory.
- π Getting Started
Start here: how to plug lin-pulsar-core into a host application and into a remote.
β
docs/getting-started.md
-
π Module Lifecycle System Learn how the host initializes federated modules from the application configuration, and how modules hook into it. β
docs/module-lifecycle.md -
π Plugin Zone Component (
LinPulsarZoneRenderer) Learn how to render federated or host-local components inside named zones. βdocs/components-plugin-zones.md
-
π§° Services Detailed description of all services provided by the library. β
docs/services.md -
π§© TypeScript Types & Interfaces Detailed description of all types and interfaces exported by the library. β
docs/types-and-interfaces.md
-
βοΈ Field Validation (
useFieldValidation,useQuasarFieldValidation&useQuasarRules) Learn how to implement field validation compatible with Quasar framework. βdocs/field-validation.md -
π Filters (
LinPulsarFilter,LinPulsarFilterSet&LinPulsarFilterValue) Learn how to build filters, save them as favorite searches, and convert/parse filter value expressions. βdocs/filters.md -
π URL Filter Sync (
useLinPulsarFilterUrl) Learn how to use theuseLinPulsarFilterUrlcomposable to synchronizeLinPulsarFilterinstances with the URL query params. βdocs/use-lin-pulsar-filter-url.md -
βοΈ User Preferences System (
useLinPulsarUserPreference) Learn how to manage user preferences using theuseLinPulsarUserPreferenceStore(Pinia state layer) and theuseLinPulsarUserPreferencecomposable (API synchronization layer with backend persistence). βdocs/user-preference-system.md
-
π¨ UI Design Configuration (
UiDesign) Learn how to initialize and use theUiDesignsingleton and theuseUiDesigncomposable for dynamic UI personalization. βdocs/ui-design.md -
π I18n Configuration (
i18n) Learn how to initialize and use thei18nsingleton and theuseScopedI18ncomposable for internationalization. βdocs/i18n.md -
π Notification System (
useNotify) Learn how to use theuseNotifycomposable to display notifications within your application. βdocs/notify.md -
π¬ Dialog System (
useDialog) Learn how to open and close dialogs through the shared UI event stream. βdocs/dialog.md
-
π Pagination (
usePagination) Learn how to convert between backend pagination models and Quasar QTable pagination formats. βdocs/pagination.md -
π³ Tree (
useTree) Learn how to convert between LinPulsar tree models and Quasar QTree component formats. βdocs/tree.md -
π Common Mapper (
useCommonMapper) Learn how to convert between data formats (ISO dates, locale formats, empty records, and Dayjs objects). βdocs/common-mapper.md -
π Dates (
useDayjs) Learn how to use the shared Dayjs instance to parse and compare dates. βdocs/dayjs.md -
π¨οΈ Templates (
useNunjucks) Learn how to render Nunjucks templates used in configuration files. βdocs/nunjucks.md -
π― Value Formatting (
useValueFormatter) Learn how to apply named formatters declared in configuration to raw values before display. βdocs/value-formatter.md -
π Constants Reference of the constants exported by the library. β
docs/constants/index.md
Breaking changes come with a migration guide:
0.0.xβ0.1.0: renaming from@linagora/linid-im-front-corelibto@linagora/lin-pulsar-core
We welcome contributions to improve and extend this core library. Please refer to the CONTRIBUTING.md file for:
- Development workflow
- Code guidelines
- Commit conventions
- Pull request rules