Git Product home page Git Product logo

tech-test's Introduction

Introduction

I tried to do a bit of everything. There are different styling used: SCSS styling, mostly tachyons but also a bit of inline styles. I used propTypes on one component just so show how it's done. Tried to do everything with react hooks as oppose to lifecycle methods. This app is not very "reactive". Things get loaded on start and that's it. Also, I failed to see the need for redux-store at this point. The app provides very basic test suite.

Primary libraries

  • React & React dom (UI framework)
  • React router (routing)
  • Ramda.js (utility library)
  • React animation height (simple animation for sliding forecast)
  • i18n react (translations)
  • Tachyons (css framework)

Project structure

The major sections of the app are:

  • scenes all scenes showing up as individual pages in SPA
  • services api's + example of a quick session storage use (not being used in this project)
  • styles some core styling
  • images all icons used
  • components shared components over different scenes
  • i18n translations, ready to be used by adding different languages
  • utils some custom helper function

Configuration file

config.json:

{
     // Any BE endponit that would give you data back either in openweathermap format
     // or custom format that requires bare minimum for this app to work of
     "api": "http://api.openweathermap.org/data/2.5/",

     // Used for open map
     "applicationId": "bd8326266ffeb1b662cf75fadf5dee2a",

     // Any list of cities that you'd like to see displayed
     "cities": [
       "Dublin",
       "Mexico City",
       "London",
       "La La Place",
       "Miami",
       "Zagreb",
       "Skopje",
       "Tokyo"
     ],

     // true when connecting to openweathermap, false with custom BEs
     // If we are using a different BE then transformation might be left on the BE side
     "frontendDataTransformation": true
   }

Starting the app

App can be start by first running yarn and then afterwards yarn start while located in root folder. Expect app to be running on http://localhost:3000

Running tests

Tests can be run by typing yarn test

Recommended refactors and improvements

  • Broader test coverage
  • Adding health check
  • Error handling with recovery (at the moment it just catches the error but no option to re-try or resolve)
  • Error logging using some external service
  • UX improvements for both web and mobile
  • Using something like React.context to pass some props onto all components

tech-test's People

Contributors

bsubotic avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.