Finance

by aretecode

GitHub Readme.md

Build Status

Deploy to Heroku

Previous

Wondering

  • Default wiring for Components connect & disconnect? (@see component/Validate)
  • How to test components that do database transactions? (@see spec/)

^ both of these were caused thanks to inheriting an auto port disconnect when prev process disconnected.

  • Why the first test will timeout, and why they will all timeout sometimes? (Have to use a stupidly high [10 sec] timeout when testing... this was fickle.)
  • How to send array to inPort.pattern in xpress/Router using FlowHub [the order they are dragged] issue425 issue111 issue24
  • Why does https://github.com/noflo/noflo-xpress/blob/master/lib/BaseRouter.coffee not list HEAD and PATCH as valid verbs?
  • Where to do HTTP reqs go after Server is set up (In FlowHub)?
  • Where to set up Routing Server in FlowHub?
  • Why the pool gets destroyed when including the connection now? (module.exports are cached)
  • How to pass data on with no inPort? (loadbang only)
  • Why you can't delete projects from github on FlowHub? (there is an API, but not UI (link))
  • Is # @runtime noflo-nodejs still useful?
  • Why does FlowHub duplicate projects cloned into it appending username before name and give duplicate components for that project? (upload gif of it)
  • Can the Component change icons with the label? Or have access to the label name?
  • Would it be better to have a Connection Component attached to the piping, or get connection in each Component?
  • can FlowHub only pull from Master?

New:

  • rename FinanceOperation to FinanceOp
  • put database init/cleanup functions called in beforeAll/afterAll
  • merge Expense & Income entities (finance_op)
  • rewrite main queries for finance_op
  • change string id to uuid type (then to char(36))
  • add (done()) to tests
  • parse in JSON
  • parse JSON body only on certain routes
  • simplify tests
  • simplify entities
  • move away from OOD & OOP (looking @ you src/)
  • write a better SUM query for balancetrend
  • make it work on FlowHub
  • recreate FBP graphs as subgraphs in FlowHub
  • recreate all FBP graphs
  • example of all working in FlowHub
  • make it work in FlowHub
  • make it all work in FlowHub
  • make it work on Heroku
  • change multiple routers to use (FlowHub)~arrayport
  • could pass (req) down one pipeline, no res port (will this reduce reusability of the components atomically? yes, but it focuses code it for this one instance)
  • pass DB connection down the pipe along with req?
  • rename name as type
  • change CRUD not only to better represent what it does in name (between Route and rest of the machines for that Route) but also use boolean inPorts to set the properties being set by components that (currently) extend it. (removed)
  • Response could be one inPort, pass in data about which one it is
  • stricter Tests when truncating afterAll() since we have a limited dataset
  • refactor Database to lib/

@TODO:

  • Validate
  • Validate.update (optional params)
  • use WirePattern
  • use WirePattern more in depth
  • use Group
  • use FloHub
  • use FloHub more in depth
  • fix this Test inconsistency (sometimes has a timeout, usually on first test?)
  • pass the req down a side port to the Response
  • update all properties
  • PATCH to PUT unless I extend lib/BaseRouter
  • fix PUT to POST
  • .fbp into .json
  • import .json into flowhub via github (using https://github.com/noflo/noflo-browser-app)
  • add .json to github via flowhub
  • Test methods of the src/ (FinanceOperation, Tag)
  • improve code clarity in FetchWithMonthYear
  • add Income
  • add Balance Reports
  • download flowhub graphs and run them in noflo
  • convert raw queries to knexjs
  • change test order so it doesn't have to be run three times
  • use .locals in ExpressJS?
  • Logging
  • Route erorr reqyest through Log
  • put noflo exports in FinanceExports? Split src/ into a diff repo?
  • report issue @NoFloUI duplicate project name
  • change graph names to temp fix problem from ^

After

  • pass in connection to an inPort (@see components/Database)
  • Test with HTTP
  • update tags
  • add Morgan as Middleware to log
  • send things after tags are all saved (@see components/Store)
  • improve query to save if not exists (use Raw) (@see components/Store)
  • select only required columns
  • Filter null instead of returning in the map in FetchList
  • TODOS in non noflo personal-finance-tracker (moved here)
  • [ ]
  • add Travis
  • use Travis
  • Travis badge
  • use Groups to send the data to Response (rather, put all in one data pipe)
  • Test using noflo-tester using .fbp
  • Test in FlowHub (http Component?)
  • call Super insteadof childConstructor
  • remove unnessecary port events

Future

  • Change update to use query insteadof params for updating individual parts (actually, body insteadof params&query)
  • add rollback & undo feature to the commit
  • filter XSS in the description
  • static (or something) optional Error port sender
  • Validate could be a filter insteadof a Component (better how it is)
  • transform Data before going to Validator? in Create or _ (n/a)
  • add chaining constructor to src/Factory (removed Factory)
  • Test the AuthMiddlewareComponent
  • Test the DeleteComponent (removed)
  • could change CRUD to take inPort of the action and not need named Components (removed)
  • work with BlueBird Promises
  • work with BlueBird more in depth
  • validate range in BalanceTrend
  • write documentation?
  • port for each Validate param?
  • multiple responses in components/Response not just failure success(pass)
  • maybe https://github.com/noflo/grunt-noflo-manifest
  • add all the Grunts
  • use backbone

NoFlo extension

  • dig into the noflo source code & compare how it translates from PHP & if any of my extensions are applicable
  • ^ did a microextension (addOn)
  • add SendThenDisconnect()
  • addInOnData

Other

  • rename successful to success

  • A lot was learned & used from https://github.com/noflo/noflo-xpress

  • Wow... if you add a repo from github to FlowHub, the first one is named name the second one is named username_name