Giter VIP home page Giter VIP logo

kevinschaich / mintable Goto Github PK

View Code? Open in Web Editor NEW
1.5K 23.0 195.0 18.51 MB

🍃 Automate your personal finances – for free, with no ads, and no data collection.

Home Page: https://kevinschaich.io/mintable/

License: MIT License

JavaScript 2.80% TypeScript 91.94% HTML 5.26%
finance finance-management personal-finance mint sheets-api google-sheets google-sheets-api plaid plaid-api analytics

mintable's Introduction

Mintable

Mintable

Automate your personal finances – for free, with no ads, and no data collection.


Mintable helps you:

  • Keep track of your account balances
  • Aggregate transactions from all your banking institutions, including checking accounts, savings accounts, and credit cards
  • Analyze and budget your spending using a spreadsheet and formulas



Quickstart

Requires node >= v11.0.0.

  1. Sign up for Plaid's Free Plan.

  2. Install Mintable:

    npm install -g mintable
    mintable setup
  3. Update your account balances/transactions:

    mintable fetch
    

Note: If you're already a version 1.x.x user, you can migrate your existing configuration to version 2.x.x.

Documentation

Check out the full documentation in the ./docs folder.

FAQs

WTF is 'Mintable'?!

min¡ta¡ble: noun.

  1. An open-source tool to automate your personal finances – for free, with no ads, and no data collection. Derived from mint (the wildly popular personal finance app from Intuit) + table (a spreadsheet).

Do I have to use Plaid?

Do I have to use Google Sheets?

Do I have to manually run this every time I want new transactions in my spreadsheet?

How do I use it with banks outside the US?

How do I use it with Windows?

  • Windows is not natively supported but you can try this.

It's not working!

Alternatives

  • Money in Excel: Recently announced partnership between Microsoft/Plaid. Requires a Microsoft 365 subscription ($70+/year).
  • Mint: Owned by Intuit (TurboTax). Apps for iOS/Android/Web.
  • build-your-own-mint: Some assembly required. More flexible.

mintable's People

Contributors

blimmer avatar dflock avatar eden avatar ibudiallo avatar keanulee avatar kevinschaich avatar mainhanzo avatar mazzarin avatar pigri avatar yawhide avatar yyx990803 avatar zeustopher avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mintable's Issues

Category list

Where do you create or get the list of Categories and Subcategories (category.1), based on what? How to add my own categories?

Retrieve transactions in google sheets tab "transactions"

Hi there,

I'm not a programmer and I have learned some basic coding skills over the years; I'm also a personal finance geek so this is just an amazing project for me !

That being said, I have already built my own google sheet template and I would like to use your code to retrieve the transactions and update the google sheet in the tab "transactions" (instead of spreading it into a tab per month).

Thanks !

Invalid Date!A:undefined'

Hi there,

I'm running into an error that I can't seem to fix :

"spreadsheetId": "1L2v2WbA0NWLzv8L9C76cGVxSSxPU7cxJnN7UsM4yY08",
"ranges": [
"Invalid Date!A:undefined"
]
}
✖ Error clearing ranges invalid date!a:undefined:

{
  error: 'Error: Invalid range[0]: Unable to parse range: Invalid Date!A:undefined'
}

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Any idea where this is coming from ?

Make adopting the default template easier

Instructions in README are a bit overly complicated for just getting started out. Would be cool to run something like:

npm run template

and have the proper API calls get routed through automatically.

[v2.0.0] Test Report: @kevinschaich

All, thanks for your incredible patience here. Today is the day.

Version 2.x.x represents an almost complete rewrite from the ground-up, expect it to be rough around the edges until we complete a few rounds of beta testing. Thanks for helping make Mintable better.

