A simple survey app that records users answers and ratings
You can find the working demo at https://marigameo.github.io/FreshSurvey/
- On opening the site, the use can answer questions one by one.
- The user should be able to move from one screen to the other and back.
- On the final question, if the user clicks on submit, they are shown a confirmation screen.
- The response is sent to an API via POST call. Mocked to this service https://mockapi.io/
- On refreshes during a form fillup, user will be redirected to the last question he has seen with all previous answers persisted.
- Once a form is submitted successfully, the state is reset and if the page is refreshed, it goes back to the home page.
- A small analytics dashboards to display the stats of survey in charts
- Used chart JS
- Error handling - implemented custom disappearing snackbar component for both success & error scenarios for better UX
-
Open index.html in local server (if installed in vscode) / directly in your browser
- Vanilla JS, HTML5, CSS3
- Questions are loaded from a self hosted JSON payload at github pages
- Local storage to preserve user survey inputs while form manipulation
- Session cookie to keep track of active session & route to tabs on refresh
- Mock api to post survey form payload - Mockapi.io
- Hosted on github pages
- No testing frameworks like jest /mocha is being used
- Simple vanilla JS utility/framework to unit test common util methods & component creation utils
- Not much validations are involved here - as the survey app we're not restricting users to mandatory fill all the fields & most fields would be pre-filled (with some default active options)
- Just open the test.html file in chrome browser (preferrably)/local live server (if installed)
- And, you can see the test running & results in browser console
Note: Few negative test case validations are commented. Feel free to uncomment & test for wrong inputs
Email - [email protected]
Find more projects at my Portfolio