I ended up setting up a Nextcloud server. It has a calendar service that suits my needs, coming from Google calendar. It is open source, and the nextcloud platform is basically built to be extensible, but I don't know how developer friendly is the calendar app itself. Check it out though!