What's New in v2.0.0

  • Complete (~4000 lines) rewrite: Kept all the good stuff from v1.x.x, trimmed the fat where possible.
  • Migration to Typescript: Easier to reason about correctness & establish rigid API constraints for integrations.
  • Migration Script: Migrate your v1.x.x installation over in one command.
  • Simplified Install Process/Documentation: Get up-and-running with Mintable in 3 commands.
  • Global npm package: Call mintable as a command, anywhere on your machine without cloning anything.
  • mintable CLI/setup wizard: Configure everything through an automated CLI-based setup wizard.
  • Config Validation: Tells you the exact spot where your config is broken (if relevant).
  • Better Logging: Almost every point of failure logs a human-readable error message.
  • Debug Mode: Optionally log the results of every API request to debug strange behavior.
  • Error Reporting: Click a single link which auto-fills an issue on GitHub with error/machine info.
  • Balances Sheet: View the balances of all your accounts automatically on one sheet.
  • Per-Account Configuration: Pull some accounts from Plaid, and others from a CSV (like Apple Card).
  • CSV Exporter: Optionally export your results to a CSV file and use Excel/Numbers if you don't trust Google.
  • Lots more

What's Not Working Yet

Testing Instructions

I've compiled a Testing Checklist below if you have the time, but if you don't want to start from scratch, I'd still appreciate any feedback.

Please report an Issue for anything not listed above which seems like a regression/bug and apply the Bug: v2.0.0 Beta label. If you encounter any issues with these instructions themselves or have any general feedback, please leave a comment below.

Testing Checklist

Add a test suite

As part of #43, it came up that a unit test suite would be a good addition. In this thread, we could discuss what that might look like technology-wise.

Items to discuss:

  1. Where it builds
    It looks like Travis-CI is what's required on branch and PR builds, so likely that should also run the test suite.

  2. Tech stack
    I have the most experience with Mocha and Chai but, since this project uses React, something like Jest might be preferable to the other maintainers?

  3. Unit / Integration / Functional Tests
    We could easily start off with just unit tests, adding in additional test suites later like component (integration) tests or functional test (e.g. Cypress).

Config error nukes config file

I was editing the config file (trying to change the template location) and must of missed, or added, an extra comma, which caused it to be overwritten with the initial layout. This lost all the API keys for plaid and google sheets. Specifically it's the plaid ones that annoyed me since we only get a certain amount of linked accounts, but I know don't know that item id.

It might be an idea not to nuke existing config files on error, or store the API keys in a separate file after initial setup.

