LMS Imperium is a compiled version of the Imperium framework that provides the core application logic for multi-domain React applications. The package is designed to be integrated into a user’s project so that they can supply their own configuration files and custom components while keeping the internal implementation details hidden.
LMS Imperium bundles the core Imperium logic into a compiled library that developers can import into their projects. When installed, the package exposes a single React component that can be rendered as part of a larger application. Consumers supply their own configuration and global settings, allowing complete customization without modifying the underlying core logic.
- Compiled Bundle: Provides a complete, compiled bundle of the Imperium logic.
- Encapsulation: Internal source code and implementation details remain hidden from consumers.
- Customizable: Works seamlessly with user-supplied configuration files and global settings.
- Easy Integration: Designed for easy integration with any React application.
- Multiple Formats: Distributed in both ES module and UMD formats to ensure compatibility with various environments.
Developers install LMS Imperium from npm and import the main App component into their project. They then pass their own configuration objects to this component.
To install LMS Imperium, run:
npm install lms-imperium
After installation, you can import the App into you r orject and supply the configurations through props to the App component
import React from 'react';
import ReactDOM from 'react-dom';
import App from 'lms-imperium';
// Import your configuration files
import defaultConfig from './config/defaultConfigs';
import globalConfig from './global/globalConfiguration';
// Optionally, import dynamic configs (if using Vite's import.meta.glob)
const configs = import.meta.glob('./config/*.jsx');
ReactDOM.render(
<App
defaultConfig={defaultConfig}
globalConfig={globalConfig}
configs={configs}
/>,
document.getElementById('root')
);
The above code should go in something like our index.jsx or main.jsx file
(Preferably your main.jsx if you are using react)
LMS Imperium is built to work with configuration properties provided by the user. Consumers pass in their own configuration files when rendering the main App component, which allows you to:
Define Routes: Customize public, protected, and shared routes.
Set API Endpoints: Specify your own API endpoints or other service URLs.
Adjust Global Settings: Override default global settings as required by your application.
Integrate Custom Components: Add or override components in your application while keeping the core imperium logic intact.
Place your configuration files in a dedicated folder (e.g., config/ and global/) within your project.
LMS Imperium is developed using modern JavaScript and React standards. It treats React and other major libraries as peer dependencies to ensure compatibility with your project environment. The package is distributed in both ES module and UMD formats, making it easy to integrate regardless of your project setup.
For support, issues, or feature requests, please refer to the project’s issue tracker. Contributions to improve LMS Imperium are welcome; please adhere to the contribution guidelines when submitting pull requests.
LMS Imperium is released under the MIT License. Please see the LICENSE file included in the package for more information.