/ccdb5-ui

Primary LanguageJavaScriptCreative Commons Zero v1.0 UniversalCC0-1.0

Consumer Complaint Database - 5.0

Build Status Coverage Status

Description: This application allows consumers to search complaints submitted to the CFPB by other consumers.

Technology Stack

This application is written in JavaScript and Less within the React + Redux framework. It uses Webpack at runtime to manage module loading.

The code is written with the ES6 feature set of JavaScript. Backwards compatibility is achieved by compiling the script with Babel prior to using it within the browser.

Unit testing of the application is performed within Jest with Enzyme providing support for event testing.

npm is used to manage the build/test/deploy cycle.

The ccdb5_ui (note the underscore) directory contains a thin Django implementation that allows it to be used as a plugin for CFPB's public website.

Status

Pre-release

Screenshot

screen August 17, 2017

Dependencies

This application depends on the following third-party components:

  1. Capital Framework - CFPB standard styling and controls
  2. History - Integrating the address bar with the application
  3. moment - Better date handling than native JavaScript

It also contains portions adapted from:

  1. react-typeahead

Installation

Detailed instructions on how to install, configure, and get the project running are in the INSTALL document.

Configuration

Please see the subsection Configuring in INSTALL

Usage

Developing code

Prerequisites

This application depends on the Public Complaints API to be available.

For local development, you will need to the following:

Code-Build cycle

To run the app in development mode:

npm start

Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits. You will also see any lint errors in the console.

Enter Control-C to exit development mode

Build deployment package

Our Travis configuration is set up to build a deployment package after every push to master. If this needs to be done manually, here are the steps to build the app for production:

npm version [major | minor | patch] -m [message]

This will:

  1. Bump the version in package.json (and package-lock.json for npm > 5.0)
  2. Build the application in production mode and optimize the build for the best performance.
  3. Create a new Git tag for the incremented version
  4. Commit the changes with the message provided
git push
git push --tags

This will push the latest changes to the repo and ensure the new tag is included

How to test the software

Unit testing

To launch the test runner in interactive watch/test mode:

npm test

Enter Control-C to exit interactive watch mode

Known issues

The Issue Tracker contains the most up to date status of issues or bugs with this repository.

Getting help

If you have questions, concerns, bug reports, etc, please file an issue in this repository's Issue Tracker.

Getting involved

CONTRIBUTING.


Open source licensing info

  1. TERMS
  2. LICENSE
  3. CFPB Source Code Policy

Links that were helpful

React-Redux

Travis building assets