Skip to content

carloskiron/typeformProcessor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Typeform processor

Typeform webhook implementation and business logic to process a new survey answer. This solution can be tailored to support specific business needs. It can process answers from any survey once configured.

Core concepts

TestConfiguration: domain object to define a specific test configuration. In typeform, every form has a unique id. Furthermore, every question inside a form has a unique identifier as well. In order to save a new answer to the database every specific question should be processed according to its data-type and named based on mappings specified as part of the configuration.

Example of a configuration to process a typeform form identified by irEdZweA:

TestConfiguration testConfiguration = new TestConfiguration();
        testConfiguration.setFormCode("irEdZweA");
        testConfiguration.setFormFields("entryid,name,email,phone,landed_at,submitted_at,7i8WIXSGpPkA,MCltzxozEDKF,pQ9fp8iIn8E0,YnlY5nXCLGRi,w2PnnW8QtxaS,9o8QyNjjdYNn,80kU7reebHwN,6JP9lCAbqZ0J,ejCqs98sjPUx,uk2ubbKe4X7z,F5JWXq8OL5DA");
        testConfiguration.setOutputFields("entry,name,email,phone,datecreated,lastupdated,pqua_4,pqua_3,pqua_2,pqua_17,pqua_16,pqua_15,pqua_1,pqua_9,pqua_8,pqua_7,pqua_78");

HL Architecture

  • com.processor.IProcessorService: defines the contract of the webhook operation.
  • com.processor.ProcessorController: rest controller to implement IProcessService
  • com.processor.aop.ErrorsHandler: aspect to track errors during executions.
  • com.processor.core.typeform.*: classes in charge of processing typeform datapoints based on TestConfiguration.
  • com.processor.AnswerProcessor: business logic to process new answers. It has dependency to TypeformProvider component through IQuestionnaireHelper.
  • com.processor.domain: domain classes involved (POJO)
  • com.processor.repositories: mongodb repositories (data access)

All dependencies managed by Spring boot.

Stack

Global Settings

Database connection and other settings can be set up in the following .properties:

It's highly recommended to use ENV variables to set up database connection strings and other sentitive information.

Unit tests

Deployment

The service can be deployed on any container-based service with Docker support. A Docker file and build spec file are included as part of this distribution to easily deploy it on AWS ECS through CodeDeploy or CodePipeline

MongoDB database can be set up using MongoDB Atlas: https://www.mongodb.com/cloud/atlas

About

Typeform processor

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published