-
Notifications
You must be signed in to change notification settings - Fork 9
Added new React frontend challenge #39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
6f79398
ad8f0ea
ada4802
d468524
d22b474
9933037
27513b9
23d1118
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,91 @@ | ||
| # React Challenge 2 🤯 | ||
|
|
||
| Welcome to the React coding challenge 2! In this challenge, your task is to build a frontend for a project management application using React. | ||
| We have already built a robust backend for your application service. | ||
| This challenge will test your understanding and application of React components, props, states, hooks and more. | ||
|
|
||
| ## Requirements | ||
|
|
||
| The application should be able to handle various projects and respective tasks. | ||
|
|
||
| Backend data model: | ||
| - Project properties: project_id, email_address, name, description, created_at | ||
| - Task properties: task_id, project_id, name, description, created_at, status (enum - OPEN / IN_PROGRESS / DONE) | ||
|
|
||
| Project_id of project, task_id, created_at and email_address are automatically set upon creation and are not mutable. | ||
|
|
||
| ### The following functionalities should be provided: | ||
| 1. Create a new project with a name and a description | ||
| 2. Edit name and description of a project | ||
| 3. Delete a project | ||
| 4. Display all projects | ||
| 5. Create a new task for an existing project with a project_id, name, description and status. The status is set to OPEN by default. | ||
| 6. Edit name and description of a task | ||
| 7. Change the status of a task | ||
| 8. Delete a task | ||
| 9. Display all tasks for a specific project | ||
|
|
||
| The backend provides all necessary methods. You can take a look at them in the included [.yaml file](ReactChallenge2Insomnia.yaml). Best to be opened in Insomnia (https://insomnia.rest/download). | ||
|
|
||
|
|
||
| Additional details: | ||
|
|
||
| - Ensure the implementation is user-friendly with a clean, intuitive user-interface. | ||
| - The application should be responsive in design and should work on different screen sizes. | ||
| - Thoughtful error handling and loading states for better UX. | ||
| - Include comments to explain your implementation approach. | ||
|
|
||
| ## What has already been implemented for you ✅ | ||
|
|
||
| The backend uses Hasura to create an API, Postgres as a database, | ||
| GraphQL for the requests and Cloudflare workers to generate JWTs (https://jwt.io/introduction) needed for authorization. | ||
|
|
||
|  | ||
|
|
||
|
|
||
| Each project is exclusively mapped to a single user through their email-address. By that, the respective tasks are restricted to the creator of the project as well. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add comment that therefore, users cannot access tasks of other users. |
||
| Users can only create, access, edit and delete their own projects and taks and do not have access to the projects and tasks of other users. | ||
| This is guaranteed by the Hasura JWT Authentication service (https://hasura.io/docs/latest/auth/authentication/jwt/). | ||
|
|
||
|
|
||
| The flow is as follows: | ||
|
|
||
| First, a HTTP post request must be sent to this url: *** . | ||
| The body of the request must be in JSON and include a parameter called “email” with the value of the user’s email address. | ||
|
|
||
| ```json | ||
| { | ||
| "email": "test@selectcode.de" | ||
| } | ||
| ``` | ||
| With this request a JWT for the authentification of the user is generated and sent back in the body of the response. | ||
| This token has to be included in the request header of each GraphQL query/mutation. Else, access will be denied. 😈 | ||
|
|
||
| The requests have to be sent to this URL: https://react-challenge.deploy.selectcode.dev/v1/graphql. | ||
| One of the header titles of each request must be set to "Authorization" and the value to "Bearer < JWT > ". | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please include the example for test@selectcode.de. |
||
|
|
||
| ``` | ||
| Authorization Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJodHRwczovL2hhc3VyYS5pby9qd3QvY2xhaW1zIjp7IngtaGFzdXJhLWRlZmF1bHQtcm9sZSI6InVzZXIiLCJ4LWhhc3VyYS1hbGxvd2VkLXJvbGVzIjpbInVzZXIiLCJhZG1pbiJdLCJ4LWhhc3VyYS11c2VyLWVtYWlsLWFkZHJlc3MiOiJ0ZXN0QHNlbGVjdGNvZGUuZGUifSwiaWF0IjoxNjk1MTMyMjg4fQ.ytE-IrCfyKJOBVB5x-yWw8bTDHgmaGQ3RBtmeeXwXvw | ||
| ``` | ||
|
|
||
|
|
||
|
|
||
| ## Definition of done 🎉 | ||
|
|
||
| For completing this challenge, please ensure that you meet the following requirements: | ||
| - Your React application fulfills all described functional requirements. | ||
| - A README.md file explains how to install any necessary dependencies and how to run your application. | ||
| Please also include a short description and explanation of the main aspects of your chosen approaches. | ||
|
|
||
| As soon as you have finished both other challenges, please submit your solution in our online form. | ||
|
|
||
| ## Evaluation criteria 🔎 | ||
|
|
||
| We will evaluate your work based on the following: | ||
| - Functional fit: How well the functional requirements are fulfilled. | ||
| - Design: We’re looking for a user-friendly and intuitive design. Moreover, your page should adapt to different screen sizes. | ||
| - Code quality: We're looking for clean, readable, and well-structured code. | ||
| - Documentation quality: We're looking for a well-structured README.md file that contains all necessary information as well as well-documented code. | ||
| - Problem solving: Remember, we're not just interested in the final product - we want to see how you got there. Commit early and often, with clear and informative commit messages. | ||
|
|
||
| Good luck with your coding — and remember to enjoy the process! 🚀 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| # http://editorconfig.org | ||
| root = true | ||
|
|
||
| [*] | ||
| indent_style = tab | ||
| tab_width = 2 | ||
| end_of_line = lf | ||
| charset = utf-8 | ||
| trim_trailing_whitespace = true | ||
| insert_final_newline = true | ||
|
|
||
| [*.yml] | ||
| indent_style = space |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| { | ||
| "printWidth": 140, | ||
| "singleQuote": true, | ||
| "semi": true, | ||
| "useTabs": true | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add an architecture diagram to visualize this.