Skip to content

Repository files navigation

Survey Builder

A survey builder app for Sotto.

Setup

npm install
npm run dev

Open http://localhost:3000

Approach

I used React context for state management, it keeps things simple for this scale. All survey state lives in SurveyContext.tsx.

The main components:

  • SurveyBuilder - layout with two panels.
  • QuestionEditor - form for editing a single question.
  • OptionEditor - editing options for multiple choice.
  • SurveyPreview - renders the survey as respondents would see it.
  • JsonViewer - shows survey definition and responses as JSON.

Tradeoffs / What Id add

  • No form/input validation (labels can be empty, MC can have 1 option, etc).
  • Would add more question types (rating scale, dropdown, etc).
  • Would Add drag and drop.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages