A generic double-entry accounting library and framework, with a focus on GAAP compliance and adaptability