# Badgewell Mobile Developer Task This task is to assess your skills using **React Native** and it’s core libraries along with other 3rd party libraries like **React Navigation**, **Formik** and **Redux**. ## Requirements A simple application that has three screens Sign up, Login and Contacts list. ## 1. Sign Up Page (View One): * Two text fields one for the username and one for the password, the username field must be at least 3 characters and the password field must be at least 6 characters * Submit button * Redirect link to the login page #### API URL: ``` [POST] https://task-interview-api-m64l5kfgkq-uc.a.run.app/api/auth/signup ``` #### Request Body: ```json { "username": "ahmed", "password": "123456" } ``` #### Response Status: | Status | Description | | ------ | --------------------------------------------------------------------------- | | 201 | The request has been successfully processed and the user has been created. | | 400 | There is invalid data in the data sent in the request body. | | 401 | The client is not authorized to send this type of request. | | 500 | There is an error on the server side. | #### Response Body: ```json { "token": "eyJhbGciOiJ....." } ``` ## 2. Login Page (View Two): * The same view of **Sign Up Page** but the link will redirect to the sign up page #### API URL: ``` [POST] https://task-interview-api-m64l5kfgkq-uc.a.run.app/api/auth/login ``` #### Request Body: ```json { "username": "ahmed", "password": "123456" } ``` #### Response Status: | Status | Description | | ------ | --------------------------------------------------------------------------- | | 200 | The request has been successfully processed. | | 400 | There is invalid data in the data sent in the request body. | | 401 | The client is not authorized to send this type of request. | | 500 | There is an error on the server side. | #### Response Body: ```json { "token": "eyJhbGciOiJ....." } ``` ## 3. Contact List Page (View Three): * Provide a simple list of contacts that you can load from the **REST API** below, display the name, phone and image in each list item and use `scrolling` to load the next page from the **REST API** (paginate contacts data) #### API URL: ``` [GET] https://task-interview-api-m64l5kfgkq-uc.a.run.app/api/contacts?page=1&limit=10 ``` #### Query params: | Query params | Description | Required | | ------- | ------------- | ------- | | limit | The number of contacts you want to load per page | `true`| | page | The page number | `true` | #### Response Status: | Status | Description | | ------ | --------------------------------------------------------------------------- | | 200 | The request has been successfully processed. | | 400 | There is invalid data in the data sent in the request body. | | 401 | The client is not authorized to send this type of request. | | 500 | There is an error on the server side. | #### Response Body: ```json { "docs": [ { "name": "Buster Rath", "image": "https://cdn.fakercloud.com/avatars/andreas_pr_128.jpg", "phone": "1-374-919-3264", "id": "60ea9e40dc5c5f347a364e1f" }, .... ], "totalDocs": 70, "limit": 10, "totalPages": 7, "page": 1, "pagingCounter": 1, "hasPrevPage": false, "hasNextPage": true, "prevPage": null, "nextPage": 2 } ``` ## Postman Collection https://documenter.getpostman.com/view/14514849/Tzm6nwaF ## Task Evaluation | Criteria | Weight | Required | | -------------------------------------- | --------- | -------- | | Use of React Native Core Libraries | 10 | `true` | | Use of Typescript | 10 | `true` | | Use of React Navigation | 10 | `true` | | Use of State Management like (Redux) or useReducer and context api | 10 | `true` | | Use of Hooks, Custom Hooks and Context API | 10 | `true` | | Validation | 8 | `true` | | Unit Testing | 10 (bonus) | `false` | | App Size & Performance | 6 (bonus) | `false` | | UI design | 3 (bonus) | `false` | | Use of expo | 3 (bonus) | `false` | ### Task Deadline **29 November 2021 5:00 PM** Feel free to ask any questions about the task using this email `ahmed.halawa@badgewell.com`