Where is the code for alarms?

I am looking to add a feature to my own fork of Joplin.

Basically, when a todo in a certain notebook has an alarm, and that alarm rings, I want the note to be moved to a different notebook.

Any ideas where I can start looking in the code to implement this feature?

It’s in AlarmService.js but I think this feature will not be accepted as it’s more like scripting, which might be useful to a user or two, but not to most users. Perhaps what needs to be done are better scripting capabilities in Joplin. There’s already the API, which could help do what you want. In the forum, we’ve also discussed adding script support in the app (something that will launch an external script, with a note or notebook ID as argument).