This is header image

Coronatime App

Coronatime is app, which display countries covid statistics for authorized users.

Table of Contents

Prerequisites

  • Node JS @16.X and up
  • npm @8 and up
  • typescript @4 and up

Tech Stack

  • React @ 18.0.0 - front-end framework
  • i18next @21.8.5 - library for translation
  • Cypress @10.0.3 - end to end testing Framework
  • Tailwind @3.0.24 - CSS framework
  • React-hook-form @7.31.2 - library for forms
  • React-select @5.3.2 - Select Input control
  • React-router @6.3.0 - library for routing

Getting Started

  1. First of all you need to clone app repository from github:
git clone https://github.com/RedberryInternship/coronatime-nikanoza.git
  1. Next step requires install all the dependencies.
npm install
  1. Also you need to create .env file where copy information from .env.example file
cp .env.example .env

Project Structure

|--- src
|   |--- assets # project images
|   |--- components # reusable components
|   |---|--- index.js # export all components
|   |--- pages # all page components
|   |---|--- page-folder # page folder name
|   |---|---|--- page-name.js # react component
|   |---|---|--- index.js # export default component
|   |---|--- index.js # export all pages
|   |--- locals # translation files
|   |--- services # request functions
|   |--- types # types files
- .eslintrc.json  # eslint config file
- .prettierrc.json  # prettier config file
- tailwind.config.js # tailwind config file
- package.json     # dependency manager configurations

Testing

For testing we are using Cypress. You can see all testing files on Cypres e2e subfolder.

cypress/e2e

If you want to see test in action, you need install cypress first

npm install cypress --save-dev

also you need to create cypress.config.ts file and move settings from cypress.config.ts.example there

cp cypress.config.ts.example cypress.config.ts

and also in the cypress folder is tsconfig.json file for some typescript configuration.

after all open Cypress

npx cypress open

More information about Cypress

Deployment

Before every deployment you need to create build file.

npm run build

after this you can use this file to deploy project on server.

Resources