Clean architecture with Streamlit?

What are some examples of programming models that are similar to Streamlit?

My current strategy has been to store “view” controls in a separate module, and then just calling view.put_button_here() while behind the scenes I’m doing state.control = st.button(), and from anywhere else I call state.control whenever I need that state, and then I springle some old school layering on top, like a Repository class to clean up the data access.

Besides that I have really no idea what an ideal architecture should look like.

I don’t have much experience outside of Python. Would SwiftUI be a similar analogy to follow? Streamlit projects I’ve looked at are mostly teeming with “backend logic”, and really only have a slider and a graph on the frontend, so they don’t really have to deal with any of these issues.