(I should also make backups, I know, but it's also preventable, and unexpected behaviour)

Bug: v2.0.0 Beta - Clicking 'link a new account' is showing me the success screen of my last authentication

Hello,

In following the steps to migrate from v1 to v2, I had to update one of my bank accounts (got the error PlaidError: ITEM_LOGIN_REQUIRED after running mintable fetch.

  1. I ran mintable account-setup
  2. clicked update on the outdated bank account
  3. successfully completed the handshake with plaid.
  4. I then got back to the main screen (titled Plaid – Account Configuration) and clicked Link a new account.
  5. It then redirects me back to plaid and shows me the success screen on step 3.

seeing this in the terminal

2020-06-24T22:18:29.688Z [ERROR] Encountered error during authentication.

 {
  display_message: '',
  error_code: 'item-no-error',
  error_message: '',
  error_type: ''
}

I cannot link a new account.

  1. i reran mintable account-setup and I see a duplicate row now for the bank account i updated in step 1-3. Pressing link new account now works correctly.

CI Integration

Need a public way of doing tests (for branches/PRs/etc) with Plaid sandbox environment.

Different providers for different accounts?

I have some WealthSimple accounts. Plaid doesn't support WealthSimple, afaik. However, WealthSimple have their own REST API: https://developers.wealthsimple.com/ - which looks like it does everything you'd need.

I'm happy to write a provider for WealthSimple. However, I'm not sure how to use it? I only see a single ACCOUNT_PROVIDER config setting? I have some accounts with banks that Plaid does support, as well as the WealthSimple accounts - so I'd need to set a provider on a per-account basis, maybe?

Is there currently a way to say "Get data for these accounts from this provider, and use this other provider for these accounts"?

Duplicate Transactions?

I've been noticing a lot of duplicate transactions in the mintable spreadsheet. Doesn't seem to be a rhyme or reason as it happens with both pending and completed transactions. I understand the tabs are cleared and recreated so I assume these are coming from plaid - how can we validate?

Bug: v2.0.0 Beta - `mintable fetch` will not create new sheet tabs

Hello,

I am trying to run mintable fetch and it creates only 1 tab Balances. It isnt created new tabs and putting transactions in it.
I see this output:

2020-06-24T22:41:31.730Z [INFO] Using default configuration file `/Users/happy/mintable.jsonc.`
2020-06-24T22:41:31.731Z [INFO] You can supply either --config-file or --config-variable to specify a different configuration.
2020-06-24T22:41:31.732Z [INFO] Successfully opened configuration file.
2020-06-24T22:41:31.732Z [INFO] Successfully parsed configuration.
2020-06-24T22:41:36.696Z [INFO] Successfully validated configuration.
2020-06-24T22:41:36.715Z [INFO] Fetching account ********* using plaid.
2020-06-24T22:41:36.735Z [INFO] Fetching account ********* using plaid.
2020-06-24T22:41:36.736Z [INFO] Fetching account ********* using plaid.
2020-06-24T22:41:37.107Z [INFO] Fetched 1 sub-accounts and 0 transactions.
2020-06-24T22:41:37.198Z [INFO] Fetched 1 sub-accounts and 19 transactions.
2020-06-24T22:41:37.408Z [INFO] Fetched 1 sub-accounts and 36 transactions.
2020-06-24T22:41:38.263Z [INFO] Fetched 1 sheets.
2020-06-24T22:41:38.671Z [INFO] Added sheet Balances.
2020-06-24T22:41:38.948Z [INFO] Cleared 1 range(s): 'Balances'!A1:G4.
2020-06-24T22:41:39.222Z [INFO] Updated 1 range(s): 'Balances'!A1:G4.
2020-06-24T22:41:39.488Z [INFO] Fetched 2 sheets.
2020-06-24T22:41:39.517Z [INFO] Fetched 2 sheets.
2020-06-24T22:41:39.551Z [INFO] Fetched 2 sheets.
2020-06-24T22:41:39.572Z [INFO] Fetched 2 sheets.
2020-06-24T22:41:39.727Z [INFO] Fetched 2 sheets.
(node:4635) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'properties' of undefined
    at GoogleIntegration.<anonymous> (/usr/local/lib/node_modules/mintable/lib/integrations/google/googleIntegration.js:86:115)
    at step (/usr/local/lib/node_modules/mintable/lib/integrations/google/googleIntegration.js:33:23)
    at Object.next (/usr/local/lib/node_modules/mintable/lib/integrations/google/googleIntegration.js:14:53)
    at fulfilled (/usr/local/lib/node_modules/mintable/lib/integrations/google/googleIntegration.js:5:58)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:4635) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:4635) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
2020-06-24T22:41:39.762Z [INFO] Fetched 2 sheets.
2020-06-24T22:41:39.815Z [INFO] Fetched 2 sheets.
2020-06-24T22:41:39.894Z [INFO] Updated indices for 2 sheets.
2020-06-24T22:41:40.146Z [INFO] Fetched 2 sheets.
2020-06-24T22:41:40.517Z [INFO] Updated formatting for 2 sheets.

image

Specify Overrides Map for Transaction Categories

Just had a few transactions of these nature:

AUTOMATIC PAYMENT - THANK YOU

get categorized by Plaid as a Restaurant transaction. This is obviously not the case; we should provide a way to map certain regexes, i.e. autopay, e-payment, etc. to a certain category, like Credit Card Payment.

Scrap current front end framework

I think we missed the bill here and over complicated things. A terminal-based onboarding experience is probably better for most users here.

