This is covid questionnaire for Redberry employees.
React @18.1.0 - front-end framework
TailwindCss @3.0.24 - CSS framework
React Router @6.3.0 - Client side router
React Hook Form @7.30.0 - Form validation library
Cypress @9.6.1 - JS testing tool
1. First of all you need to clone repository from github:
git clone https://github.com/RedberryInternship/covid19-otomamatsashvili.git
2. Next step requires installing all the dependencies:
npm install
or
yarn
3. After that you can run Covid Questionnaire from terminal:
npm start
or
yarn run start
This application is test driven. To write e2e and integration tests @cypress
is used. You can find all of the tests into following path: /cypress/integration/*.spec.js
You can run cypress tests using following commands:
1. Copy cypress configuration file and if you need feel free to change it:
cp cypress.example.json cypress.json
2. Open cypress:
npx cypress open
├─── cypress # native android project files
│ ├─── integration # integration and e2e tests
│ ├─── plugins # for loading plugins
│ ├─── support # library configuration files
├─── public # entry folder
│ ├─── favicon.png # tab icon
│ ├─── index.html # main html file
│ ├─── manifest.json # index.html configurations
│ ├─── robots.txt # search optimization
├─── readme # readme assets
├─── src # project source codes
│ ├─── assets # project images and fonts
│ ├─── components # reusable components
│ ├───├─── input.jsx # input with validations
│ ├───├─── Navigation.jsx # main navigation
│ ├───├─── QuestionnaireWrapper.jsx # main questionnaire container
│ ├───├─── RadioInput.jsx # radio with validations
│ ├─── pages # application pages
│ ├───├─── Start
│ ├───├───├─── Start.jsx # start page
│ ├───├───├─── index.js # exports page
│ ├───├─── Identification
│ ├───├───├─── Identification.jsx # first page of questionnaire
│ ├───├───├─── index.js # exports page
│ ├───├─── CovidStatus
│ ├───├───├─── CovidStatus.jsx # second page of questionnaire
│ ├───├───├─── index.js # exports page
│ ├───├─── Vaccination
│ ├───├───├─── Vaccination.jsx # third page of questionnaire
│ ├───├───├─── index.js # exports page
│ ├───├─── CovidPolitics
│ ├───├───├─── CovidPolitics.jsx # fourth page of questionnaire
│ ├───├───├─── index.js # exports page
│ ├───├─── Thanks
│ ├───├───├─── Thanks.jsx # final request sending page
│ ├───├───├─── index.js # exports thanks page
│ ├───├─── index.js # export all pages
│ ├─── state # global state management
│ ├───├─── questionnaire-context.js # react context
│ ├───├─── QuestionnaireProvider.js # context provider component
│ ├─── App.js # main component with routing
│ ├─── app.css # main css file
│ ├─── index.js # root JS file
├─── .eslintrc.json # eslint config file
├─── .prettierrc.js # prettier config file
├─── package.json # dependency manager configurations
├─── cypress.json # cypress config file
├─── tailwind.config.js # tailwind config file
|
Application is deployed on digitalocean server with ngnix
. You can view it here.