This thesis proposes an architecture for user interaction. The architecture is a message-based middleware that controls and manages the interface. The architecture has built-in features like single responsibility, state management and asynchronous messaging. We show that this eases the development of reliable and dynamic user interaction applications in a thread ignorant environment. The controlling of the interface is performed by UML state machines. The architecture is shown to be modular and extendable. New parts of the application, both behaviour and graphical elements, can be added at runtime.A case application has been re-implemented using the architecture of the thesis, and the reimplementation is compared with the analysis of the original.The thesis covers the technical part of user interaction rather than the graphical. The problem addressed is the handling of events and distribution of actions to perform state management in interaction applications.