Challenge React PDF
Challenge React PDF
We would like you to create a single page web application using React or ReactNative.
The main goal is to reproduce the given designs for the “well known” TODO app. Outcome if this task
should be a private repository with the solution in place on the main branch.
https://www.figma.com/file/pcmMqOtF462x2IlxVUDBaV/PCNT---To-do-list
Requirements
Functional requirements
Create user
● Should create an user using the api provided
● Subsequents page reloads should use the same user and reload all previous
TODOs
The item will be created as uncompleted, and included in the existing list.
● The user should be able delete an existing item from inside the list.
● After deletion, the item won’t be present in the existing list.
● The user should be able to update the completion state of an existing item in the list.
Filter by completion
● The user should be able to filter the existing list by items completion
● Available options are: ALL, COMPLETED, UNCOMPLETED
● When a filter is applied, only matching items will be displayed in the list.
● The user should be able to create a new list in replace of the existing one.
● when a new list is created, the existing one will be dropped, with all it’s items included.
Codebase
● App should run in localhost
● Ensure quality by adding unit tests.
Use a state management library (besides the fact it is not really required).
Suggestions
GET /v1/userId
returns -> string
POST /v1/todo/:userId
body -> {title: string, message: string}
returns -> {
"title": string,
"completed": boolean,
"message": string,
"todoId": string
}
PUT /v1/todo/:userId
body -> {completed: boolean}
returns -> {
"title": string,
"completed": boolean,
"message": string,
"todoId": string
}
DELETE /v1/todo/:userId
body -> {todoId: string}
returns -> {ok: "true"}
DELETE /v1/todo/:userId/reset
returns -> {ok: "true"}
GET /v1/todo/:userId
returns -> [{
"title": string,
"completed": boolean,
"message": string,
"todoId": string
}]
GET /v1/todo/:userId/:completed
returns -> [{
"title": string,
"completed": boolean,
"message": string,
"todoId": string
}]