/records-demo

A simple demo of calculating costs and distribution for records

Primary LanguageJavaScriptMIT LicenseMIT

Build Status Stack Share dependencies devDependency Status js-standard-style github-version

Simple Demo of Records Calculations

Records Demo screenshot

Table of contents

Overview

This a a simple demo of a records calculator using node and redux. Given a records definition and order set, be able to calculate the fees and distributions for the order.

It is written using node and redux. The starting point is Dave Zuko's great react redux starter kit - Github Repo

The source is in the src/recordApp folder

  • appServer - Application server accessed through rest apis to set an order and calculate fees and distributions
  • client - Barebones react web page (see above screenshot)
  • demo - Command line tools for calculating the fees and distributions
  • server - Koa web server with hot reload (unchanced from the starter kit)
  • shared - Common models
  • tests - A few unit tests - see above link to the code coverage

See the package.json for the packages used. Additional packages included beyond the starter kit are:

Running the Application

Download and install the necessary node modules.

git clone https://github.com/golgistudio/records-demo.git
cd records-demo
npm install

To run the command line demo for calculating fees. The bash shell script includes references to the input files and calls a wrapper script that compiles the ES6 code.

cd src/recordApp/demo
./runReportFees.sh

To run the command line demo for calculating distributions. The bash shell script includes references to the input files and calls a wrapper script that compiles the ES6 code.

cd src/recordApp/demo
./runReportDistributions.sh

To run the tests. This outputs a coverage report in the quality folder

cd records-demo
npm run testse

To run the demo. Start the application server and then the web server The express app server runs on port 3001

cd records-demo
npm run startAppServer

The web app server runs on port 3000

cd records-demo
npm run start