Giter VIP home page Giter VIP logo

insurance-flow's Introduction

About The Project

"Insurance flow" an an application designed to build form flows that uses JSON responses to construct forms on the frontend. It is a monorepo consisting of the following packages

  • nf-client - A NextJS app that holds the API responses for the forms and renders the entrypoint into the flow.
  • nf-ui - A component library that holds all of the UI components to be used, including Workflow which will be the entrypoint into every flow.
  • nf-common - Although just currently for shared types, could also be leveraged for common test config, eslint configs, etc.. in the future.

Insurance Flow Screenshot

Built With

This section should list any major frameworks/libraries used to bootstrap your project. Leave any add-ons/plugins for the acknowledgements section. Here are a few examples.

Getting Started

To run the app

git clone https://github.com/guyathomas/insurance-flow && cd insurance-flow;
yarn && yarn start

Navigate to localhost:3000/workers-compensation

Key decisions

I wanted to follow a common convention for defining a schema, so that we could chose to replace with a standard lib in the future if we wanted ( like https://uniforms.tools/ ). I chose JTD for two reasons:

  1. It gave the validation requirements that we needed in the spec
  2. It gave us type safety over defining the schema from Typescript > Schema Definition.

I wanted to be able to switch up the schema and have the client understand both too. i.e. if we wanted to migrate to JSON schema, we could add another renderer, and schemaTransformer and then we'd be all good.

Future improvements

In retrospect, JTD was not the right call. JSON schema would provide much better future extensibility on data validation ( i.e. a number range between 0-10 is not possible for JTD, but it in JSON schema )

I would also like a config to allow users to define different components to use based on the response. This would allow it to be more extensible without needing to really change the Workflow implementation. A thought is providing a custom component mapper into Workflow, that could override the default ones.

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

insurance-flow's People

Contributors

guyathomas avatar

Watchers

 avatar

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.