The Student Grade Table: Written in React
The Student Grade Table is a dynamic web application for teachers who want to record the grades of their students.
- Create a new repository named
sgt-react
on your GitHub account, initialized with aREADME.md
. - Clone the repository into your
lfz/
directory. - Copy the starter files from this repository (except
features/
and the GIF) so your directory structure looks like this: EVERY FILE COUNTS.sgt-react/ ├── .gitignore ├── .npmrc ├── README.md ├── client/ │ ├── components/ │ │ └── app.jsx │ └── index.jsx ├── database/ │ └── db.json ├── package.json ├── server/ │ ├── index.js │ └── public/ │ ├── images/ │ │ └── favicon.png │ ├── index.html │ └── styles.css └── webpack.config.js
- Install all dependencies in
package.json
with NPM.npm install
- Commit the starter files to
master
andgit push origin master
before working on the first feature.
Each feature should be implemented on its own branch. Commit at each step of each feature. DO NOT WAIT TO COMMIT AT THE END. Make a small amount of progress, and then commit. You will probably have anywhere from 5-10 commits per feature.
Open a Pull Request from your feature branch to your master branch and submit it for approval before moving on.
Your feature to look and function like the example GIF with no errors in the browser console.
dev
- Start Webpack Dev Server on port3000
and JSON Server on port3001
. (Go tohttp://localhost:3000
)build
- Run Webpack to build the React client intoserver/public
. (Usually only run during deployment)
- User can view all grades.
- User can view the average grade.
- User can add a grade.
- User can delete a grade.
Responds with all recorded grades
.
[
{
"id": 1,
"name": "Scott Tolinski",
"grade": 100,
"course": "Web Development"
},
{
"id": 2,
"name": "Scott Bowler",
"grade": 100,
"course": "Web Development"
}
]
Accepts a single grade
object in the request body and inserts it into all grades
. Responds with the inserted grade
, including an auto-generated id
.
{
"name": "Tim Davis",
"grade": 40,
"course": "Web Development"
}
{
"id": 3,
"name": "Tim Davis",
"grade": 40,
"course": "Web Development"
}
Removes a grade
from all recorded grades
, given an id
in the request URL. e.g. /api/grades/3
{}