8000 GitHub - teamforage/take-home-test-wallet: This is a take home test for the frontend (web) engineer position at Forage
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

teamforage/take-home-test-wallet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Take Home Test: Wallet

Directions

  1. Build a small React application. This is your chance to show us the kind of code you'd write on the job. Please balance execution speed and code quality.
  2. We will evaluate your submission based on correctness, completeness, readability, and performance.
  3. Fork this repository into a private repository. We do not want your answers to be publicly available.
  4. When you are complete, notify your point of contact at Forage. The point of contact will share with you the interviewer's github handle. Please share access to your private repo.
  5. We will immediately schedule a live code review.

The Challenge

Iteration 0

Build a wallet and allow a user to add their cards to that wallet. The wire frames below explain the flow and components we'd like to see in your application. Feel free to get creative and modify the interactions. Also, feel free to implement whatever styling you like.

mockup

Extra credit: add your component library to a locally run Storybook.

Iteration 1

Hook up your "add a card" component to the server contained in this repository. (See instructions in a section below on how to run the server on your local machine). Save the card(s) to local state. Do not assume the server will store the cards the user adds to their wallet. Moreover, ensure your application can handle errors returned by the server. Invalid parameters in the HTTP request will yield an error response. For example, a card number that is less than 16 characters will produce an error. Make sure to display errors to the user.

Method: POST
Endpoint: /api/payment_methods
URL: http://localhost:8080
Request body (content/json): { "type": enum[ "ebt", "credit", "debit"], "number": string }. Example: { "type": "ebt", "number": "1234567890123456" }

Testing

Tests are required for this coding challenge.

The Server

We have included a server in the folder /server. It contains only one endpoint: to save a payment method (card). We have included this reference video where Victor runs through the setup commands below. Video: how to run the server & access API documentation

How to run the server

  1. Download docker. Move onto the next step after docker is available to your command line.
  2. Open up your terminal.
  3. Change your current directory to /server: cd <path to>/server
  4. Run the command: docker pull stoplight/prism to download the application Prism. It will run the mock server on your local computer.
  5. Run the command: docker run -v $PWD/oas.yml:/app/oas.yml -p 8080:8080 stoplight/prism mock -h 0.0.0.0 -p 8080 -d /app/oas.yml to run the server. The server is available to your react app at http://localhost:8080/.

Access API documentation

  1. Move onto the next step after docker is available to your command line.
  2. Open up your terminal.
  3. Change your current directory to /server: cd <path to>/server
  4. Run the command: docker pull swaggerapi/swagger-editor to download the application Swagger-Editor. It will run the API documentation.
  5. Run the command: docker run -p 8000:8080 -v $(pwd):/tmp -e SWAGGER_FILE=/tmp/oas.yml swaggerapi/swagger-editor to run the API documentation server. You can access the documentation at http://localhost:8000/

About

This is a take home test for the frontend (web) engineer position at Forage

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0