Giter VIP home page Giter VIP logo

expression-engine's Introduction

Frontend Developer Assignment (React & Bootstrap)

Objective:

Create a web-based Expression Engine UI using Bootstrap and React.

Requirements:

  1. Utilize Bootstrap for styling to ensure a responsive and visually appealing UI.
  2. Implement a form where users can:
    • Input connector type: AND/OR
    • Input expressions. Each expression should contain the following fields:
      • Dropdown: Rule Type with values - Age, Credit Score, Account Balance
      • Operator: >, <, ≥, ≤, =
      • Value
      • Score
  3. Enable users to add and delete expressions.

Expected Output:

{
    "rules": [
        {
            "key": "age",
            "output": {
                "value": 60,
                "operator": ">=",
                "score": 50
            },
        },
        {
            "key": "age",
            "output": {
                "value": 40,
                "operator": ">=",
                "score": 100
            }
        },
        {
            "key": "account_balance",
            "output": {
                "value": 100000,
                "operator": ">=",
                "score": 200
            },
        },
    ],
    "combinator": "and"
}

Code Explanation:

App Component (App.js):

  • Manages state for rules, combinator, and showOutput.
  • Includes functions to add and delete expressions.
  • Displays form, expression list, connector, and output components.
  • Utilizes Bootstrap for styling.

Form Component (Form.js):

  • Manages state for expression input fields.
  • Provides dropdowns and input fields for rule type, value, operator, and score.
  • Includes a button to add expressions.

ExpressionList Component (ExpressionList.js):

  • Displays a table of expressions with rule type, value, operator, score, and delete button.

Connector Component (Connector.js):

  • Provides a dropdown to select the connector type (AND/OR).

OutputDisplay Component (OutputDisplay.js):

  • Displays the JSON data of rules and combinator.

Usage:

  1. Clone the repository.
  2. Install dependencies: npm install.
  3. Run the application: npm start.

Feel free to reach out if you have any questions or need further clarification.

Happy coding! Shivam# expression-engine

expression-engine's People

Contributors

black-sheepp 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.