Skip to content

anna-liepina/explore-cwa-react

Repository files navigation

master heroku
tests tests tests
coverage coverage coverage

'Explore Me CWA' [client web application]

This project is centered around parsing various datasets, including UK government data on property sales, police reporting data, and post code data. The goal is to harness geographical information to establish connections between postcodes using latitude and longitude.

The primary objective is to develop a scalable GraphQL backend capable of swiftly delivering requested results. This endeavor seeks to illuminate intricate aspects of GraphQL use, addressing challenges like the N+1 problem and scaling scenarios where more than one database is required for both write and read nodes.

Key features of the project include a robust automated Quality Assurance (QA) system, incorporating anonymized data seeding for comprehensive QA testing. The project also explores the flexibility of JavaScript, pushing the boundaries of the language. Notably, it delves into the constraints of default V8 object fields, which are capped at around ~8.4 million, while highlighting the superior handling capacity of the Map data structure.

Additionally, the project incorporates a queue system to enhance the efficiency of data processing. In essence, project serves as a practical demonstration of diverse and advanced aspects of software development, reflecting a commitment to excellence and innovation.

Live DEMO

software requirements

if you're using make commands, docker and docker-compose are required, and local node.js with npm are optional

used technologies

used services

how to install

  • with make commands no additional steps are required, otherwise you need to execute $ npm i

how to run tests

  • end-to-end 'cypress' tests: $ make sync to fetch GraphQL backend as a git submodule, then $ make cypress
    • npm analogue require booting up CWA & SA and link them together, then cd cypress && npm test
  • functional 'jest' tests: $ make test or $ npm test
    • optional 'jest' CLI params, examples:
      • to collect coverage, example: $ npm test -- --coverage, report will be located in ./coverage directory
      • to run tests only in specific file, example: $ npm test src/validation/rules.test.js

how to run in 'development' mode

  • $ make or $ npm start

how to run in 'production' mode

  • $ make serve, there is no npm equivalent
  • if you only need to generate static assets
    • $ make build or $ npm run build - generated assets will be located in ./build directory

how to run containers with different variables using 'make'

  • example: make PORT=18080

gitflow

  • heroku -> current production, contains production specific changes, trigger deploy on AWS on every push
  • master -> most upto date production ready, all pull requests into this branch got mandatory checks 'ci/circleci: jest' and 'ci/circleci: cypress'
  • feature branches -> get merged into the master branch when they are ready and mandatory checks passed
  • CI executes tests in an isolated environment

used environment variables

variable default value used as purpose
PORT 8080 number port on which the application will be made available
REACT_APP_GRAPHQL //localhost:8081 string GraphQL backend URI
REACT_APP_TITLE DATA EXPLORER string website's title

DEMO

overview

Area Overview

properties

Properties

incidents

Incidents