I haven’t tried it yet myself, but I’ve been looking to move away from Notion and this looks interesting. It’s billed as open source but I came across this on their alternativeto.net page: “Notice: the backend code will be open-sourced as soon as we’re sure that the backend service meets the security standards.”
I’m not sure if that’s still relevant or not, but am posting it FYI.