Customizable host/port

Is it possible to customize the host and port for the web interface. The port option does exist as shown below, but isn't used and 3000 is hardcoded everywhere else.

const port = parseInt(process.env.PORT, 10) || 3000

401 error caused by whitespace in Google Client ID / Secret input

During the setup process, I kept getting a 401 error when trying to connect my Google Sheet. After further inspection, I noticed that the issue was due to whitespace from the copy/paste from the linked QuickStart page. When I removed the whitespace, everything worked. I'd be happy to provide a PR to improve this UX.

I was thinking about a few ways of modifying ConfigPropertyInputGroup. We could:

  1. Always disallow leading/trailing whitespace. This could be unnecessarily limiting for some configuration properties where we'd want users to be able to. However, it would be pretty simple to implement.
  2. Introduce an allowWhitespace passed as configuration. This could be more backward compatible and we could introduce it per-property (defaulting to false). For instance, I'm thinking we could configure it here, adding an allowWhitespace: false parameter to this config hash:
    const configFileProperties = [
    { displayName: 'Client ID', propertyId: 'SHEETS_CLIENT_ID' },
    { displayName: 'Client Secret', propertyId: 'SHEETS_CLIENT_SECRET' }
    ]

Alternatively, we could sanitize the input on the backend. I was leaning away from this strategy because the issue I experienced is going to primarily happen when dealing with front-end user input, but that's a path forward as well.

What are your thoughts?

PS: Thank you for this project! I've only been using it for a few days and it has already been incredibly useful.

Pluggable onboarding

Originally planned for #19 but PR is getting too large.

After we implement providers other than Google Sheets/Plaid, we'll want to provide a pluggable onboarding experience for them as well.

Simplify error handling and logging

right now we’re doing something like this:

wrapPromise(
    doTheThing {
        ...
    }
)

and I think it overcomplicates things significantly. it’s one more layer of promises to reason about (bad!) and the output logs get duplicated and interleaved uncontrollably.

a more sane (and I think industry-standard way):

doTheThing {
    logging.info(“Starting the thing”)
    ...
    logging.info(“Done with the thing”)
    logging.debug(“Response or error content of the thing”)
}

Better interface for providers

As mentioned in #9, we need a more concrete interface to pass back and forth between the main index script and a provider.

I think adding TypeScript to the project would be a big win here.

v2.0.0 Beta Testing

Version 2.x.x represents an almost complete rewrite from the ground-up, expect it to be rough around the edges until we complete a few rounds of beta testing. Thanks for helping make Mintable better.

What's New in v2.0.0

  • Complete (~4000 lines) rewrite: Kept all the good stuff from v1.x.x, trimmed the fat where possible.
  • Migration to Typescript: Easier to reason about correctness & establish rigid API constraints for integrations.
  • Migration Script: Migrate your v1.x.x installation over in one command.
  • Simplified Install Process/Documentation: Get up-and-running with Mintable in 3 commands.
  • Global npm package: Call mintable as a command, anywhere on your machine without cloning anything.
  • mintable CLI/setup wizard: Configure everything through an automated CLI-based setup wizard.
  • Config Validation: Tells you the exact spot where your config is broken (if relevant).
  • Better Logging: Almost every point of failure logs a human-readable error message.
  • Debug Mode: Optionally log the results of every API request to debug strange behavior.
  • Error Reporting: Click a single link which auto-fills an issue on GitHub with error/machine info.
  • Balances Sheet: View the balances of all your accounts automatically on one sheet.
  • Per-Account Configuration: Pull some accounts from Plaid, and others from a CSV (like Apple Card).
  • CSV Exporter: Optionally export your results to a CSV file and use Excel/Numbers if you don't trust Google.
  • Lots more

What You've Helped Fix

Testing Instructions

I've compiled a Testing Checklist below if you have the time, but if you don't want to start from scratch, I'd still appreciate any feedback.

