Giter Club home page Giter Club logo

ctsa's Introduction

Overview

start

Find the app running here.
This application scaffold used is CRA (Crate React APP).

This project makes of the following dev config:

  • Typescript
  • SCSS
  • Redux
  • Redux Persist
  • Redux-Thunk
  • ESLint
  • Prettier
  • Husky

Although this setup was not necessary for the requirement I felt obliged to add it to showcase tooling skills. Adding a custom config for formatting and linting lays the groundwork for consistency in the team.

I tried to type everything as far as I could. Adds robust type checking as a standard. Typescript has also become the de facto industry standard.

I must mention that the eslint config is a bit stricter than needs to be but this is something that can be debated.

I felt it necessary to establish patterns for data fetching and updating state. This also leads to more decoupling and enables ease of test. Also, notice that on the app page and user fact pages the data fetching methods differ. We could have gotten away with something like SWR completely negating the need for a thunk. It depends on the requirement after all. Could even have used Context API. In this case total overkill yet necessary.

A very basic storybook setup has been added to the repo to enable building living style guides as the project progresses.

Note on functionality.

Searching should default the user to the first page and change pagination according the amount of results.
I refrained from displaying a message for no results and defaulted to the full list as this is what happens for a live search. It would make more sense to display such a message when search is triggered by return or button click.

Getting started

start

After cloning the repo run:

  • yarn or npm i It is up to you whether you want to use npm or yarn (I prefer Yarn)
  • yarn dev to start development locally
  • yarn build to build the project
  • yarn start to start and run production build
  • yarn type-check to check for typing errors
  • yarn format to check for formatting errors
  • yarn lint to check for linting errors
  • yarn test-all run pre-commit and pre-push scripts
  • yarn build-storybook builds fresh storybook
  • yarn storybook run storybook

Future improvements and considerations.

  • Improve coverage. Although we have extensive coverage.
  • More refactor with more time. Extract all the hooks into custom hooks, so they can be tested.
  • Use a component Library. Don't recreate the wheel.
  • Use a proven search library for search and pagination. Algolia / ElasticSearch / Solr.
  • Use server side pagination. We don't want to process thousands of records on the frontend.
  • Use an approach like Atomic design for structuring components and styles.
  • Set global theme defaults.
  • Work on Accessibility.
  • Don't deploy on Fridays.
  • Help your team succeed at all costs.

Notes

There will be one error visible in the console, and it comes from tilt.js. A good opportunity to contribute to that repo. Tilt also shows some warnings when running tests (Clearly they have not paid tribute to the compiler gods). My design skills are average.

ctsa's People

Contributors

jahil-khalfe avatar

Watchers

 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.