actualbudget / actual

A local-first personal finance app
https://actualbudget.org
MIT License
14.09k stars 1.12k forks source link

[Feature] Plugin system #973

Closed JazzaG closed 1 year ago

JazzaG commented 1 year ago

Verified feature request does not already exist?

💻

Pitch: what problem are you trying to solve?

Extending on the planned API, a modular plugin system would allow users to add extra functionality to Actual while not bloating the application for users who only need a simple budgeting tool.

Potential plugin ideas might include:

As this feature matures, plugins could support superfluous functionality like theming to allow users to further customise their Actual instance.

Feature requests such as #805, #730, and #737 could be supported with plugins.


In my specific case, I've had to write a program to convert my bank statement PDF into a CSV file so that it could be imported into Actual. I'm looking forward to the release of the API so it can further be automated, but a plugin system would allow me to add this functionality directly into Actual, and I'll be able to share it with other users who would find it useful.

Describe your ideal solution to this problem

See other applications that allows users to extend functionality (Wordpress, Discord)

Plugins would be written in Javascript/Typescript to take advantage of the Actual API. They could be packaged up into a .zip file to be uploaded to some /plugins directory. This directory could be mounted as a Docker volume.

Actual could implement a hook/events system to send data to all installed plugins. For example, loading the Reports page may trigger an event which is picked up by a plugin to then generate a custom report to send back to Actual for rendering.

Plugins could have a dedicated page under the More section of the sidebar menu. A custom importer plugin may have a page to add an API key for a bank. A custom reports plugin may have a page to customise data shown in the report.

Teaching and learning

A plugins page could be added to the Settings page or it could have its own page under the More section in the sidebar. This plugins page would allow users to view installed plugins, remove plugins, and have a form to upload plugins.

Developer documentation would need to written to provide info on plugin development.

j-f1 commented 1 year ago

This is a really interesting idea! I don’t think we will implement it in the near future because:

It would be great if you were willing to share your code for doing the import! I think having a few projects that use the API would make it much easier for others to get started.

We are aware that the API package does not currently work with budgets that have been opened in the latest version of Actual. It should work with older budgets in the meantime if you want to test, and we are planning to do a release of all packages soon. We’re also planning to release the API package more often in the future to prevent that from happening again.