Skip to content

Fetch responses from Typeform and display it in a score board - it fetch workspace forms and set each form as card which has Teams (multiple_choice or picture_choice) and display the total rating score. _______ Frontend Repo ⬇️⬇️

Notifications You must be signed in to change notification settings

FADL285/Typeform-Judging-Scoreboard-Backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Typeform - Judging Scoreboard - Back-End

Logo

Fetch responses from Typeform and display it in a score board - it fetch workspace forms and set each form as card which has Teams (multiple_choice or picture_choice) and display the total rating score.

What the application covers?

  • Fetch Specific Workspace Forms <WORKSPACE_ID> required
  • Bind each form name to a specific category.

    💡 NOTE: Workspace forms are fetched once and then cached on the server, make sure you create the forms before running the app on the server - don't worry, you can update the forms at any time.

  • Fetch form responses and return each team score. map each judge to his responses "Judge name is "
  • Fetch Form Variable if you need them

Typeform Qurstion Structure

Question Type
choose a team multiple_choice or picture_choice
rating question rating

This is a demo team evaluation form, take a look at it.

Requirements to run it locally

Installation

Clone the Application.

  git clone https://github.com/Typeform/js-api-client.git

Install Dependencies.

  npm install

Environment Setup

Copy .env.exmample to .env and update the environment variables with your values

  cp .env.example .env

.env Structure

# App Configuration

TYPEFORM_PERSONAL_TOKEN="Your token here"
TYPEFORM_WORKSPACE_ID="Your workspace ID here"

Run the Application

To run this project run

  npm run start

Deploy

You can deploy the application on any hosting services platform

Free Hosting Platforms:

API Reference

Get all Forms in the Workspace (Form Id, Title, teams, and variables)

  GET /api

Response Example

{
  "data": [
    {
      "id": "KaxNsOxB",
      "title": "Machine Learning",
      "teams": [
        {
          "id": "71KhmFtvEsYZ",
          "title": "Team_1 Name"
        },
        {
          "id": "71KhmF2fEsYZ",
          "title": "Team_2 Name"
        },
        {
          "id": "43KhmFtvEsYZ",
          "title": "Team_3 Name"
        }
      ],
      "variables": {
        "color": "blue",
        "panel": "Panel 1"
      }
    },
    {
      "id": "KaFadlXB",
      "title": "Graphic Design",
      "teams": [
        {
          "id": "71KhmFtvWfYZ",
          "title": "Team_1 Name"
        },
        {
          "id": "71KhmFtXasYZ",
          "title": "Team_2 Name"
        },
        {
          "id": "71KhFMtvEsYZ",
          "title": "Team_3 Name"
        }
      ],
      "variables": {
        "color": "black",
        "panel": "Panel 2"
      }
    }
  ],
  "statusCode": 200
}

Get form category teams with there scores ( also return rating questions and it's variables )

  GET /api/${formId}
Parameter Type Description
formId string Required. Id of form Category

Response Example

{
  "data": {
    "id": "VYxaDyQi",
    "title": "AI/ML & Data Science",
    "teams": [
      {
        "id": "yyxxwWqDjbqL",
        "title": "AstroCodeX",
        "responses": [
          {
            "judge": "Mohamed Fadl",
            "answers": [
              {
                "id": "K0iweO6dUa0J",
                "rating": 9
              },
              {
                "id": "paJyPOZUg2iT",
                "rating": 8
              },
              {
                "id": "9L0zlEV4QU0w",
                "rating": 6
              }
            ]
          },
          {
            "judge": "Ayman Ezzat",
            "answers": [
              {
                "id": "K0iweO6dUa0J",
                "rating": 8
              },
              {
                "id": "paJyPOZUg2iT",
                "rating": 7
              },
              {
                "id": "9L0zlEV4QU0w",
                "rating": 7
              }
            ]
          }
        ]
      },
      {
        "id": "Z1vfoFNAa73Z",
        "title": "EDAD",
        "responses": [
          {
            "judge": "Mohamed Fadl",
            "answers": [
              {
                "id": "K0iweO6dUa0J",
                "rating": 6
              },
              {
                "id": "paJyPOZUg2iT",
                "rating": 7
              },
              {
                "id": "9L0zlEV4QU0w",
                "rating": 8
              }
            ]
          },
          {
            "judge": "Ayman Ezzat",
            "answers": [
              {
                "id": "K0iweO6dUa0J",
                "rating": 9
              },
              {
                "id": "paJyPOZUg2iT",
                "rating": 7
              },
              {
                "id": "9L0zlEV4QU0w",
                "rating": 6
              }
            ]
          }
        ]
      }
    ],
    "ratingQuestions": [
      {
        "id": "K0iweO6dUa0J",
        "title": "Impact",
        "max": 10
      },
      {
        "id": "paJyPOZUg2iT",
        "title": "Completeness",
        "max": 10
      },
      {
        "id": "9L0zlEV4QU0w",
        "title": "Functionality",
        "max": 10
      }
    ],
    "variables": {
      "color": "blue",
      "panel": "Panel 1"
    }
  },
  "statusCode": 200
}

Acknowledgements

Authors

License

ISC

About

Fetch responses from Typeform and display it in a score board - it fetch workspace forms and set each form as card which has Teams (multiple_choice or picture_choice) and display the total rating score. _______ Frontend Repo ⬇️⬇️

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published