Skip to content
This repository has been archived by the owner on Mar 1, 2021. It is now read-only.

start a Django app #28

Closed
chadwhitacre opened this issue Nov 15, 2016 · 30 comments
Closed

start a Django app #28

chadwhitacre opened this issue Nov 15, 2016 · 30 comments

Comments

@chadwhitacre
Copy link
Contributor

chadwhitacre commented Nov 15, 2016

@nobodxbodon @JessaWitzel Picking up from gratipay/inside.gratipay.com#867 (comment), gratipay/inside.gratipay.com#878 (comment), and gratipay/inside.gratipay.com#871 (comment) ...

When @nobodxbodon and I met last week, we proposed writing a Django application to help us visualize and manage our budget and financials. Our thought was to start by porting over our budget, which is currently in a Google Sheet.

I propose that we add the Django app to this repo, and deploy it to Digital Ocean. What I envision is that we can use Ledger CLI under the hood to run the reports, and we can use Django to read and eventually write the data that Ledger processes. Waddya think? :-)

If you're open to the basic idea, then let's discuss requirements and priorities ...

@chadwhitacre
Copy link
Contributor Author

Bringing over some relevant comments:


That brought us to the tech stack question (3). Long story short, @nobodxbodon is really interested in working on our finances ("If not the most critical part, it's definitely one of them"), and we decided to give Django a try for a finances app that would start out by replacing our budget spreadsheet, and could evolve to take over the access dashboard as well. I'll let @nobodxbodon say more when he's ready.

[…]

We finished by diving into the finances repo to look at what's already there. @nobodxbodon: In addition to digesting the README and trying out the code there, see #308 for the top of a deeeeeeeep rabbit hole that @kaguillera and I went down, where we looked at Xero and eventually landed on the Ledger-based solution I started showing you today)—and then check out #22 for the unfinished conversation about converting to GnuCash.

gratipay/inside.gratipay.com#867 (comment)


Here's a mock of the cost part, based on current finance spreadsheet. After discussion, it occurs to me that links of related issues in github can address the "why" and "how" to each cost for business handlers clearly. They serve as sources for (especially external) tech guys to check details and comment, as well as index of internal how-to documents. It's not a strict UI mock of the page, and mainly demo the content that needs to be associated.
mock - accounting cost 20161112_220131

gratipay/inside.gratipay.com#878 (comment)


As a pretotype, how about I start with some mostly static page(s), instead of a Django app, and see if they look right?

gratipay/inside.gratipay.com#878 (comment)


@whit537 as I'm looking at the finance spreadsheet again, it seems the top 3 items makes more than half of the cost. I'm interested in the finer breakdown, like the heroku instances involved, etc. These will be necessary for the mock above as well. My guess is there can be savings somewhere, but I won't be sure unless I see what detailed items are burning money and why. Could you point me to some reference issues please?

gratipay/inside.gratipay.com#878 (comment)

@chadwhitacre
Copy link
Contributor Author

I just discovered http://plaintextaccounting.org/. :-)

@chadwhitacre
Copy link
Contributor Author

@chadwhitacre
Copy link
Contributor Author

Here's what I think we should do:

  1. Start keeping records, using the existing Ledger-based system we have today in this repo.
  2. Write a Django app (also in this repo) to display the balance sheet and income statement, driven by Ledger under the hood. Deploy it.
  3. Move our budget from the spreadsheet into a file in this repo.
  4. Add a budget report to the Django app.

What say ye, @kaguillera @nobodxbodon @JessaWitzel, et al.?

@nobodxbodon
Copy link
Contributor

+1
Is there some convention how to keep the records up-to-date? Or will we establish some from now? Because keeping records can be done independently with the app.

@chadwhitacre
Copy link
Contributor Author

@nobodxbodon Here's the process we came up with:

https://github.com/gratipay/finances#workflow

@JessaWitzel
Copy link

How would ledger and this Django app help you reconcile your accounts and make sure that planned spending == actual spending? I use YNAB for my personal budget and find that part to be important. Or will you have to take the extra step to match them up manually?

@JessaWitzel
Copy link

Maybe that's not important. Read the docs and per usual I understand enough about it to feel like I don't understand it at all.

@nobodxbodon
Copy link
Contributor

AFAIK there's no planning of spending yet, and the first step would be to book-keep actual spending.

@chadwhitacre
Copy link
Contributor Author

I'm working on putting the expense report on gratipay/inside.gratipay.com#867 into ledger format for 2016-11 so we can see what this looks like with a practical example.

@chadwhitacre
Copy link
Contributor Author

PR for that in #30.

@mattbk
Copy link

mattbk commented Nov 17, 2016

How would ledger and this Django app help you reconcile your accounts and make sure that planned spending == actual spending? I use YNAB for my personal budget and find that part to be important. Or will you have to take the extra step to match them up manually?

