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.
- 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
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.
Clone the Application.
git clone https://github.com/Typeform/js-api-client.git
Install Dependencies.
npm install
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"
To run this project run
npm run start
You can deploy the application on any hosting services platform
Free Hosting Platforms:
GET /api
{
"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 /api/${formId}
Parameter | Type | Description |
---|---|---|
formId |
string |
Required. Id of form Category |
{
"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
}