TidaLuna Development Documentation
If you have not set up your project yet, start here: Getting Started with TidaLuna Development.
Project Overview
After cloning the base project, you are ready to build plugins. You should see this structure:
README.md: Contains documentation and usage information for your plugin.package.json: Defines metadata for your plugin, such as name, version, and dependencies.src/: Contains the source code of your plugin. This typically includes:index.ts: The main entry point for your plugin. This file runs in the Electron frontend and is executed when the plugin is loaded.Settings.tsx: Defines the settings page UI for your plugin, also rendered in the Electron frontend.
Backend Integration
If you need to execute code in the Electron backend, create a new file in the src/ directory with a .native.ts extension. Then import it in index.ts or any other file. Functions exported from .native.ts files will be executed in the Electron backend.
Keep in mind:
- Data between frontend and backend is passed via IPC (Inter-Process Communication).
- Only serializable values (strings, numbers, booleans, arrays, objects, etc.) can be passed.
- Functions, classes, or non-serializable objects cannot be transmitted.
Core Luna Libraries
These are the core libraries you will use most:
@luna/lib: core renderer tools like Redux hooks, IPC wrappers, and helper classes.@luna/lib.native: native bridge APIs for dialogs, update/relaunch, elevation, and stream helpers.@luna/ui: shared React and MUI components, page helpers, and theme pieces.@luna/dev: debugging tools for IPC and Redux logging.@luna/linux: Linux specific integrations.
Guides
Use these guides when you are building real plugins:
- Function Quick Reference: quick lookup table for core functions.
- Plugin Settings: settings patterns used in real plugins.
- Interacting with the Redux Store: listen for actions and dispatch safely.
- Context Menu Actions: add menu actions for tracks, albums, and playlists.
- Native Modules: run code in
.native.tsfiles. - Plugin Unloading: clean up DOM, timers, listeners, and native resources.
- Logging: add useful logs without spamming users.