Restructure folders and files in ruma
farodin91 opened this issue · comments
It would be nice decrease the file numbers in the src
directory.
For example sort database oriented files in folder for example called store
.
For example:
- room.rs
- event.rs
- ...
I agree. We could generally make it more MVC-like, separating the models
and their APIs (DB interactions etc) from the handlers
.
We could start with folder handlers
and start split storage operation slowly.
The api
directory should contain nothing but handlers. I'm gonna reorganize it a little, but not much. The only change I really see that makes any sense at this point would be to group all "model" modules under a parent module, e.g. Event
, Room
, etc.
I moved all the files containing model-esque types into src/models
. Sorry for those with open PRs right now, as it'll give you a little busy work when you rebase. There will be some renaming of the files in src/api/r0
when Ruma is integrated with ruma-client-api.