Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚀 Add bank account transaction integration #132

Open
wants to merge 25 commits into
base: v2
Choose a base branch
from

Conversation

alexanderwassbjer
Copy link
Contributor

@alexanderwassbjer alexanderwassbjer commented Oct 26, 2024

Implemented an integration that uses GoCardless api to fetch bank account transactions. Then when you want to add an expense you can either fill it manually or you can pick from your transactions and it will automatically be added as an expense. There is also a function to "multi add" multiple transactions at the same time.
If a transaction already has been added to a group you cant add it once again.
GoCardless page

Other changes:

  • Fixed dark/light mode.
  • Fixed "total expenses" which didn't excluded deleted expenses.
  • Added a clear field button to add expense page.
  • Changed to on addExpense function redirect link.
  • Added the new feature to start page.
  • Added information about the new feature to readme.

Screenshots:

image
image
image

@alexanderwassbjer
Copy link
Contributor Author

@KMKoushik :)

@alexanderwassbjer
Copy link
Contributor Author

alexanderwassbjer commented Oct 26, 2024

I have also added i18n support for this feature in another PR that is based on this PR: #89. If this gets merged I can open a PR with i18n support for this aswell.

https://github.com/alexanderwassbjer/split-pro/tree/feature/i18n-support

Copy link
Member

@KMKoushik KMKoushik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks good overall with some comments. please lemme know what you think!

tysm for this PR really appreciate it. this is really awesome!

think it's best to merge in v2, test thoroughly and release it with other features! (i'll create a new branch)

.env.example Show resolved Hide resolved
.env.example Outdated
@@ -41,6 +41,12 @@ EMAIL_SERVER_PORT=
EMAIL_SERVER_USER=
EMAIL_SERVER_PASSWORD=

# GoCardless options
NEXT_PUBLIC_GOCARDLESS_ENABLED=
NEXT_PUBLIC_GOCARDLESS_COUNTRY=
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so it will work on one specific country alone?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it should work world wide. The bank provider picker in the settings page fetch all bank providers. It works with either one country or undefined which then returns all the bank providers.
But because the list can be long in that case, I added the env to have a option to only fetch some.

If you have another approach to this, feel free to tell me.
One way is to have a country picker first and then the providers but it feels a bit weird..

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we have default currency option, we can get the country from that currency!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't find the default currency? If you mean the currency that is set by the user when they try to add a expense it feels a bit weird to use that because it can change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So for now, it only works with one country in the package I use. https://github.com/nordigen/nordigen-node/blob/9d535ca9d788115d4e199c749432733be3ea6cdd/lib/api/institutions.js#L23

That can be fixed, either in the package or that we have a country picker first.
But if we think of the user case, will it be necessary to have multiple countries at the same instance?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we want to stick with the env and use it either with no value to fetch all bank providers or filter it based on the env. I have created a PR on the Nordigen-node package and hoping for a merge so we can use it.
nordigen/nordigen-node#63

Dockerfile Outdated Show resolved Hide resolved
docker-compose.yml Outdated Show resolved Hide resolved
docker/Dockerfile Outdated Show resolved Hide resolved
src/pages/_app.tsx Outdated Show resolved Hide resolved
@KMKoushik KMKoushik changed the base branch from main to v2 October 26, 2024 19:49
@KMKoushik
Copy link
Member

@alexanderwassbjer changed the base to v2!

@alexanderwassbjer
Copy link
Contributor Author

this looks good overall with some comments. please lemme know what you think!

tysm for this PR really appreciate it. this is really awesome!

think it's best to merge in v2, test thoroughly and release it with other features! (i'll create a new branch)

Awesome! Iam happy you liked it.
I will go over it again, check your comments and fix some other stuff.

It would be nice if it was released in v2!

@KMKoushik
Copy link
Member

Awesome! Iam happy you liked it. I will go over it again, check your comments and fix some other stuff.

It would be nice if it was released in v2!

ofcourse this is going to be star feature!

src/components/AddExpense/GoCardlessTransactions.tsx Outdated Show resolved Hide resolved
src/components/AddExpense/GoCardlessTransactions.tsx Outdated Show resolved Hide resolved
src/server/api/routers/nordigen-node.d.ts Outdated Show resolved Hide resolved
src/server/api/routers/nordigen-node.d.ts Outdated Show resolved Hide resolved
src/server/api/routers/gocardless.ts Outdated Show resolved Hide resolved
src/server/api/routers/gocardless.ts Outdated Show resolved Hide resolved
src/server/api/routers/gocardless.ts Outdated Show resolved Hide resolved
src/server/api/routers/gocardless.ts Outdated Show resolved Hide resolved
@alexanderwassbjer alexanderwassbjer changed the title Add bank account transaction integration 🚀 Add bank account transaction integration Oct 27, 2024
Fix bug with floating numbers on exact split calculator
@alexanderwassbjer
Copy link
Contributor Author

alexanderwassbjer commented Oct 29, 2024

@alexanderwassbjer
Some other improvement ideas:

  • Encrypt the cache for the transactions.
  • Add multiple bank accounts for different providers.

@KMKoushik
Copy link
Member

i'll have to think about this over the weekend!

…-created-date-in-grouplist

Order by expense created date in the groups list
…-page-activity-list-based-on-groupid

Redirect to groupexpense or expense in activity list based on groupId
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants