joaquimadraz / opensubs.io

:money_with_wings: Track recurring bills and subscriptions
MIT License
39 stars 11 forks source link

Categorization (personal, business, services) #24

Open joebew42 opened 6 years ago

joebew42 commented 6 years ago

Hi @joaquimadraz ,

I am doing some live coding on Twitch and I would like to contribute to your project, so I tried to take a look and I've seen that there is something in the "nice to have" features that I could try to tackle: the categorization (personal, business, services) feature.

I would like to know how do you imagine that feature is supposed to be implemented. If you provide some enough instructions I think I can start work on it. In the meantime I'll try to setup the project on my local machine and undestand something about it.

Thank you, joe.

joaquimadraz commented 6 years ago

Hey @joebew42 thanks for reaching out. I'd be pleased to have another contributor 👍

So my initial goal with the categorization was to have an idea of how the expenses are distributed. For instance:

screen shot 2018-05-21 at 21 59 39

These stats could be put on the "All payments" page, and later this could also be used to personalize the messages on emails and monthly pagination.

What do you think?

joebew42 commented 6 years ago

Hey, perfect! In the meantime I'm trying to get the application up and running. I see that there are a few enhancements we can add in order to help people with the onboarding process (setup, seed, etc ...) for the development.

As soon as I am ready I will back to you to ask further details about this feature, ok? Do you have a gitter channel for this project? A place where we can chat about it could be useful. What do you think?

joebew42 commented 6 years ago

Hi @joaquimadraz ,

I just had the time to run the application on my local machine and play with it a little bit. I am here to ask you some questions.

  1. How it is supposed a user should categorize a payment? We have to consider to add a new field category for each payment entry? Like the simple mock up that you can find below?

screenshot-20180601-19 21 33

If yes, where we can start with? Can we consider to add a free editable input text box? Or, we may have to consider to have a separate page, like settings -> categories where the user can organize all categories and then choose one of it through a dropdown menu' from the create payment modal window?

  1. Can we associate more than one category to a payment?

  2. How do you think the page all payments should be changed? Right now we have this kind of visualization:

screenshot-20180601-19 21 08

The user will switch to the "categorization visualization" by clicking on a link above the list, or do you have in mind some different mechanism?

  1. What the percentage value will represent there? The number of payments for each category, or the overall expenses for each category?

I think it could be useful if you share some mockups and some more details about this feature.

Thank you again, joe!

joaquimadraz commented 6 years ago

Hey @joebew42,

  1. A category input on the subscription modal sounds good. I would probably go for dropdown with some default categories like we are doing with services (Github, Spotify, etc.). Later we could add a setting to manage categories.
  2. I was thinking about keeping it simple and have only one category per payment.
  3. My idea was to split the all payments page in two. Same list as before on the left and a spendings section where we can see the payments breakdown by category.

sketch

Just realized the percentages on the list are different from the chart. My bad.

  1. The percentages refer to the amount spent by category.

    What do you think?

joebew42 commented 6 years ago

Thank you for all your answers, so clear!

joebew42 commented 6 years ago

Hi @joaquimadraz,

just another question related to the Other category. What happens when the user don't specify a category? We may have to fall back to a default one (e.g. Other) or we may allow user to specify an empty category? In this case, how it is supposed to show the categorization for all the payments that haven't a category? :thinking:

joaquimadraz commented 6 years ago

I think it would be interesting to separate Other and Uncategorized payments. Here are some things that comes to mind:

Does it make sense?

joebew42 commented 6 years ago

It makes sense. So, we can end up with these requirements:

Right?

joaquimadraz commented 6 years ago

Correct 👍

joebew42 commented 6 years ago

Hi @joaquimadraz ,

I have this first API proposal for the spendings summary, let me know what you think about:

HTTP GET /api/subscriptions/summary

{
  data: {
    currency: "EUR",
    currency_symbol: "€",
    total: "6789.99",
    spendings: [
      {category: "travel", amount: "239.99"},
      {category: "videogames", amount: "999.99"},
      {category: "other", amount: "9.99"},
      {category: "uncategorized", amount: "1900.00"},
    ]
  }
}

So, basically the fields currency and currency_symbol comes from the User, and the spendings will be a list of all expences grouped by category. In this way we let the client (e.g. Reactjs) decide what to do with this data. What do you think?

joaquimadraz commented 6 years ago

Hey @joebew42, sorry for the late reply.

Looks good. Just one thing, should we also return the total spending in this request to calculate the percentages?

joebew42 commented 6 years ago

Looks good. Just one thing, should we also return the total spending in this request to calculate the percentages?

Of course, we can adapt the API in order to return the total spending too!