Giter Club home page Giter Club logo

catapult-frontend's Introduction

Catapult tech test

Installation and running

All you need is yarn && yarn start to get the environment running. We recommend using node version 12+.

To see the application running visit http://localhost:8080 The API is served from http://localhost:3001, please visit this page to see the structure of returned data.

Contents

This app loads data about upcoming shifts from the server and displays these data in a list. Server is implemented using fake json server.

Project Structure

The app is built in react. The main component App renders ShiftsContainer which then loads and displays the data. We're trying to follow smart container - dumb component approach, so that containers fetching the data do the minimum (or better zero) amount of presentation.

Directory structure ./src:

./actions - files with dispatched actions for our store

./features - separate pieces of application

./lib - used for reusable code, e.g. api requests

./reducers - reducers for our redux store

State management and side effects

We are using redux for storing the data fetched from the server. For dispatching actions we're using simple action files .src/actions/.... However we're not opposed to using simple component state when working on one of our tasks.

Side effects

Side effects, in this case only api calls, are handled with redux promise middleware, for an example see .src/reducers/shiftsReducer.js.

Api calls

For api calls we're using axios library. .src/lib/requests/webapi.js contains 2 api calls that we are / will be using.

Your approach

Do not take our setup of the application as something you have to follow, feel free to restructure, refactor or change any of the approaches that we're using. We're always happy to see a different path that we can take and you know how to reason about it.

catapult-frontend's People

Contributors

nandotheessen avatar dependabot[bot] avatar

Watchers

James Cloos avatar  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.