Skip to content

mamatsa/covid-questionnaire

Repository files navigation

Redberry covid questionnaire

This is covid questionnaire for Redberry employees.

Table of Contents

Prerequisites

  • Node JS @12.X and up
  • npm @6 and up

Tech Stack

Getting Started

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

Testing

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

Project Structure

├─── 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
|

Deployment

Application is deployed on digitalocean server with ngnix. You can view it here.

Resources