Over the last six weeks, you have learned many concepts about front-end development. To demonstrate how far you have come, I want you to build an Employee Directory. For Explorer Mode, this will be a site with three pages; view all employees, add an employee, and view an employee. Adventure Mode adds the features to delete and updating an employee.
Objectives
Use react-router-dom to build a multiple page SPA
Create an API driven UI
Practice the skills you have learned in the past six weeks.
practice wireframing a new app
Requirements
Create a new delta stack project
This this api to manage a company's list of employees. Check out Additional Resources for how to use the API.
Create a relatively unique name for your company. You will use this as your company key when calling the endpoints of the API
Explorer Mode
[x] Create a react app with three pages and navigation between the pages.s
[x] View All Employees page
[x] This page should list all the employees for your company
The use the API you will need to name your company for which you are making an employee directory. Your company name will serve as a unique key for your company. My fake company is called honeydukes. That means that I want to make an API call to get all of my employees, I will do a fetch to the URL.
A GET request to the above URL will get the employee with the id of 3, and that works for honeydukes.
To create an employee for a company, you will have to use the POST endpoint. If I wanted to add an employee for honeydukes, I will send a POST request this endpoint
Who works here?
Over the last six weeks, you have learned many concepts about front-end development. To demonstrate how far you have come, I want you to build an Employee Directory. For
Explorer Mode
, this will be a site with three pages; view all employees, add an employee, and view an employee.Adventure Mode
adds the features to delete and updating an employee.Objectives
Requirements
delta
stack projectAdditional Resources
for how to use the API.Explorer Mode
[x] Create a react app with three pages and navigation between the pages.s
[x] View All Employees page
[x] This page should list all the employees for your company
[x] Each employee should display the employee's full name, job title, full-time status, and profile image. All employees that are returned by the
Get all employees endpoint
, https://sdg-staff-directory-app.herokuapp.com/api/\${companyName}/employees.[x] Each employee item should link to the
employee page
for that employee. The URL should look like:/employee/${employeeId}
[x] An Employee Page
[x] This should display all the details for an employee, The details page should list the following:
[x] The API endpoint to use will look like this:[https://sdg-staff-directory-app.herokuapp.com/api/${companyName}/employees/${employeeId}].l
[x] Add a Employee Page
[x] This should allow the user to add all of the fields for an employee.
[x] The UI should let the user know that the person was added to the API successfully
[x] Your app should be styled and responsive. Have fun with it.
[x] Deploy your app
Adventure Mode
delete
a userupdate
a userEpic Mode
Additional Resources
TIPS:
How to use the API
API Documentations: https://sdg-staff-directory-app.herokuapp.com/index.html
honeydukes
. That means that I want to make an API call to get all of my employees, I will do a fetch to the URL.That will return me a list of employees that are apart of the company.
If I want to get a different company's (Boogle) employees. I would do
For your project you will be using the same company for every request
honeydukes
, I would use the endpointhttps://sdg-staff-directory-app.herokuapp.com/api/honeydukes/employees/3
A GET request to the above URL will get the employee with the id of
3
, and that works forhoneydukes
.honeydukes
, I will send a POST request this endpointwith my data in this JSON format:
Preview.