maybe-finance / maybe

The OS for your personal finances
https://maybe.co
GNU Affero General Public License v3.0
29.47k stars 2.25k forks source link

Add Teller as primary bank connector option along with Plaid/Finicity #19

Closed Shpigford closed 8 months ago

Shpigford commented 8 months ago

The original app made extensive use of Plaid + Finicity for bank data. Unfortunately they both require enterprise contracts to make use of.

A much more human-friendly alternative is Teller. While they don't offer quite as much coverage on the bank connection front (yet), they do offer billing that's essentially free for a single user. So, this is likely the best option for a personal finance app like this that someone may run just for themselves.

https://teller.io

We have the general concept/framework of multiple data providers already in the app where data from each gets cleaned up and distilled in to more common tables.

This project would mean adding Teller as another data provider and ultimately using whichever provider there are API keys for.

Ultimately this sets the stage for adding any data provider down the road (though that specifically is outside the scope of this).

This particular issue is about getting a banking provider added ASAP so Maybe can have utility without needing Plaid/Finicity accounts.

Rough deliverables:

  1. Institution listing (for use in Institution search) — This needs to automatically update as Teller adds support for new institutions.
  2. Abstracting bank connections away from user accounts — Right now we've got hard-coded columns for Plaid/Finicity. We need to pull those out with the goal of users ultimately being able to add many different connectors.
  3. Checking account support
  4. Savings accounts support
  5. Investment account support
  6. Remove any current blocking dependencies of Plaid/Finicity — I think we've got some code in there that still relies on data sourcing from Plaid/Finicity
  7. Readme user instructions on adding Teller support (presumably just via an .env variable API key)

Note about the bounty

I've added a $500 bounty on this but want to be clear: this is a very complex task that may very well require multiple people working together on it.

We won't outright assign this issue to anyone at this point and depending on the number of people involved, there's a decent chance we'll split the bounty between contributors.

EDIT: Teller (@stevegraham) has committed another $500 to this, bringing to total to $1000!

jclusso commented 8 months ago

Why not use Stripe's Financial Connections. I thought I remember you stating bank data issues was a huge PITA. I feel like if anyone is going to get this right for certian, Stripe is your best bet.

Shpigford commented 8 months ago

Why not use Stripe's Financial Connections. I thought I remember you stating bank data issues was a huge PITA. I feel like if anyone is going to get this right for certian, Stripe is your best bet.

Thinking about it from a "personal use" perspective, Stripe's solution isn't a great fit. You essentially need to have a business to even open a Stripe account. Plus, it's not free.

Teller allows anyone to sign up and you get 100 connections for free (which is far more than any individual would ever need).

arielconti10 commented 8 months ago

Hey Josh, can I tackle on this?

Shpigford commented 8 months ago

this will likely be a multi-person job as there's quite a lot of Plaid/Finicity code in here.

certainly welcome to get the ball rolling!

spewmaker commented 8 months ago

I would like to contribute to this feature, are there any docs for the project I should read before exploring the codebase?

robsee commented 8 months ago

Can the Free tier from Plaid work for this (looks like it supports up to 100 items) ?

Shpigford commented 8 months ago

I would like to contribute to this feature, are there any docs for the project I should read before exploring the codebase?

@spewmaker Unfortunately not much documentation on it just yet. Only remotely relevant is this: https://github.com/maybe-finance/maybe/wiki/Handling-Money

But otherwise you're basically just looking through the code to see how Plaid and Finicity are integrated.

Shpigford commented 8 months ago

Can the Free tier from Plaid work for this (looks like it supports up to 100 items) ?

@robsee Maybe? Our own company Plaid account is so deep into their "enterprise" mode that I couldn't tell you what's doable on a personal-usage level.

The big thing is you can't use "Sandbox" mode and I think you need to pass a few checks to get the "Development" mode enabled? I can't say for sure at this point.

Ultimately want to add Teller to the mix vs removing Plaid/Finicity.

spewmaker commented 8 months ago

I would like to contribute to this feature, are there any docs for the project I should read before exploring the codebase?

@spewmaker Unfortunately not much documentation on it just yet. Only remotely relevant is this: https://github.com/maybe-finance/maybe/wiki/Handling-Money

But otherwise you're basically just looking through the code to see how Plaid and Finicity are integrated.

I pulled the code and went through it, I think after looking at how Fincity and Plaid are implement I have a general idea of the architecture.

It looks like Plaid has a SDK module whereas for Fincity you guys wrote a wrapper around the API, both of these abstracted by their respective services in the server/features/src/providers/.. directory.

Please correct me if my understanding is wrong.

I will read on up Teller and will try to keep the high level implementation synonymous to other providers you have implemented.

@Shpigford however I am mildly confused about how account-connection classes tie into provider connection/authentication as far as workflow is concerned? I am assuming a "maybe" account is created first and then the UI makes a call to the apps/server/src/app/routes/connection.router.ts.

Shpigford commented 8 months ago

@spewmaker so "accounts" is kind of a confusing term as it's usually referring to "financial account" (vs "user account").

