Skip to content

Commit 9df3b89

Browse files
committed
Init challenge repo
0 parents  commit 9df3b89

File tree

4 files changed

+197
-0
lines changed

4 files changed

+197
-0
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
npm-debug.log
2+
node_modules

README.md

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Adapt React Coding Challenge
2+
3+
Seems like you're trying out for a position at
4+
[Adapt](https://adapt.dk/en) or you've found this and would like to
5+
apply. Fork this repo and go at it ;)
6+
7+
Your goal is to set up a React application, where users will be able to
8+
edit book info (and create new books, if you have enough time to
9+
implement it). Once you are done with the challenge, please fire up a
10+
Pull Request and we will get in touch.
11+
12+
## Brief
13+
14+
I am a user of the app and I want to create a book object and edit
15+
previously provided info about it, so that my reading list can stay up
16+
to date. The form should be split into three steps:
17+
18+
1. Choose subject (one of the two).
19+
2. Depending on the selection in the first step, display a list of
20+
reading material. Choose one.
21+
3. When reading material chosen, display all the info that's available
22+
about the book in a form (meaning that the book info can be edited).
23+
24+
## Requirements
25+
26+
* All steps should be visible on the screen and changable at all times
27+
(when they are available -- step 1 when nothing is picked, step 1
28+
and 2 when step 1 is picked and step 1, 2 and 3 when step 2 is
29+
picked).
30+
31+
* You can use whatever libraries, task runners and build processes you
32+
like. React and plain JavaScript are the only requirements (ES6
33+
encouraged, but no TypeScript, CoffeeScript, etc). Redux is strongly
34+
encouraged if you see a need for it.
35+
36+
### Suggested order of completion
37+
38+
This depends on how much time you were given to accomplish the task.
39+
Ideally you would provide a solution for each of the outlined steps
40+
unless they are marked as optional.
41+
42+
1. Data fetching from the api.
43+
2. Form steps logic.
44+
3. (optional) Saving the data.
45+
4. (optional) Styling (minor for a 2-3 h challenge, more if there's more time).
46+
47+
## API Usage
48+
49+
API can be launched using `npm start`. You will need to run `npm
50+
install` once starting working on the project to install dependencies.
51+
52+
| Endpoint | Result |
53+
|------------------------------|-----------------------------------------------------|
54+
| /books?subjects_like=Fiction | Lists all books that contain "Fiction" as a subject |
55+
| /subjects | Lists all available subjects |
56+
57+
---
58+
59+
More info about API usage can be found at the [json-server
60+
repo](https://github.com/typicode/json-server).
61+

api.json

+120
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
{
2+
"subjects": ["Fiction", "Science"],
3+
"books": [
4+
{
5+
"id":1342,
6+
"authors":[
7+
{
8+
"birth_year":1775,
9+
"death_year":1817,
10+
"name":"Austen, Jane"
11+
}
12+
],
13+
"bookshelves":[
14+
"Best Books Ever Listings",
15+
"Harvard Classics"
16+
],
17+
"download_count":45668,
18+
"formats":{
19+
"text/plain; charset=utf-8":"http://www.gutenberg.org/files/1342/1342-0.txt",
20+
"application/pdf":"http://www.gutenberg.org/files/1342/1342-pdf.pdf",
21+
"application/rdf+xml":"http://www.gutenberg.org/ebooks/1342.rdf",
22+
"application/x-mobipocket-ebook":"http://www.gutenberg.org/ebooks/1342.kindle.noimages",
23+
"application/epub+zip":"http://www.gutenberg.org/ebooks/1342.epub.images",
24+
"text/plain; charset=us-ascii":"http://www.gutenberg.org/files/1342/1342.txt",
25+
"text/html; charset=utf-8":"http://www.gutenberg.org/files/1342/1342-h/1342-h.htm"
26+
},
27+
"languages":[
28+
"en"
29+
],
30+
"media_type":"Text",
31+
"subjects": ["Fiction"],
32+
"title":"Pride and Prejudice"
33+
},
34+
{
35+
"id":33283,
36+
"authors":[
37+
{
38+
"birth_year":1851,
39+
"death_year":1916,
40+
"name":"Thompson, Silvanus P. (Silvanus Phillips)"
41+
}
42+
],
43+
"bookshelves":[
44+
"Mathematics"
45+
],
46+
"download_count":24344,
47+
"formats":{
48+
"application/prs.tex":"http://www.gutenberg.org/files/33283/33283-t.zip",
49+
"application/rdf+xml":"http://www.gutenberg.org/ebooks/33283.rdf",
50+
"application/pdf":"http://www.gutenberg.org/files/33283/33283-pdf.pdf"
51+
},
52+
"languages":[
53+
"en"
54+
],
55+
"media_type":"Text",
56+
"subjects": ["Fiction"],
57+
"title":"Calculus Made Easy: Being a very-simplest introduction to those beautiful methods which are generally called by the terrifying names of the Differential Calculus and the Integral Calculus"
58+
},
59+
{
60+
"id":11,
61+
"authors":[
62+
{
63+
"birth_year":1832,
64+
"death_year":1898,
65+
"name":"Carroll, Lewis"
66+
}
67+
],
68+
"bookshelves":[
69+
"Children's Literature"
70+
],
71+
"download_count":17866,
72+
"formats":{
73+
"text/plain; charset=utf-8":"http://www.gutenberg.org/files/11/11-0.zip",
74+
"application/rdf+xml":"http://www.gutenberg.org/ebooks/11.rdf",
75+
"application/pdf":"http://www.gutenberg.org/files/11/11-pdf.pdf",
76+
"application/x-mobipocket-ebook":"http://www.gutenberg.org/ebooks/11.kindle.noimages",
77+
"application/epub+zip":"http://www.gutenberg.org/ebooks/11.epub.images",
78+
"text/plain; charset=us-ascii":"http://www.gutenberg.org/files/11/11.zip",
79+
"application/zip":"http://www.gutenberg.org/files/11/11-h.zip",
80+
"text/html; charset=utf-8":"http://www.gutenberg.org/files/11/11-h/11-h.htm"
81+
},
82+
"languages":[
83+
"en"
84+
],
85+
"media_type":"Text",
86+
"subjects": ["Fiction", "Science"],
87+
"title":"Alice's Adventures in Wonderland"
88+
},
89+
{
90+
"id":74,
91+
"authors":[
92+
{
93+
"birth_year":1835,
94+
"death_year":1910,
95+
"name":"Twain, Mark"
96+
}
97+
],
98+
"bookshelves":[
99+
"Banned Books from Anne Haight's list"
100+
],
101+
"download_count":16204,
102+
"formats":{
103+
"image/jpeg":"http://www.gutenberg.org/cache/epub/74/pg74.cover.medium.jpg",
104+
"text/plain; charset=utf-8":"http://www.gutenberg.org/files/74/74-0.zip",
105+
"application/rdf+xml":"http://www.gutenberg.org/ebooks/74.rdf",
106+
"application/x-mobipocket-ebook":"http://www.gutenberg.org/ebooks/74.kindle.images",
107+
"application/epub+zip":"http://www.gutenberg.org/ebooks/74.epub.noimages",
108+
"text/html; charset=utf-8":"http://www.gutenberg.org/files/74/74-h/74-h.htm",
109+
"text/plain; charset=iso-8859-1":"http://www.gutenberg.org/files/74/74.txt",
110+
"application/zip":"http://www.gutenberg.org/files/74/74.zip"
111+
},
112+
"languages":[
113+
"en"
114+
],
115+
"media_type":"Text",
116+
"subjects": ["Science"],
117+
"title":"The Adventures of Tom Sawyer"
118+
}
119+
]
120+
}

package.json

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"name": "react-coding-challenge",
3+
"version": "1.0.0",
4+
"description": "A package containing a simple dummy book API, which should be used in the challenge",
5+
"scripts": {
6+
"start": "json-server --port 3010 --watch api.json"
7+
},
8+
"keywords": ["react challenge", "tryouts", "react developer", "hiring"],
9+
"author": "Adapt A/S",
10+
"license": "ISC",
11+
"devDependencies": {
12+
"json-server": "0.10.1"
13+
}
14+
}

0 commit comments

Comments
 (0)