Giter Club home page Giter Club logo

conditionbuilder's Introduction

Condition Builder

code style: prettier

ย  This take-home project is called the Condition Builder. This tool allows you to load an array of data and layer in and/or conditions to filter the data. ย 

Condition Builder UI

Features

  • User can load array of data from an URL. Example URL: https://data.nasa.gov/resource/y77d-th95.json
  • User can build or conditions concatenated with and conditions.
    • For an example, any c{n} resolved to be a boolean (ex. name equals to "something"), then the condition can be formed as (c1 || c2 || c3) && (c4 || c5).
  • User can add or condition by pressing the plus button at the end of each row.
  • User can add and condition by pressing the and button below each card container.
  • User can see the list of loaded data on the bottom of the page.
  • User can see the filtered data list when valid conditions are built.
  • Visual feedback on where new or condition will be inserted when user hover over plus button (optional)
  • Input validations
    • For comparison operators (Greater Than, Less Than), the entered value must be number.

Tools/Languages

Potential Improvements/Enhancements

If this application was intended for production/at scale, I would include the following:

  • ๐Ÿ”› Add E2E cypress tests.
  • ๐Ÿ“ˆ Add code-coverage checks to build process to ensure coverage remains at/above a pre-determined level (That said, more unit tests ๐Ÿ˜ƒ)
  • โœ… Implement/expand validation using joi or yup.
  • ๐ŸŒŽ Support language localization using react-intl.
    • โœ‚๏ธ Extract language strings to centralized location.
  • ๐Ÿ“ฆ Semantic versioning
  • ๐Ÿ‰๐Ÿ’ง Allow drag/drop of conditions to change order/sequence.
  • โ˜๏ธ Allow user to save/load conditions to either localStorage or in the cloud.
  • ๐Ÿ“š Refactor theme/styles into a lib
  • โŒ Improve error handling/checking e.g:
    • ๐Ÿšฉ when user enters a bad url
    • ๐Ÿšฉ the request for a valid url fails
    • ๐Ÿšฉ the response from the url is not a valid key/value pair

How To Run

Requirements:
  • node >= v14.21.3
Starting the App:

First, clone the repository locally, then run the following:

$ npm install # Install dependencies (required for every step hereafter)
$ npm run dev # Start the development server
Create Production Build:
$ npm run build # Required for preview task below
Preview Production Build:
$ npm run preview
Running Tests:
$ npm run unit-test
Running Linter:
$ npm run lint

conditionbuilder's People

Contributors

andrefuller 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.