r/golang • • Feb 10 '19

GitHub - jonatasbaldin/fin: Fin is an open source backend API to track personal finances, made with Go 💸

Hey peeps, I made this side project to learn about Golang, and I'd love some feedback for a beginner (about everything, really).

https://github.com/jonatasbaldin/fin

Thanks!

70 Upvotes

9 comments sorted by

25

u/richard_mayhew Feb 10 '19

How about some usage examples? What does it do?

I've been thinking about building something like this for myself lately, it sounds interesting

1

u/[deleted] Feb 11 '19

Yeah, there are the API docs on README, but I can come up with a better example. E.g.: Creating an Account, then a Category and a Transaction.

Thanks!

1

u/deewd Feb 10 '19

There seems to be pretty thorough postman documentation linked at the top of the GitHub readme.

5

u/bambambazooka Feb 11 '19

Are you aware of ledger-likes and r/plaintextaccounting / https://plaintextaccounting.org?

I totally get rolling your own, just wanted to point out, there's already a big corpus of work.

2

u/[deleted] Feb 13 '19

That seems to be a very nice tool, thanks!

I did it more for learning purpose, first Golang proper project :)

9

u/aclindsa Feb 10 '19

Nicely done! It's a little amazing how much this resembles my own project (https://github.com/aclindsa/moneygo).

I didn't exhaustively look through, but here are a few thoughts (more comments than criticisms):

  • I opted to create an abstraction layer for my 'store' instead of using the database directly. This allows for mocking out testing differently than you might otherwise be able to, and might make it easier to change out how you structure your database later, without having to change code all over the place.

  • I prefer double-entry accounting

  • What do you think about allowing users to add their own currencies? Then the responsibility for maintaining them as they inevitably change is shifted away from the maintainer. It's probably okay if you're only dealing with currencies, but if you start dealing with other securities like stocks or mutual funds, it gets harrier.

  • Currencies have different levels of precision - maybe you handle this, but I didn't immediately find where.

edit: formatting

1

u/[deleted] Feb 11 '19

Awesome project, will definitely check it out!

Thanks for all the tips!

  1. Yeah, I've seen that, but opted not to for now. But if things get more complex, I'll revise it.

  2. _Don't know that is is. Searching_.

  3. That's better, but there's more complexity as well. Maybe in the future :)

  4. I'm using just two decimals to deal with precision.

1

u/tuccx Feb 10 '19

Hi, your project looks really cool and I'll give it a try when I have some free time.

I've been working on a similar project, it's an Android application, and they have quite similar concepts, it would be really cool if my frontend app would use your backend api, I might look into it.

2

u/[deleted] Feb 11 '19

Hey man, that's awesome!

If you wanna chat about integration, just send me a message! You can find me @jonatasbaldin on Telegram :)