I was working on an unsaved (at least no the last edits) file when the power went off, the edits I did are vital to me. Is there a way to recover them?
Provided that you move quickly you should have some backup files in the same location as your CherryTree document.
For example I have
doc.ctd
doc.ctd~
doc.ctd~~
doc.ctd~~~
This is provided that you had Preferences > Miscellaneous > Saving preset before the accident. I keep a depth of 4 backups. I would copy all such files but one may have already been overwritten.
It may be that the same backup system applies to sqlite file.
Data, which is only “stored” in RAM is never recoverable. You need to think about your auto-save setting or do especially in case of “vital” data very often manual savings + backups.
The general experience is: Users, who have prepared for such events nearly never need those backups. User, who need them, very mostly do not have backups. It seems, that you learned it on the hard way.