you create a "user account" first and then add "financial accounts" after that.

does that give clarity? (apologies if not. i'm not as familiar with the codebase as i'd like to be.)

neliets commented 8 months ago

Gocardless also is an option for open banking ;) Not sure about USA though.

joehoyle commented 8 months ago

Might be already implied here, but somehow abstracting of financial connector APIs would be great. As someone in Europe, which has many banks and no financial aggregator has all, then providing an interface to be able to have connections (E.g. Nordigen, Saltstack etc) would be best.

Shpigford commented 8 months ago

Gocardless also is an option for open banking ;) Not sure about USA though.

Yeah! Ultimately would love for us to build support for every connector/data source we can...the more options the better.

Shpigford commented 8 months ago

Might be already implied here, but somehow abstracting of financial connector APIs would be great. As someone in Europe, which has many banks and no financial aggregator has all, then providing an interface to be able to have connections (E.g. Nordigen, Saltstack etc) would be best.

Yeah, this already mostly exists in the app (we support both Plaid and Finicity). However, work will ultimately need to be done to totally abstract. For instance, user accounts still have specific database columns that reference both Plaid and Finicity.

madhukaraman commented 8 months ago

Hey @Shpigford can I contribute in this ?

arifali123 commented 8 months ago

https://teller.io/blog/2023/10/19/sidecar/

wouldn't using something like this as a proxy speed up the process since the plaid sdk is compatible with sidecar

Shpigford commented 8 months ago

Teller's Sidecar could work...I just haven't spent any time looking into it.

Main thing is that we don't want to remove Plaid, but rather add Teller as an additional (and primary) option.

Shpigford commented 8 months ago

/bounty $500

algora-pbc[bot] commented 8 months ago

💎 $500 bounty created by maybe-finance 💎 $500 bounty created by tellerhq

🙋 If you start working on this, comment /attempt #19 to notify everyone 👉 To claim this bounty, submit a pull request that includes the text /claim #19 somewhere in its body 📝 Before proceeding, please make sure you can receive payouts in your country 💵 Payment arrives in your account 2-5 days after the bounty is rewarded 💯 You keep 100% of the bounty award 🙏 Thank you for contributing to maybe-finance/maybe!

Attempt Started (GMT+0) Solution
🟢 @tmyracle #119
ltouro commented 8 months ago

Have you guys considered an open standard like OFX files? It would be much more general and make it viable in other countries (I'm from Brazil).

Shpigford commented 8 months ago

Have you guys considered an open standard like OFX files? It would be much more general and make it viable in other countries (I'm from Brazil).

Ultimately want to support every data type and source possible for every country.

Teller is just the fastest way for us to get the current codebase useable. Then we can all start building connectors for additional sources + files.

stevegraham commented 8 months ago

Teller will kick in another $500 to the bounty with @Shpigford to decide who gets it.

pontusab commented 8 months ago

This sounds great! For EU there are GoCardLess and Tink https://tink.com, let me know if those are of interests then I can contribute with my code from https://midday.ai

jadgray commented 8 months ago

This sounds great! For EU there are GoCardLess and Tink https://tink.com, let me know if those are of interests then I can contribute with my code from https://midday.ai

GoCardless have an okay sandbox platform too which would help in this instance 👍🏻

Shpigford commented 8 months ago

@pontusab @jadgray If you guys would like to add or propose additional data sources, please post here: https://github.com/maybe-finance/maybe/discussions/categories/data-connectors

This thread is specifically for the work around adding Teller.

tmyracle commented 8 months ago

Ok I think this is complete for a v1:

From rough deliverables above:

I didn't abstract things away yet for user accounts, I followed the existing conventions to get this across the line. There's probably a bigger separate effort to abstract all of the provider specific things on Users, Accounts, AccountConnections, Transactions, Holdings, InvestmentTransactions, and Securities. Each of those probably being its on PR on a pretty big refactor effort.

@Shpigford if you agree, I'll go ahead and claim the bounty.

jadiaheno commented 8 months ago

Teller does not support Canadian bank accounts. Can we keep plaid as an option?

Shpigford commented 8 months ago

Teller does not support Canadian bank accounts. Can we keep plaid as an option?

Plaid isn't a viable solution for individual use as an enterprise contract is required to fully use it. Though you're welcome to create a Discussion around that.

Otherwise this specific topic is about integrating Teller. 🙂

Shpigford commented 8 months ago

@tmyracle Fantastic job on this! Working wonderfully for me. 🙂 Massive undertaking and while there's certainly a lot more to do, this gets the app to a much more functional state for folks.

Well done and yes, please claim the bounty. 🙂

Shpigford commented 8 months ago

Implemented with #119

algora-pbc[bot] commented 8 months ago

💡 @tmyracle submitted a pull request that claims the bounty. You can visit your bounty board to reward.

algora-pbc[bot] commented 8 months ago

🎉🎈 @tmyracle has been awarded $500 by maybe-finance! 🎈🎊

algora-pbc[bot] commented 8 months ago

🎉🎈 @tmyracle has been awarded $500 by tellerhq! 🎈🎊