How to structure an ionic app to use most of the code in the web version of a website

Hello guys,

I’m new to ionic and I’m wondering what is the best way to structure my ionic code, in a way to use most of it in a SPA, so I don’t have to rewrite it, and have a similar code?