This paper presents a software architecture for Unmanned aerial system Traffic Management (UTM). The work is framed within the U-space ecosystem, which is the European initiative for UTM in the civil airspace. We propose a system that focuses on providing the required services for automated decision-making during real-time threat management and conflict resolution, which is the main gap in current UTM solutions. Nonetheless, our software architecture follows an open-source design that is modular and flexible enough to accommodate additional U-space services in future developments. In its current implementation, our UTM solution is capable of tracking the aerial operations and monitoring the airspace in real time, in order to perform in-flight emergency management and tactical deconfliction. We show experimental results in order to demonstrate the UTM system working in a realistic simulation setup. For that, we performed our tests with the UTM system and the operators of the aerial aircraft located at remote locations with the consequent communication issues, and we showcased that the system was capable of managing in real time the conflicting events in two different use cases.