Skip to content

Teamleader order processing app using React, GraphQL and Apollo Client.

Notifications You must be signed in to change notification settings

mullinb/TeamleaderCodingTest

Repository files navigation

Coding Test: Order Management Application

App for Teamleader, using React with Apollo Client and GraphQL.js served by Node.js/Express.js. Test database uses JSON Server.

This app allows the user to manage existing orders in a database. The user has the ability to add and remove items for each order, and adjust the quantity of items that have already been added. In the end, an order can be "placed." When the user clicks this button, the order is removed from the "orders" collection (and thus from the order list), and moved to a new collection titled "dispatch". The successfully placed order is logged to the console on both the browser client and on the server.

All components responsively update with refreshed information after each user action on the database, exactly as we would want. Invalid inputs have not been extensively tested.

Database operations target API endpoints which are declared in the APIEndpoints.js file in the root directory. To test the program with a real REST API, update this file with the desired endpoints.

To do:

  • Test for bugs/error-handling.

To try this app:

  1. Have node.js installed.
  2. Clone this repository.
  3. Open two terminal windows, navigating each to the local repository directory.
  4. Install dependencies with npm install.
  5. Globally install JSON server (npm install -g json-server).
  6. Run npm run dev in one window and npm run db in another.
  7. Navigate to http://localhost:4000. The database will automatically be served from http://localhost:3000
  8. If desired, update the API endpoints in the APIEndpoints.js file.

Technologies:

  • React.js
  • Express.js
  • GraphQL.js
  • Apollo Client
  • Axios
  • Materialize CSS
  • lodash
This project was bootstrapped with Create React App.

Releases

No releases published

Packages

No packages published