GithubHelp home page GithubHelp logo

ogkevin / combunqwebapp Goto Github PK

View Code? Open in Web Editor NEW
26.0 26.0 3.0 5.88 MB

A Bunq web interface made by bunqers

Home Page: https://bunqweb.com

License: MIT License

Python 50.39% CSS 24.06% JavaScript 7.45% HTML 18.10%
bunq bunq-api community-bunqweb django heroku python

combunqwebapp's Introduction

Hi there ๐Ÿ‘‹

I am a Todoist Expert with 9k karma points.

๐Ÿšง some stats:
๐Ÿ† 9k Karma Points
โœ… Completed 687 tasks so far
โณ Longest streak is 18 days

combunqwebapp's People

Contributors

basst85 avatar blaisorblade avatar greenkeeper[bot] avatar louis-lau avatar ogkevin avatar pjullrich avatar pyup-bot 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

Watchers

 avatar  avatar  avatar  avatar  avatar

combunqwebapp's Issues

Mobile compatibillity

The web app does not look good on small screens(mobile). The charts gets to small and the table malformed.

Return a response if there are no invoices

https://sentry.io/share/issue/3137323731332e323832303338353734/

IndexError: list index out of range
(5 additional frame(s) were not displayed)
...
  File "BunqAPI/views.py", line 128, in post
    response = getattr(API, selector.strip('/'))()
  File "BunqAPI/callbacks.py", line 255, in invoice
    return get_pdf(json.dumps(r['Response'][0]['Invoice']))

IndexError: list index out of range

When there are no invoices for an user IndexError wil be raised. Instead there should be a response telling the user that there are no invoices found

User friendly

In the current version, the user must walk through a lot of steps. A lot of things can be automated, for example:

  • If a user registers, the installation will be created automatically.
  • If a user logs in, the session will be started automatically.

Another big killer of the user-friendlyness is all the different menu's. It would be better to 1 main page which leads you to the next, for example.

Homepage -> log in -> Upload .json -> Main screen for api calls
Register -> create account -> set up 2fa -> log in -> main screen for api calls

This way, the user doesn't have to search for pages like "/Setup 2fa", "/Login" or "/decrypt (which is actually sortof the main page)".

Rebuild the login system

It seems that the current login system is overkill. Instead of using 2fa on your phone, it will be rebuild that you just need an account password and your json to login. This decision was made based on user feedback.

  • Let user know if there was an mistake in decrypting the JSON

  • Migration service for old accounts to a new an new account

  • Explanation on the download page

  • Session aware

  • Save session-server response and Avatar in session

  • Delete/extend session when user logs back in and session-server has not yet ended

KeyError: 'Response'

https://sentry.io/share/issue/3137323731332e323832343033333536/

KeyError: 'Response'
(5 additional frame(s) were not displayed)
...
  File "BunqAPI/views.py", line 128, in post
    response = getattr(API, selector.strip('/'))()
  File "BunqAPI/callbacks.py", line 91, in load_file
    self.accountID = accounts['Response'][0]['MonetaryAccountBank']['id']  # noqa

KeyError: 'Response'

It seems that the sleep of 1.5 seconds is not enough.

$('form').placeholder is not a function.

There seems to be an issue in the html5up template's main.js file which is causing this error:

TypeError: $('form').placeholder is not a function. (In '$('form').placeholder()', '$('form').placeholder' is undefined)
  at ? (/static/assets/js/main.7c8a1758d363.js:36:25)
  at j(/static/jquery/dist/jquery.min.c9f5aeeca3ad.js:2:30004)
  at ? (/static/jquery/dist/jquery.min.c9f5aeeca3ad.js:2:30314)
  at this(raven.js:379:34)

categorize user input

When user inputs his/her CSV data the Pie's wont get catagories like in the example at the top of the page. This can get fixed by using a catagory filter stored in the DB.


Todo

  • Categorize text input

  • categorize file input


  1. a part of this is introduced in c73d49b
  2. in this commit 02ab002 a new database model has been introduced to make this easier and efficient
  3. as of 92cea80 text CSV gets categorised
  4. as of eb1d7a8 file CSV are getting categorised

Column sort transactions table

The transactions table is not sorted right. It seems like the deployed version and the version on my local machine (latest origin/master commit ) gets sorted differently. The date should be the first column and the description last...

When the JSON is send to the server it returns differently sorted to the client. If this gets fixed then there is no need to manually sort the columns because the original order is perfect. If not then the data needs te be resorted before its shown in the table.

Searchbar and next/prev buttons gone

The transactions table used to have a search bar where users could filter transactions, and a next/previous button to change between pages. Due to the CSS of semantic i think these buttons and input boxes are gone. Need to find a way to manually create these boxes or find a way with the CSS.

Uncaught ReferenceError when loading payments table

Error in console:

decrypt.js:241 Uncaught ReferenceError: numeral is not defined
at createTable (decrypt.js:241)
at Object. (decrypt.js:137)
at i (jquery.min.js:2)
at Object.fireWith [as resolveWith] (jquery.min.js:2)
at A (jquery.min.js:4)
at XMLHttpRequest. (jquery.min.js:4)

referenceerror

Tested in template branch.

Table inside table

When pressed twice on textCSV or fileCSV a table gets created inside another table, instead off refreshing.

Will make the table hidden at page load and visible once there is data to show. This will remove the horizontal line on the page where the table will appear when there is contents to show.

  1. in f367584 empty table is hidden

Bower static files handling by heroku

The jango-bower package is supposed to make the bower static files handling easy but this is not the case. It should work like this:

  • Push to heroku
  • Run ./manage.py bower install
  • Run ./manage.py collect static

