lucavenir / riverpod_architecture_example

A pragmatic approach when writing a riverpod app
MIT License
46 stars 5 forks source link

Test Examples #12

Open michaelbart opened 1 month ago

michaelbart commented 1 month ago

Love the example you have presented here, it's a very valuable resource for me as this is my first time working with riverpod. I was wondering if you plan on adding some example tests; would be interested in seeing how that's structured and what it looks like to have a mock repo/api client.

Thanks for taking the time to build this repo out!

lucavenir commented 1 month ago

Hi! Sure (: It's been in the roadmap since a while. Unluckily I've got little time...

I also plan to further simplify the whole architecture. Simple is good, especially if working with Riverpod.

michaelbart commented 1 month ago

In what ways are you thinking about simplifying it?

lucavenir commented 1 month ago

Given a feature, one could simplify its file system structure like so:

So that we don't need the tedious data / presentation / domain subfoldering, which make no sense imho.

Also, anything related to the data layer deserves an ad-hoc folder, away from lib. This enables extracting the data layer even to another package, if necessary.