Code Monkey home page Code Monkey logo

account-balance-to-google-spreadsheet's Introduction

Account Balance to Google Spreadsheet

Modular app to fetch transaction history and account balance from the bank API and write to Google Spreadsheet.

Written in Nest framework using TypeScript.

Currently supported banks:

Installation

$ npm install

Configuration

  • Create file .env.development in the root of repository

1. Google

  • Go to https://console.developers.google.com

  • Create new project called e.g. AccBalanceApp

  • Go to "Library" and add:

    • Google Drive API
    • Google Sheets API
  • Go to "Credentials"

    • Click to create new "Service account key"
    • In the dropdown Service account choose "New service account" and set the Name and Role ("Project > Viewer"). Key type has to be JSON.
    • Click to "Create" and download the JSON file
  • Encode the content of the file with Base64 and save it to the .env.development as GOOGLE_AUTH key

    GOOGLE_AUTH="YmFzZTY0IGVuY29kZWQgSlNPTiBmaWxlIGFzIGEgc3RyaW5nIGhlcmU="
  • Go to https://drive.google.com and create new empty Spreadsheet

  • Share the spreadsheet to the email in the Google Credentials JSON file (as client_email) with edit permissions.

  • Copy the ID of the Spreadsheet from the URL e.g.

    https://docs.google.com/spreadsheets/d/5BxICDTRQpIsPK_tcJJm4Ni9gjtPsDHErXE_m-dDQM4c/edit
    
    # id == "5BxICDTRQpIsPK_tcJJm4Ni9gjtPsDHErXE_m-dDQM4c" (YOUR ID DIFFERS!)
    
  • Save the ID to the .env.development file as GOOGLE_SHEET_ID key

    GOOGLE_SHEET_ID=5BxICDTRQpIsPK_tcJJm4Ni9gjtPsDHErXE_m-dDQM4c

2. Banks

3. App

🎉🎉🎉 That's all! Congrats! 🎉🎉🎉

Now run the app with yarn start:dev or npm start:dev and the CRON should run after 10 seconds.

Contribution

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

Test

# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov

Lincense

WTFPL-2.0

account-balance-to-google-spreadsheet's People

Contributors

prokopsimek avatar renovate-bot avatar renovate[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

account-balance-to-google-spreadsheet's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Warning

These dependencies are deprecated:

Datasource Name Replacement PR?
npm @types/dotenv Unavailable
npm querystring Unavailable

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • chore(deps): update dependency eslint to v9
  • chore(deps): update dependency eslint-plugin-prettier to v5
  • chore(deps): update dependency prettier to v3
  • chore(deps): update dependency supertest to v7
  • chore(deps): update dependency tsc-watch to v6
  • chore(deps): update dependency tsconfig-paths to v4
  • chore(deps): update dependency typescript to v5
  • fix(deps): update dependency dotenv to v16
  • fix(deps): update dependency google-spreadsheet to v4
  • fix(deps): update dependency rimraf to v6
  • 🔐 Create all rate-limited PRs at once 🔐

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

npm
package.json
  • @nestjs/common 6.11.11
  • @nestjs/core 6.11.11
  • @nestjs/platform-express 6.11.11
  • axios 0.28.1
  • dotenv 8.6.0
  • google-spreadsheet 2.0.9
  • nest-schedule 0.6.4
  • querystring 0.2.1
  • reflect-metadata 0.2.2
  • rimraf 3.0.2
  • rxjs 6.6.7
  • @nestjs/testing 6.11.11
  • @types/dotenv 6.1.1
  • @types/express 4.17.21
  • @types/jest 25.2.3
  • @types/node 12.20.55
  • @types/supertest 2.0.16
  • @typescript-eslint/eslint-plugin 2.34.0
  • @typescript-eslint/parser 2.34.0
  • eslint 6.8.0
  • eslint-config-prettier 6.15.0
  • eslint-plugin-prettier 3.4.1
  • jest 25.5.4
  • prettier 1.19.1
  • supertest 4.0.2
  • ts-jest 24.3.0
  • ts-node 8.10.2
  • tsc-watch 4.6.2
  • tsconfig-paths 3.15.0
  • typescript 3.9.10

  • Check this box to trigger a request for Renovate to run again on this repository

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.