When run collect static it should move all the bower files to the /static-files folder, which it does correctly. When the project is run locally it works smooth. For some reason on heroku it doesn't, the files get moved correctly to the static-files folder but it seems that heroku is reading the files from static. Not sure whats causing this, may have something to do with a misconfigured whitenoise settings.py.

Solution for Static API

To use the bunq api there is a need of a static API. A solution for this can be QuotaGuard Static, however i don't think 250 requests are enough. Will wait and see if bunq is going to remove this requirement or not before i implement this.

This also means that in release V0.3.0-beta.2 API calls will fail.

test_Manager failing

test_Manager should be passing but for some small reason its not. According to my calculations the values off shouldBeReturned are correct but its still returning false. This might be related to #18 ?

Multiple session's per user

ATM, instead of using 1 session and adding variables to that session, a new session is created for each variable.

Need to use one session and store al variables in this one session.

Exported CSV incompatible with /Manager CSV handler

When a user exports an CSV from the decrypt page, it doesn't work on the /Manager page.

On the /Maanger page users can upload an CSV with transactions and these get categorised and sorted. However I've kind of hard coded the code to only work with exported CSV from the bunq app. Need to rewrite the code to accept both, exported CSV from ComBunqWeb and bunq app

MultiValueDictKeyError: "'json'"

https://sentry.io/ogkevin/combunqwebapp/issues/281090296/

KeyError: 'json'
  File "django/utils/datastructures.py", line 83, in __getitem__
    list_ = super(MultiValueDict, self).__getitem__(key)

MultiValueDictKeyError: "'json'"
(5 additional frame(s) were not displayed)
...
  File "BunqAPI/views.py", line 106, in post
    file_contents = json.loads(request.POST['json'])

MultiValueDictKeyError: "'json'"

If the file has not been loaded correctly via JS, need to cancel the ajax call

Use multiple url configs

Atm there is only one main url config which is not clean and easy to read. Need to give each module its own url config.

Use environment to set setting

ATM i have to manually turn sandbox on and off, logging to sentry etc.

Settings should use a Config Var to determine the settings.

Category data base model

The current model for storing categories in the database is not convenient. Category name and additional info needs te be stored in separate fields.

Reading file on /decrypt

There are 2 buttons "decrypt" & "start session", however the JS code that handles these buttons does not work right. When the user presses one of these 2 buttons the encrypted file gets read and then send via POST. This does not work on the 1st press.

For it to work you NEED to press 'decrypt' once, after this the file is read correctly, now the buttons work as intended. The first press cant be "start sessions".

This issue is introduced in 43036fb#diff-8841de7cf2efee0cfe87e30986d7c694

Export transactions

For the transaction table im using Vanilla DataTables. With this table users can search/filter transaction based on keywords. My idea was to get the shown entries back and convert them to CSV for the user when an 'export' button is pressed. However as of now this module doesn't support that therefore Mobius1/Vanilla-DataTables#11. Once support of this is added I can add an export feature.

Initial Update

Hi ๐Ÿ‘Š

This is my first visit to this fine repo, but it seems you have been working hard to keep all dependencies updated so far.

Once you have closed this issue, I'll create seperate pull requests for every update as soon as I find one.

That's it for now!

Happy merging! ๐Ÿค–

Load file button

ATM when the load file button is pressed, javascript will make 3 ajax calls. This needs te be rewritten so that only one ajax call is made and the backend will return 1 response.

Expand categories

ComBunqWeb filter

I've created a google form for the first round of data collection to expand the category filter. For now the filter wil only filter on IBANS. So when a list of transactions is send to get filtered, the scripts wil look through the transactions and add then to categories based on the IBANS where the money was sent to.

The form is very simple, insert a IBAN to the category it belongs to. One IBAN per category per submission. Before this data gets stored in the database it will go through validation.

If you want to add/remove a catagory or have a suggestion feel free to comment.

Why Google form

Because the app is hosted on a free Heroku account, there are limitations on how much stuff you can store in the database. To prevent the database from filling up and not saving new data, I've decided to use google forms for now.


  1. In commit 2d91e1b the IBAN validator is made using openiban

  2. in 7240ad8 the script will check if the category already exists in the database and prints out the other IBANs already stored for that category

  3. in c5d490f the submitted categories can get stored after validation in the database

  4. in 92cea80 user text CSV gets filtered using this model

catagory --> category

Need to fix this spelling error in the entire code.
๐Ÿคฆ๐Ÿพโ€โ™‚๏ธ

AttributeError: 'callback' object has no attribute '_bunq_api'

https://sentry.io/share/issue/3137323731332e323833303735303535/

AttributeError: 'callback' object has no attribute '_bunq_api'
(7 additional frame(s) were not displayed)
...
  File "BunqAPI/views.py", line 128, in post
    response = getattr(API, selector.strip('/'))()
  File "BunqAPI/callbacks.py", line 60, in load_file
    accounts = self.accounts()
  File "BunqAPI/callbacks.py", line 152, in accounts
    r = self.bunq_api.endpoints.monetary_account.get_all_accounts_for_user(  # noqa
  File "BunqAPI/callbacks.py", line 308, in bunq_api
    return self._bunq_api

AttributeError: 'callback' object has no attribute '_bunq_api'

Seems like the bunq_api is not set correctly.

Handle empty response when there are no cards

If the user has no cards in his/her account and presses on the cards button, the loading indicator stays there forever. This is because the retuned response is empty and therefore then loader container is not getting repopulated with data.

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.