Need Advice for Structuring a Multi-Page Streamlit App with Reusable Components?

Hello there,

I am working on a Streamlit app that involves multiple pages, each with fairly distinct content and logic. I am trying to keep the codebase clean, scalable, and maintainable. I have already set up basic navigation using st.sidebar.radio() and have split the pages into separate Python scripts. Although, I am struggling a bit with how to best structure shared components like headers, sidebars, reusable functions, data loading utilities across pages.

Right now, it feels a bit messy nsome logic is duplicated, and updates are getting harder to track. I am looking for advice or examples on how others manage this kind of structure in Streamlit. Should I be using a class based approach, or stick with functions and modules?

Are there any recommended design patterns or folder structures for this use case?

Thanks in advance for your help and assistance.