|
| 1 | + |
| 2 | + |
| 3 | +# JavaScript Engineer Challenge |
| 4 | +**Welcome to our JavaScript Engineer Challenge** |
| 5 | + |
| 6 | +This Challenge consists of a series of tasks which |
| 7 | +may take between 4–6 hours to complete, depending |
| 8 | +on your experience level. The primary purpose of |
| 9 | +this test is to infer your “logical thinking” |
| 10 | +and “problem-solving” skills. |
| 11 | + |
| 12 | +## Summary |
| 13 | +- [Scenario](#scenario) |
| 14 | +- [Getting Started](#getting-started) |
| 15 | +- [Backend](#backend) |
| 16 | +- [Frontend](#frontend) |
| 17 | +- [Extras](#extras) |
| 18 | +- [Tips](#tips) |
| 19 | +- [Deadline](#deadline) |
| 20 | +- [Submissions](#submissions) |
| 21 | + |
| 22 | +## Scenario |
| 23 | +We want you to create an application for managing |
| 24 | +users. The application must meet the following |
| 25 | +requirements: |
| 26 | + |
| 27 | +1. Create new users; |
| 28 | +1. List users; |
| 29 | +1. Edit users; |
| 30 | +1. Delete users; |
| 31 | + |
| 32 | + |
| 33 | +## Getting Started |
| 34 | +Fork this repository (to jump-start your test) and |
| 35 | +run `npm install` on both the `/api` and `/front` |
| 36 | +directories, then follow the requirements for the |
| 37 | +[Backend](#backend) and [Frontend](#frontend) when |
| 38 | +developing your application. |
| 39 | + |
| 40 | +Feel free to use any library you are used to or |
| 41 | +to create things your way. Just keep in mind |
| 42 | +the required frameworks for the frontend and |
| 43 | +backend, confirm if the library you will use |
| 44 | +don't have any problems with it. |
| 45 | + |
| 46 | +## Backend |
| 47 | +To create the backend of this application we |
| 48 | +want you to use [Nest.js](https://nestjs.com/) |
| 49 | +as the framework. It's ok not knowing all the |
| 50 | +perks of the framework, but we want to see how |
| 51 | +you manage to work with it. |
| 52 | + |
| 53 | +Your backend must meet the following requirements: |
| 54 | + |
| 55 | +1. It has to use a relational database |
| 56 | + (PostgreSQL, MySQL, MariaDB, etc...); |
| 57 | +1. The user needs to have one relation, being the |
| 58 | + "user_type"; |
| 59 | +1. It needs to have unit tests; |
| 60 | +1. Your API needs to have a CRUD for the users; |
| 61 | +1. Your API needs to have validations for the fields: |
| 62 | + 1. Only boolean for `active` fields; |
| 63 | + 1. Only valid e-mails for `email` fields; |
| 64 | + 1. Max size of 255 for `string` fields; |
| 65 | + 1. Only `UUID` for `id` fields; |
| 66 | +1. Your API needs to follow the patterns of a |
| 67 | + REST implementation; |
| 68 | + |
| 69 | +### Data models |
| 70 | +`user_type` |
| 71 | + |
| 72 | +```json |
| 73 | +{ |
| 74 | + "id": "a8d7f-1j4...", // required |
| 75 | + "description": "test", // required |
| 76 | + "active": true, // required |
| 77 | + "updatedAt": "", // required |
| 78 | + "createdAt": "" // required |
| 79 | +} |
| 80 | +``` |
| 81 | + |
| 82 | +`user` |
| 83 | + |
| 84 | +```json |
| 85 | +{ |
| 86 | + "id": "a8d7f-1j4...", // required |
| 87 | + "nickname": "test", // required |
| 88 | + "name": "test", // required |
| 89 | + "phone": "99999999999", |
| 90 | + "email": "[email protected]", // required |
| 91 | + "user_type": 999, // required (relation) |
| 92 | + "active": true, // required |
| 93 | + "updatedAt": "", // required |
| 94 | + "createdAt": "" // required |
| 95 | +} |
| 96 | +``` |
| 97 | + |
| 98 | + |
| 99 | +## Frontend |
| 100 | +To create the frontend of this application we |
| 101 | +want you to use [Angular](https://angular.io/) |
| 102 | +with [Angular Material](https://material.angular.io/) |
| 103 | +as the framework. It's ok not knowing all the |
| 104 | +perks of the framework, but we want to see how |
| 105 | +you manage to work with it. |
| 106 | + |
| 107 | +Your frontend must meet the following requirements: |
| 108 | + |
| 109 | +1. It has to communicate with your backend; |
| 110 | +1. It has to have a home page with a side menu and |
| 111 | + a list of users; |
| 112 | +1. It has to have a route to create/edit a user; |
| 113 | + 1. When creating/editing the `submit` button |
| 114 | + needs to be disable until all required fields |
| 115 | + are validated; |
| 116 | +1. It has to have a route to detail the user; |
| 117 | +1. It has to have a route to delete the user; |
| 118 | + 1. When deleting a user, it should ask |
| 119 | + for confirmation. The button to confirm |
| 120 | + needs to be `disabled` until the nickname |
| 121 | + of the user being deleted is informed |
| 122 | + and validated (like the deletion of |
| 123 | + repositories in Github). |
| 124 | + |
| 125 | +It's up to you how you will define the frontend |
| 126 | +layout, if you will use new pages of modals for |
| 127 | +each interaction. |
| 128 | + |
| 129 | +## Extras |
| 130 | +There are some extras we would like to see in |
| 131 | +your repository. These aren't required, feel |
| 132 | +free to include them or not. |
| 133 | + |
| 134 | +- Use an authentication method (like `OAuth`); |
| 135 | +- Use something to register logs from your |
| 136 | + application (like `Winston` with `Redis`); |
| 137 | +- Generate a `Docker` image with `Docker Compose` |
| 138 | + and the required `migrations` and `seeders` |
| 139 | + (if you don't use `Docker` in your application, |
| 140 | + please make sure to include on the repository an |
| 141 | + `database dump`). |
| 142 | + |
| 143 | +## Tips |
| 144 | +- Keep it simple |
| 145 | +- Please ensure your readme file contains valid and simple instructions |
| 146 | +- Please use placeholder data only (i.e. do not use real or identifiable information) |
| 147 | +- Feel free to validate fields according to your own validation logic |
| 148 | +- Verify the full functionality of your application prior to submission |
| 149 | + |
| 150 | + |
| 151 | +## Deadline |
| 152 | +Please submit your test as a Github repository |
| 153 | +URL, along with a readme file containing |
| 154 | +instructions on how to set up and run your |
| 155 | +application. If you'd like to submit a |
| 156 | +_private repository_, please add |
| 157 | +[Raphael](https://github.com/raphaeljp) |
| 158 | +with view access to the private repository. |
| 159 | + |
| 160 | +The deadline for submission is |
| 161 | +**7 days after you receive this challenge**. |
| 162 | + |
| 163 | +_Submissions will not be accepted after this date._ |
| 164 | + |
| 165 | + |
| 166 | +## Submissions |
| 167 | +Submit the repository URL to the person who asked you to take this challenge. |
| 168 | + |
| 169 | +If you have any doubts, please submit them to [[email protected]]([email protected]). |
| 170 | + |
| 171 | + |
| 172 | +[Back to the top](#javaScript-engineer-challenge) |
0 commit comments