Skip to content

Commit 0ebf3fd

Browse files
author
Anna Aitchison
committed
Add markdown for node-challenge-london-mini-guide
1 parent 6deca69 commit 0ebf3fd

2 files changed

Lines changed: 111 additions & 0 deletions

File tree

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Client
2+
3+
- You need to implement your client (or front-end) logic using `react.js`.
4+
5+
## Client Level 100
6+
7+
In this level you should
8+
9+
- Display a title in the center on the website
10+
- Display the available cities in a dropdown menu
11+
- Display the category buttons
12+
- Display table with fake data
13+
- No need to do a fetch at this time
14+
- Just make sure it works with the JSON from the Server.
15+
16+
## Client Level 200
17+
18+
In this level you should
19+
20+
- Make sure that selecting a city will update the state
21+
- Make sure that clicking on a specific category will activate it
22+
- The style of the button should also change to distingush it from other buttons
23+
- Show an error if user tries to choose a category before chosing a city
24+
25+
![show an error if user tries to choose a category before chosing a city](https://i.imgur.com/vVPsMUe.png)
26+
27+
## Client Level 300
28+
29+
In this level you should
30+
31+
- Make fetch request to your server for a specific city.
32+
- Choosing any category will display the data specified to that city in the table.
33+
- Add loading spinner while you're fetching the data your server.
34+
35+
## Client Level 500
36+
37+
In this level you should
38+
39+
- Make city selection dynamic.
40+
- Selecting a city then selecting a category should displays the data of the selected city in the table.
41+
42+
## Client Level 999
43+
44+
You have the full control over this level!
45+
46+
Some suggestions
47+
48+
- Add a section contains some data about each city.
49+
- Add a form for adding more entries to the data.
50+
- redesign the way you represent information.
51+
- add search and sort functionality.
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Server
2+
3+
You should implement your server logic using `node` and `express`
4+
5+
## Server Level 100
6+
7+
Make a new express server and deploy it to `repl.it`.
8+
9+
On the route `/` respond with the routes you are planing to implement, example:
10+
11+
```js
12+
{
13+
"/pharmacies": "returns an array of pharmacies in a specific area"
14+
...
15+
}
16+
```
17+
18+
## Server Level 200
19+
20+
Make your server work for only one city, example: `Stratford`
21+
22+
In this level you should have 4 routes:
23+
24+
| route | result |
25+
| :---------: | :-----------------------------------: |
26+
| /pharmacies | returns pharmacies list for stratford |
27+
| /colleges | returns colleges list for stratford |
28+
| /doctors | returns doctors list for stratford |
29+
| /hospitals | returns hospitals list for stratford |
30+
31+
## Server Level 300
32+
33+
Now make your city dynamic. You should be able to return data based on any city that is passed to the server.
34+
35+
Routes will change:
36+
37+
| route | result |
38+
| :---------------: | :-------------------------------: |
39+
| /:city/pharmacies | returns pharmacies list for :city |
40+
| /:city/colleges | returns colleges list for :city |
41+
| /:city/doctors | returns doctors list for :city |
42+
| /:city /hospitals | returns hospitals list for :city |
43+
44+
## Server Level 500
45+
46+
Make all of that in one single route as:
47+
48+
| route | result |
49+
| :--------------: | :------------------------------: |
50+
| /:city/:category | returns :category list for :city |
51+
52+
## Server Level 999
53+
54+
You have the full control over this level
55+
56+
Some suggestions:
57+
58+
- Add new cities.
59+
- Add routes to add entries to our data.
60+
- Make sure that you are saving the entered values to the `json` file.

0 commit comments

Comments
 (0)