react-take-home

Installation Instructions

To run the client and server locally, follow these step to get up and running:

  • In the terminal, clone the repository using the command git clone https://github.com/whenmoon/react-take-home.git
  • Change directory to the cloned repository using by running cd react-take-home
  • Install the server and client dependencies: npm i && cd client && npm i
  • While in the client directory, you can run the tests with the command npm run test
  • To start the application, cd back to the root of the repository and run npm run dev. The client and server should start and you can interact with the frontend in the browser by navigating to http://localhost:3000/

Responsive Design

The app is suited to all screen sizes and devices. Tailwind utility classes are used to maintain responsiveness, affecting typography and layout.

Libraries

Notes On Technical Approach

  • There is basic unit test coverage of the "util" functions in the client application. I would like to increase the coverage to components, hooks and other business logic.
  • The API is abstracted to a client implementation to allow for reusable and extendable fetch methods. These have been easily integrated with a caching and synchronization layer.
  • Reusable UI components have been built are far as possible within the time constraints.
  • Client-side form validation is implemented to match product updates with data schemas and prevent unnecessary network requests.
  • The app uses ModalContext to avoid re-rendering the product list when the modal is opened and closed. The Product list is then programmatically re-fetched when necessary.
  • Ideally there would be less data parsing to populate the Select component options but I think achieving both this and persisting server-side data are a matter for the API.

Screen Recordings:

Responsive Product List:

Screen.Recording.2024-05-14.at.22.06.56.mov

Responsive Form:

Screen.Recording.2024-05-14.at.22.08.35.mov

Add Product And Client-side Form Validation:

Screen.Recording.2024-05-14.at.22.09.40.mov