Unifi Network + EdgeRouter/pfsense

Hello all,
I am a computer science student from Germany and I am planning a network setup for my family’s small company and would like some feedback.

Since one question is mainly about the hardware, I put it here in this category. I hope that fits.

I want to use in a network (divided by VLAN’s) different Unifi products (AP’s, Protect, …). Therefore in this network I need a unifi controller and and for simplicity I will also use unifi switches. However, this network shares the internet connection with other network in which there are several servers, for which I need a proper router (sorry dream machine pro ^^). I would like to use a pfsense box or edge router that manages all firewall, nat rules, … and the VLAN’s.

Now here’s my question: how well does the whole Unifi SDN stack (i.e. the network controller) work if the gateway/router isn’t intrigued in it via software.

Would you recommend this?

Here again the network topology in more detail:

WAN <-> Pfsense <-> Server Network (probably some MikroTik switches)
(Unifi Controller “Zone”)
|--------> Corporate LAN (e.g WIFI)
|--------> Guest WIFI
|--------> IP Cameras (Unifi Protect)

Also it would be great if between the company LAN and the server network 10gbe speed would be possible. (E.g. if I use an EdgeRouter Infinity as a router or connect a 10gbe switch in between.

We often use pfsense with UniFi switches and AP’s and it works great. We generally don’t have issues with UniFi switching and other equipment.

Thanks for the answer!