plaid / pattern

An example end-to-end Plaid integration to create items and fetch transaction data
MIT License
445 stars 223 forks source link

Enhancement - filter transactions by date range #189

Closed johndpope closed 2 years ago

johndpope commented 2 years ago

It sounds simple - but currently this is a critical success factor for client. They want to be able to select date range - and filter by this. Otherwise the project is "a failure".

One option I have is to wire everything up to use postgres - and then surface data in something like this https://github.com/priyank-purohit/PostGUI I'd need to then - suck out all transactions -

is there an easier way?

UPDATE image

https://github.com/connorbenton/fin/blob/master/frontend/src/components/TransactionsTable.vue

This work by @connorbenton - was amazing - Ideally - we want a start date / end date - total days / total transactions. The above code was built in vue. It would need to be rebuilt in react.

The date range drop down was also very useful.

fyi - @lindawoo-plaid

johndpope commented 2 years ago

@lindawoo-plaid - is there any feedback ? I'm looking at using supabase.io to handle security and it also has sql filtering out of the box - off the top of your head in pattern example - do you know if the transactions are stored / cached in database? or is it all API driven?

Screen Shot 2021-11-17 at 10 36 29 am
Tarious1 commented 2 years ago

Yes they are stored.  

Sent from Yahoo Mail on Android

On Tue, Nov 16, 2021 at 6:08 PM, John D. @.***> wrote:

@lindawoo-plaid - is there any feedback ? I'm looking at using supabase.io to handle security and it also has sql filtering out of the box - off the top of your head in pattern example - do you know if the transactions are stored / cached in database? or is it all API driven?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

lindawoo-plaid commented 2 years ago

@johndpope yes, the transactions data are all stored in the database in Pattern. You should just be able to query particular dates from the data base. Or, you could do it on the front end, and sort the data by specific dates.

johndpope commented 2 years ago

from frontend - is end goal - I will proof of concept something using supabase - that's easy - but will be incongurent UX - I think having the existing patter code support this functionality out of the box would be ideal. I'm not sure above screen shot is clear enough / but where existing transactions are presented - I just want a subset of the data by clicking start date / end date / or selecting from a range. 30 days / 60 days / 90 days.

UPDATE reviewing this code related to screen shot above - it seems that there's no need to pass dates to backend - https://github.com/connorbenton/fin/blob/master/frontend/src/api.ts

This existing call should all be fine in api.ts

// transactions export const getTransactionsByAccount = (accountId: number) => api.get(/accounts/${accountId}/transactions); export const getTransactionsByItem = (itemId: number) => api.get(/items/${itemId}/transactions); export const getTransactionsByUser = (userId: number) => api.get(/users/${userId}/transactions);

but then the filtering would happen on the frontend. (possibly more complex / - and would assume that the existing transactions are all returned in 1 call - without pagination / which should be fine.)

Is this simple filtering something that could be committed to - or I can go off and create a PR myself.

Tarious1 commented 2 years ago

John I am really  confused.  I've been trying to get my funds  now for months and I need them badly.  Please help me.  I  am not sure what to do.  Step by step.  I see the sandbox is incomplete.  Help me please Sent from Yahoo Mail on Android

On Tue, Nov 2, 2021 at 8:06 PM, John D. @.***> wrote:

It sounds simple - but currently this is a critical success factor for client. They want to be able to select date range - and filter by this. Otherwise the project is "a failure".

One option I have is to wire everything up to use postgres - and then surface data in something like this https://github.com/priyank-purohit/PostGUI I'd need to then - suck out all transactions -

is there an easier way?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

phoenixy1 commented 2 years ago

Hi -- we're really glad that you find this app helpful for your development! That said, we didn't build Pattern with the intention to support it in production and we don't intend to do any custom development on it or build additional features that don't directly demonstrate usage of Plaid API features. We are happy to answer questions about the existing implementation, and if you'd like to add functionality, you are welcome to fork the repo.

johndpope commented 2 years ago

Got it. I've got a way forward that gets around this. I do fork a lot of projects (over +5000)

Don't be offended - but I liken this project (with it's security holes and unproduction-worthiness) to a theme park that welcomes people - yet is somehow not finished - or rollercoast that's dangerous to get on. yet all the precaution is taken care of by posting signs that say - "don't use in production".

image

My client is paying hundreds of dollars / mth for software as service - so the life long value of this client is potentially tens of thousands of dollars. So a little investment to keep people happy goes a long way. My little rant - over.