BitcreditProtocol / E-Bill

Core for Bitcredit project.
https://www.bit.cr/
MIT License
12 stars 2 forks source link

165 add basic structure and modules across interface boundaries #186

Closed zupzup closed 1 month ago

zupzup commented 1 month ago

Unfortunately a bigger one. :)

It's also not optimal to review, since I basically only did restructuring, without changing any logic. So mostly it was cutting up parts into different files, fixing imports and adding pub where necessary. So it's not necessary to check every line of "new" code for correctness.

This fixes #165, adds a structure for documentation and adds the following code structure:

(I commented out the failing tests same as in https://github.com/BitcreditProtocol/E-Bill/pull/182, so the build runs through - they'll be fixed in a different task)

The goal of this PR was to change the structure of the code, without changing functionality to better be able to understand and iterate on the codebase. The idea was also to introduce some interface boundaries, so the different parts are better encapsulated and thus easier to change/test/replace.

@mtbitcr It would be great to hear some feedback from your side here, if this roughly represents your mental structure of the project and if the different pieces of logic are where they belong.

mtbitcr commented 1 month ago

I think this structure is pretty how I imagined it. LGFM!