Clean architecture with Ionic 2

Hey there, I’m working on an app that will be released for iOS and Android with Ionic 2, but I also need a web app. Since Ionic 2 is not made for web apps, I want to achieve this by putting as little code as possible into the Ionic 2 layer and have most business logic in some kind of core app.

This way, I hope to share 90% of the code between the apps and the web app.

Since it took me quite some time to get used to Ionic 2 and the whole Promise/async thing when working with PouchDB/CouchDB, I wrote a small app to demonstrate how to separate the code.

Here’s a link to the repository. I hope it’ll help someone, because right now, most tutorials glance over these details :wink:

Ionic 2 Sample Todo App on Github