The goal is to get an idea of your skills and approach. So please pick the parts of the assignment that you are comfortable to take on by yourself.
The app is built in two parts:
A json-server API and a React application (initialized with create-react-app
)
- the react app runs on port 3000
- the api runs on port 3001
- In your terminal run
yarn install
- Run
yarn start-api
to start the API - Open another terminal in the project folder and run:
yarn start
If you are unfamiliar with json-server take a look at the package for more information.
You can find the database file in ./db/db.json
. A copy has been added as db.original.json
.
The api has two endpoints; /devices
and /employees
.
An example GET request has been added to ./src/App.js
Some more examples are:
GET ${apiUrl}/employees?role=manager
GET ${apiUrl}/devices?brand=Oculus
GET ${apiUrl}/employees/1 // gets information of employee 1
POST ${apiUrl}/devices
/*
requires a body containing all fields except id
example body: {
"brand": "Brandname",
"product": "Product name",
...
}
*/
If you want to add more endpoints you can do so in db.json. Remember to restart the API after making changes.
We want you to have a clean slate to start with. A little bit of data has already been given on startup, but everything from here on out is up to you!
You can also of course remove & edit anything in App.js that is not to your liking.
You can take inspiration from warpvr.com for your designs.