Question regarding a payment tracker app

Hello, I’m fairly new to Rails and I’m getting ready to build the app that got me to learn Rails in the first place.

I’m building a budget app. Every month has a budget which has many expenses. It’d be pretty similar to spreadsheet tabs in something like Numbers or Excel. My question is mostly related to the proper modeling of the month and expense classes.

I suspect I could create a Month model which has 1 Budget. Would that be a good approach? The month and budget should be created automatically every month and I’m not quite sure how to pull something like that off. So, once it’s december, a new budget is created for that month. Also, any expenses that weren’t paid off the month before (like credit cards) would make their way to the new budget.

That’s what I’m most struggling with. I’m not quite able to visualize a solution to pull something like that off. I imagine there’s quite a bit of unknowns that will come up, but I was wondering if anyone had any experience with something similar? Could someone point me in the right direction? Do you see any gotchas that stick out to you?

Thanks!

If I were working on this, I’d figure out how to just do one month as a static ‘thing’. So how do I create a a single month. Then how do I create the next month without thinking about linking them together. It seems to me a budget has a date (month + year) that could just sit as a DB column (or maybe two) on the Budget table.

Once you go this figured out, you could build a ‘BudgetExporter’ that runs on the first day of the month that exports anything from the previous month that you might want to pull over. A budget probably has ‘rows’ for lack of a better word that represent expenses that have been budgeted, and those ‘rows’ have debits and credits associated with them.

I hope this is helpful.

Thanks! Yes it is helpful. Now I’ve just got to figure out how to do it :smile: