We want you to create a very basic ecommerce project in React by creating the homepage of a web shop.
We are interested in the way you:
- setup database
- connect to this external resource from Next.js
- manage state
- work with asynchronous data
- setup a project structure and create components
The purpose of this case is NOT creating a full blown app. Do not put more than 16 hours of your time in working on this assignment. The most important part for us is that you can explain the choices you have made.
Also, it's absolutely not necessary to make the application good looking. Just a basic setup with some basic styling is enough.
- create a list of max. 10 products
- in the right upper corner create a shopping cart that shows
- the number of selected products
- the total amount of selected products
- product data should look something like this https://fakestoreapi.com/products
- (please keep it simple when recreating this API: just a few products (4 or 5), showing just a title, an image, the price),
- every product should should a title, price and image
- every product should have a "add to cart" button
- when the user adds a product to his cart, the number and totals of the shopping cart should be updated immediately
- add an "empty cart" button
- Setup the project with Next.js (https://nextjs.org/docs/api-reference/create-next-app)
- Use TypeScript
- Make small commits with clear commit messages so we can follow you working process
- Nice to have: Write 1 or 2 tests. Running
yarn test
should not fail.
- Push your solution to our own Github account
- Once you're done, please send a message that we can have a look at your code