I think any type of comparison would be outside of Ledger because that isn't what it's designed to do. How does YNAB do it?

@mattbk
Copy link

mattbk commented Nov 23, 2016

Does https://github.com/dulaccc/django-accounting/ fit at all?

@chadwhitacre
Copy link
Contributor Author

Interesting! Hmm ... https://twitter.com/whit537/status/801551260201734146

@kaguillera
Copy link
Contributor

kaguillera commented Nov 24, 2016

!m @mattbk I was actually looking at that and going to test it out today.
I think that I will look at it on Friday.

@chadwhitacre
Copy link
Contributor Author

I think an MVP here would be three simple pages:

  1. Homepage, with two links to:
  2. Income Statement
  3. Balance Sheet

(2) and (3) would shell out to the relevant scripts in bin to generate the relevant report, and display it in the browser. To start with this could be just in a pre tag.

Does that sound good to you, @nobodxbodon? :-)

screen shot 2016-11-30 at 2 07 37 pm

@chadwhitacre
Copy link
Contributor Author

How would ledger and this Django app help you reconcile your accounts and make sure that planned spending == actual spending? I use YNAB for my personal budget and find that part to be important. Or will you have to take the extra step to match them up manually?

I think any type of comparison would be outside of Ledger because that isn't what it's designed to do. How does YNAB do it?

We can use Ledger for budgeting: #12. Once we had a budget report set up in Ledger we'd then add a third link to the Django app.

@nobodxbodon
Copy link
Contributor

I think an MVP here would be three simple pages:

  1. Homepage, with two links to:
  2. Income Statement
  3. Balance Sheet

Shall we create some charts like mock below (please correct me if I read the report wrong), to make the report easier to understand?
screen shot 2016-11-30 at 12 33 08 pm

Charts for all the reports may fit into one dashboard all together.

@chadwhitacre
Copy link
Contributor Author

@nobodxbodon I know for myself I want to see a standard income statement and balance sheet. If we want other reports and charts that's okay too, but, I think we should start with the standard reports. The main point on this PR is to get something together in terms of a Django app that we can deploy over in #29. Release early and often! MVP and iterate! :-)

@nobodxbodon
Copy link
Contributor

we should start with the standard reports

@whit537 +1. I put the mockup mainly to get some feedback.

@chadwhitacre
Copy link
Contributor Author

The main point on this PR

Erm, sorry. This isn't a PR! :-)

@nobodxbodon
Copy link
Contributor

Trying to create a skeleton django app with a page of balance sheet, but not sure how to get the ledger result in the view. Seems not a good idea to call ledger every time.

@chadwhitacre
Copy link
Contributor Author

Seems not a good idea to call ledger every time.

I think calling ledger for every request is fine, since a) this is a low-traffic app, and b) Ledger is written in C.

@nobodxbodon
Copy link
Contributor

nobodxbodon commented Dec 18, 2016

Now that I actually tried to work out the demo, I'm more inclined to go with existing solutions like fava. There are other options here.

There's already nice tutorial like this to setup a complete personal finanical system (web UI). It can totally apply to here IMO.

@chadwhitacre
Copy link
Contributor Author

@nobodxbodon Nice find! Fava looks great at first blush—I like seeing the income statement and balance sheet right off the bat in the navigation. What would you see as next steps?

@nobodxbodon
Copy link
Contributor

@whit537 I'll try to setup a demo based on the tutorial like above, on pythonanywhere, with the existing data. In my impression the file format of beancount is very similar to ledger's.

If it works out, we may close this ticket and start setup formally, with the considerations of continuous financial data feeds, etc.

@nobodxbodon
Copy link
Contributor

Just started fava locally with example beancount file from the tutorial (screen below). Appears there's difference between ledger and beancount. Could you go through it to see if it actually suits us?

example

@chadwhitacre
Copy link
Contributor Author

Alright, I just read the comparison document, and I am excited to give Beancount a try! I did not appreciate the extent to which it is a mature alternative to Ledger.

@chadwhitacre
Copy link
Contributor Author

I especially like that it's written in Python 3, and has extensive documentation. The docs give the impression that it has a much tighter design than Ledger:

If people don't want to use them [virtual accounts], that's fine. But Ledger is not an accounting tool; it's a tool that may be used to do accounting. As such, I believe virtual accounts serve a role that others with non-accounting problems may wish to fill.

I respectfully beg to differ.

And even the built-in web interface would be wonderful for our purposes right now:

screen shot 2016-12-21 at 4 03 24 pm

@chadwhitacre chadwhitacre mentioned this issue Dec 21, 2016
17 tasks
@chadwhitacre
Copy link
Contributor Author

Closing in favor of #35.

!m @nobodxbodon

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants