Follow these steps to set up your environment for building and testing your module:
- Install LynxHub using one of the following options:
- Locate the app data folder:
- Launch LynxHub
- Navigate to the Settings page
- Go to Data Management -> Data
- Note: You can change the path in this section if desired
- Create a module folder:
- Open the
Modules
folder in the app data directory - Create a new folder for your module
- Open the
- Develop and build your module
- Install your module:
- Place your built module data inside the folder you created in step 3
- Restart LynxHub
- Verify module loading:
- Your module should now be loaded and ready to use
- If you don't see your module, check the main and renderer console logs for any errors
-
Clone the repository:
git clone https://github.com/KindaBrazy/LynxHub-Module-Guide cd LynxHub-Module-Guide
-
Install dependencies:
npm i
-
Configure module information:
- Edit the lynxModule.json file with your module details
- Refer to the lynxModule.json tips for guidance
-
Set up compilation path:
- In index.js, update the
compiledPath
variable (line 9) with your module's path in the app data folder:const compiledPath = path.join('C:\\Users\\USERNAME\\Documents\\LynxHub\\Modules\\YourModuleName');
- In index.js, update the
-
Implement renderer functionality:
- Edit the renderer.ts file
- Check renderer.ts tips
-
Implement main process functionality:
- Edit the main.ts file
- Check main.ts tips
-
Build and install your module:
- Automatic build and install:
npm run build:move
- Manual build and install:
Then copy lynxModule.json and the compiled
npm run build
scripts
folder to the app modules folder
- Automatic build and install:
Important
For LynxHub to recognize your module, ensure the following structure:
Root folder
lynxModule.json
filescripts
folder
Inside scripts folder
renderer.mjs
filemain.mjs
file
For detailed information on data types and descriptions, refer to the types.d.ts file. Additional important information not covered in the d.ts file or JSON will be explained below.
lynxModule.json Tips
id
: Unique identifier for your module to prevent conflictsrequireAppBuild
: The LynxHub build number your module is compatible with- Find this in the app under Settings -> About
- Used to check compatibility if the module API changes in future updates
repoUrl
: GitHub repository URL for cloning and updating your module- Where lynxModule.json file exist
changeLog
: Document update changes- Use
\n
for line breaks (other escape characters like\t
are not supported)
- Use
renderer.ts Tips
- Must have a default export
- Executes in the Electron renderer process (browser environment)
- Use this file for UI-related functionality and user interactions
main.ts Tips
- Must have a default export
- Executes in the Electron main process (Node.js environment)
- Use this file for system-level operations and background tasks
Tip
- I'm continuously working to enhance LynxHub's modularity and customization options. >
- In future updates, modules will be able to install and manage their own AI interfaces, rather than relying solely on LynxHub's built-in options.
Tip
Extensions: While I can't provide an exact timeline, I'm planning to implement a system for extensions that will offer complete customization and modification capabilities.