ethantrang / nina-py

0 stars 0 forks source link

Refactoring and Determining Boilerplate Structure #1

Open dillondesilva opened 2 months ago

dillondesilva commented 2 months ago

Keeping this issue to store ideas for how the application should be structured in the boilerplate. This will likely inspire any future ideas for the framework

Currently identified areas that need work are:

dillondesilva commented 2 months ago

Something I noticed:

Routing in this app is not structured and we should ideally take care of this in a boilerplate. The moment I moved one of the pages (Home.py) into a different folder, everything broke and I needed to fix the names. My suggestion for this is to build a feature into our framework to handle routing. Instead of doing st.switch_page("Home.py"), developers would call something like nina.router.push("\") in their code and our framework takes care of this

dillondesilva commented 2 months ago

Then similarly, all this authentication code can be bundled in the module nina.auth instead of Home.py. It is also starting to become apparent to me that this could be a substantial project - we may want to start with the following abstractions: