Giter Site home page Giter Site logo

stadelmanma / interactive-ledger-rails Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 521 KB

A rails powered ledger to store transactions from one or more accounts.

License: GNU General Public License v3.0

Ruby 49.74% JavaScript 0.74% CSS 19.79% HTML 21.69% CoffeeScript 8.03%

interactive-ledger-rails's People

Contributors

stadelmanma avatar

Watchers

 avatar  avatar

interactive-ledger-rails's Issues

Retain current non-database functionality as 'Display Ledger'

Current the code just loads and parses a tab delimited format and displays it without actually inserting it into the database. I want to keep this functionality so I can display an already existing ledger without necessarily adding it to the database.

It may be simplest to re-factor my current code into a function and view to do this and then work on adding the database functionality.

Create charts of various totals

https://www.chartkick.com/ seems like it will do the trick.

Graphs I think would be nice:

  • Week Totals preferably stacked with the subtotal amounts
  • Stacked lines showing total expenses/deposits growing over time
  • Bar charts showing average per week spent per category

Create a 'display' helper as a model concern

This method would take the place of the display_hash (and similar) methods in use, concentrating that logic into a single place to ensure consistency. The display logic would be dependent on the return type of the method passed in as an argument.

The syntax would be record.display(:amount) and the code

Pseudo-code for the method would be

def display(method)
  value = self.public_send(method)
  case value.class
  when Float
    number_with_precision(value, delimiter: ',', precision: 2)
  when Boolean
    # something
  end
end

I could also add a line to check if an attribute has a 'display' method i.e. display_validated and call that instead of using the case block.

Add a running total to the budget#show view

This would get started from an 'initial value' setting and then updated based on the value of each row in the table. I'll need to add the initial value column to the budgets table as well as a column to the view table for the total value

Make the mangement of data file parsers more friendly and modular

Currently it would be very awkward to add more parsers for an end user because not only do you have to edit the helpers file but you also have to edit the ledger#edit view. Ideally I could add a 'parsers' directory to my application and add them all there. New parsers would need to be a subclass of the DefaultFormat. For the ledger#edit view I could just pull all of the subclasses and the base class itself instead of hard coding them.

A rename of Format to Parser might also be good.

Implement controller and view to edit uploaded transactions directly

This snippet below will populate all of the child models from a parent. I think I can use this code for when I want to modify transactions in a given upload

  <p>
        <%= f.fields_for(:ledger_uploads) do |upload| %>
            <%= upload.label :data_source %>
            <br>
            <%= upload.text_field :data_source %>
        <% end %>
    </p>

This snippet could allow deletions

  <%= person_form.fields_for :projects do |project_fields| %>
    Delete: <%= project_fields.check_box :_destroy %>
  <% end %>

Allow a fuzzy check for duplicates

It will be a three step process. The first will check for transactions with the same date and amount and then a check for similar descriptions. I want to use date's and amounts first because they are columns that could be indexed to speed up searches. Perhaps I can find some kind of gem to do the 'fuzzy' matching for me.

Then add a link to compare the similar transactions if any are found. I'll need to create some form of a 'show' view to compare the transactions, a table will still work best.

Make a Budget View

I want to be able to initialize this table with re-currant values but then edit those values and dates as required.

  • Implement recurring values that default to a specific day of the month
    • i.e. always on the 12th of a month
  • Implement recurring values that default to a specific day or week number in a month
    • i.e. the 2nd Monday of every month
  • Implement an "planned" budget and then have an "actual" one next to it that shows values pulled from the transactions table
    • All categories would be pulled into this,
    • Time ranges that haven't happened yet would still get filled with data from the "planned" budget

Add bool column to ledger_uploads "uploaded"

This column will be used to prevent "re-uploading" duplicate data. I'll have the code throw an exception when attempting to run upload_data on a record that has already been uploaded.

The proper way to do an upload is to first delete the ledger_upload and then re-create it. That way no transactions are left behind.

Implement uploaders for different bank formats

Since I only really import data from Discover, Chessie an possibly Wesbanco I can write upload methods to handle the bulk of data preprocessing and then shift to a new view to edit the transactions uploaded directly. I also want an upload method that does no preprocessing but thats as easy as an else clause.

Refactor logic in controllers, concerns, helpers and models into services

This will be done as needed to keep my controllers skinny and non-persistence related logic out of my models. For example all of the logic used to upload data should be a service because it represents a user interaction between a view and model.

Additionally, I'd like to move away from the helper and concern pattern into something clearer and more encapsulated.

Budget doesn't handle categories with "zero" entries properly

Currently, if an expected categorical amount is budgeted for (i.e. Gas) over the week and there are no expenses with that category during the week the "anticipated amount" still gets used instead of an "actual amount" of 0.0 dollars. This messes with the running totals calculated. Perhaps a reasonable fix would be to maintain a unique list of all keys in present and set any missing ones to zero.

Rework budget expense editing view

I think it would be far easier from the user's perspective if you edited the budget view in a form similar to viewing it. This makes it similar to editing it in an excel spreadsheet since that is the type of behavior I am going for.

Create a README

This is the start, and then eventually I'll begin adding rdoc comments throughout the project.

Create a proper home page

Now that I have more than one thing to look at I should have a home page to show me all my available ledgers and budgets.

Allow a transaction to be linked to a budgeted expense

In some cases I need to link a transaction to an expense because the week I marked something as 'due' might not correspond to the proper transaction or any transaction, i.e. things that are due on a monthly basis or if the check is taken out late.

Implement a summary view for ledgers that shows averages and totals

This would allow me to see the big picture of what my expenses look like as well as catch any typos in categories and sub-categories. Ideally for an aggregate category like 'Misc.' I could also see the sub categories within. Preferably from a click event so they are initially hidden.

Make the data persist and then allow me to do incremental uploads, edits and deletes

I should also be able to define an 'account' for the entire upload if desired.

Conversely I could implement an 'uploader' for different formats such as a Discover and Chessie CSV export.

The data would then be sorted relative to all of the other data. In the edit tab I could make a method to examine possible duplicates, i.e. if three or more fields are exactly the same then flag it.

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.