Please report an Issue for anything not listed above which seems like a regression/bug and apply the Bug: v2.0.0 Beta label. If you encounter any issues with these instructions themselves or have any general feedback, please leave a comment below.

Testing Checklist

Fetch more granular account names

Rather than generic "bank" names like:

CHASE

we should try to fetch more helpful "account" names from Plaid, like

Chase Sapphire Reserve (xxxx-xxxx-xxxx-2345)

for easier grokking.

Error when setting up

Hi. Not sure what's happening but stuck in the initial setup.

Ok. Finally managed to pass the setup screen.
However I don't transactions populating the spreadsheet.

I can see data being pulled from plaid but nothing is showing in the sheet.

Sort sheet order automatically

After using Mintable for a few months now the default sort is backwards – new sheets end up on the far right and it requires horizontal scrolling:

image

Error: Failed to set up Plaid Account(s).

Steps to Reproduce:

  1. cloned git repo, switched to 2.0 branch
  2. followed instructions to install
  3. migrated old config
  4. ran mintable fetch

Error:

This script will help you add accounts to Plaid.
2020-06-24T01:33:43.473Z [INFO] Using default configuration file `/Users/willie/mintable.jsonc.`
2020-06-24T01:33:43.473Z [INFO] You can supply either --config-file or --config-variable to specify a different configuration.
2020-06-24T01:33:43.473Z [INFO] Successfully opened configuration file.
2020-06-24T01:33:43.474Z [INFO] Successfully parsed configuration.
File '/Users/willie/src/github.com/kevinschaich/mintable/lib/common/config.js' is a JavaScript file. Did you mean to enable the 'allowJs' option?
2020-06-24T01:33:45.940Z [ERROR] Failed to set up Plaid Account(s).

 TypeError: Cannot read property 'id' of null
    at Ajv._get$Id [as _getId] (/Users/willie/src/github.com/kevinschaich/mintable/node_modules/ajv/lib/ajv.js:392:14)
    at Ajv._addSchema (/Users/willie/src/github.com/kevinschaich/mintable/node_modules/ajv/lib/ajv.js:301:37)
    at Ajv.validate (/Users/willie/src/github.com/kevinschaich/mintable/node_modules/ajv/lib/ajv.js:95:26)
    at Object.exports.validateConfig (/Users/willie/src/github.com/kevinschaich/mintable/lib/common/config.js:98:27)
    at Object.exports.getConfig (/Users/willie/src/github.com/kevinschaich/mintable/lib/common/config.js:110:35)
    at /Users/willie/src/github.com/kevinschaich/mintable/lib/integrations/plaid/add.js:54:35
    at step (/Users/willie/src/github.com/kevinschaich/mintable/lib/integrations/plaid/add.js:33:23)
    at Object.next (/Users/willie/src/github.com/kevinschaich/mintable/lib/integrations/plaid/add.js:14:53)
    at /Users/willie/src/github.com/kevinschaich/mintable/lib/integrations/plaid/add.js:8:71
    at new Promise (<anonymous>)
    at __awaiter (/Users/willie/src/github.com/kevinschaich/mintable/lib/integrations/plaid/add.js:4:12)
    at Object.default (/Users/willie/src/github.com/kevinschaich/mintable/lib/integrations/plaid/add.js:47:44)
    at /Users/willie/src/github.com/kevinschaich/mintable/lib/scripts/cli.js:42:82
    at Array.forEach (<anonymous>)
    at Object.<anonymous> (/Users/willie/src/github.com/kevinschaich/mintable/lib/scripts/cli.js:42:19)
    at Module._compile (internal/modules/cjs/loader.js:1200:30) 

System Info:

arch: x64
platform: darwin
os: v19.5.0
mintable: v2.0.0
node: v14.4.0

More consistent error handling

Need a handleErrorState function or similar so we're not just return false some places, empty arrays other places, undefined some places, etc.

Server should also have a sendErrorResponse and sendSucess function or similar.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.