-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 95edfa9
Showing
43 changed files
with
21,696 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,172 @@ | ||
 | ||
|
||
# JavaScript Engineer Challenge | ||
**Welcome to our JavaScript Engineer Challenge** | ||
|
||
This Challenge consists of a series of tasks which | ||
may take between 4–6 hours to complete, depending | ||
on your experience level. The primary purpose of | ||
this test is to infer your “logical thinking” | ||
and “problem-solving” skills. | ||
|
||
## Summary | ||
- [Scenario](#scenario) | ||
- [Getting Started](#getting-started) | ||
- [Backend](#backend) | ||
- [Frontend](#frontend) | ||
- [Extras](#extras) | ||
- [Tips](#tips) | ||
- [Deadline](#deadline) | ||
- [Submissions](#submissions) | ||
|
||
## Scenario | ||
We want you to create an application for managing | ||
users. The application must meet the following | ||
requirements: | ||
|
||
1. Create new users; | ||
1. List users; | ||
1. Edit users; | ||
1. Delete users; | ||
|
||
|
||
## Getting Started | ||
Fork this repository (to jump-start your test) and | ||
run `npm install` on both the `/api` and `/front` | ||
directories, then follow the requirements for the | ||
[Backend](#backend) and [Frontend](#frontend) when | ||
developing your application. | ||
|
||
Feel free to use any library you are used to or | ||
to create things your way. Just keep in mind | ||
the required frameworks for the frontend and | ||
backend, confirm if the library you will use | ||
don't have any problems with it. | ||
|
||
## Backend | ||
To create the backend of this application we | ||
want you to use [Nest.js](https://nestjs.com/) | ||
as the framework. It's ok not knowing all the | ||
perks of the framework, but we want to see how | ||
you manage to work with it. | ||
|
||
Your backend must meet the following requirements: | ||
|
||
1. It has to use a relational database | ||
(PostgreSQL, MySQL, MariaDB, etc...); | ||
1. The user needs to have one relation, being the | ||
"user_type"; | ||
1. It needs to have unit tests; | ||
1. Your API needs to have a CRUD for the users; | ||
1. Your API needs to have validations for the fields: | ||
1. Only boolean for `active` fields; | ||
1. Only valid e-mails for `email` fields; | ||
1. Max size of 255 for `string` fields; | ||
1. Only `UUID` for `id` fields; | ||
1. Your API needs to follow the patterns of a | ||
REST implementation; | ||
|
||
### Data models | ||
`user_type` | ||
|
||
```json | ||
{ | ||
"id": "a8d7f-1j4...", // required | ||
"description": "test", // required | ||
"active": true, // required | ||
"updatedAt": "", // required | ||
"createdAt": "" // required | ||
} | ||
``` | ||
|
||
`user` | ||
|
||
```json | ||
{ | ||
"id": "a8d7f-1j4...", // required | ||
"nickname": "test", // required | ||
"name": "test", // required | ||
"phone": "99999999999", | ||
"email": "[email protected]", // required | ||
"user_type": 999, // required (relation) | ||
"active": true, // required | ||
"updatedAt": "", // required | ||
"createdAt": "" // required | ||
} | ||
``` | ||
|
||
|
||
## Frontend | ||
To create the frontend of this application we | ||
want you to use [Angular](https://angular.io/) | ||
with [Angular Material](https://material.angular.io/) | ||
as the framework. It's ok not knowing all the | ||
perks of the framework, but we want to see how | ||
you manage to work with it. | ||
|
||
Your frontend must meet the following requirements: | ||
|
||
1. It has to communicate with your backend; | ||
1. It has to have a home page with a side menu and | ||
a list of users; | ||
1. It has to have a route to create/edit a user; | ||
1. When creating/editing the `submit` button | ||
needs to be disable until all required fields | ||
are validated; | ||
1. It has to have a route to detail the user; | ||
1. It has to have a route to delete the user; | ||
1. When deleting a user, it should ask | ||
for confirmation. The button to confirm | ||
needs to be `disabled` until the nickname | ||
of the user being deleted is informed | ||
and validated (like the deletion of | ||
repositories in Github). | ||
|
||
It's up to you how you will define the frontend | ||
layout, if you will use new pages of modals for | ||
each interaction. | ||
|
||
## Extras | ||
There are some extras we would like to see in | ||
your repository. These aren't required, feel | ||
free to include them or not. | ||
|
||
- Use an authentication method (like `OAuth`); | ||
- Use something to register logs from your | ||
application (like `Winston` with `Redis`); | ||
- Generate a `Docker` image with `Docker Compose` | ||
and the required `migrations` and `seeders` | ||
(if you don't use `Docker` in your application, | ||
please make sure to include on the repository an | ||
`database dump`). | ||
|
||
## Tips | ||
- Keep it simple | ||
- Please ensure your readme file contains valid and simple instructions | ||
- Please use placeholder data only (i.e. do not use real or identifiable information) | ||
- Feel free to validate fields according to your own validation logic | ||
- Verify the full functionality of your application prior to submission | ||
|
||
|
||
## Deadline | ||
Please submit your test as a Github repository | ||
URL, along with a readme file containing | ||
instructions on how to set up and run your | ||
application. If you'd like to submit a | ||
_private repository_, please add | ||
[Raphael](https://github.com/raphaeljp) | ||
with view access to the private repository. | ||
|
||
The deadline for submission is | ||
**7 days after you receive this challenge**. | ||
|
||
_Submissions will not be accepted after this date._ | ||
|
||
|
||
## Submissions | ||
Submit the repository URL to the person who asked you to take this challenge. | ||
|
||
If you have any doubts, please submit them to [[email protected]]([email protected]). | ||
|
||
|
||
[Back to the top](#javaScript-engineer-challenge) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
module.exports = { | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
project: 'tsconfig.json', | ||
sourceType: 'module', | ||
}, | ||
plugins: ['@typescript-eslint/eslint-plugin'], | ||
extends: [ | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:prettier/recommended', | ||
], | ||
root: true, | ||
env: { | ||
node: true, | ||
jest: true, | ||
}, | ||
ignorePatterns: ['.eslintrc.js'], | ||
rules: { | ||
'@typescript-eslint/interface-name-prefix': 'off', | ||
'@typescript-eslint/explicit-function-return-type': 'off', | ||
'@typescript-eslint/explicit-module-boundary-types': 'off', | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# compiled output | ||
/dist | ||
/node_modules | ||
|
||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
lerna-debug.log* | ||
|
||
# OS | ||
.DS_Store | ||
|
||
# Tests | ||
/coverage | ||
/.nyc_output | ||
|
||
# IDEs and editors | ||
/.idea | ||
.project | ||
.classpath | ||
.c9/ | ||
*.launch | ||
.settings/ | ||
*.sublime-workspace | ||
|
||
# IDE - VSCode | ||
.vscode/* | ||
!.vscode/settings.json | ||
!.vscode/tasks.json | ||
!.vscode/launch.json | ||
!.vscode/extensions.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"singleQuote": true, | ||
"trailingComma": "all" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
<p align="center"> | ||
<a href="http://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo_text.svg" width="320" alt="Nest Logo" /></a> | ||
</p> | ||
|
||
[circleci-image]: https://img.shields.io/circleci/build/github/nestjs/nest/master?token=abc123def456 | ||
[circleci-url]: https://circleci.com/gh/nestjs/nest | ||
|
||
<p align="center">A progressive <a href="http://nodejs.org" target="_blank">Node.js</a> framework for building efficient and scalable server-side applications.</p> | ||
<p align="center"> | ||
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/v/@nestjs/core.svg" alt="NPM Version" /></a> | ||
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/l/@nestjs/core.svg" alt="Package License" /></a> | ||
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/dm/@nestjs/common.svg" alt="NPM Downloads" /></a> | ||
<a href="https://circleci.com/gh/nestjs/nest" target="_blank"><img src="https://img.shields.io/circleci/build/github/nestjs/nest/master" alt="CircleCI" /></a> | ||
<a href="https://coveralls.io/github/nestjs/nest?branch=master" target="_blank"><img src="https://coveralls.io/repos/github/nestjs/nest/badge.svg?branch=master#9" alt="Coverage" /></a> | ||
<a href="https://discord.gg/G7Qnnhy" target="_blank"><img src="https://img.shields.io/badge/discord-online-brightgreen.svg" alt="Discord"/></a> | ||
<a href="https://opencollective.com/nest#backer" target="_blank"><img src="https://opencollective.com/nest/backers/badge.svg" alt="Backers on Open Collective" /></a> | ||
<a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://opencollective.com/nest/sponsors/badge.svg" alt="Sponsors on Open Collective" /></a> | ||
<a href="https://paypal.me/kamilmysliwiec" target="_blank"><img src="https://img.shields.io/badge/Donate-PayPal-ff3f59.svg"/></a> | ||
<a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://img.shields.io/badge/Support%20us-Open%20Collective-41B883.svg" alt="Support us"></a> | ||
<a href="https://twitter.com/nestframework" target="_blank"><img src="https://img.shields.io/twitter/follow/nestframework.svg?style=social&label=Follow"></a> | ||
</p> | ||
<!--[](https://opencollective.com/nest#backer) | ||
[](https://opencollective.com/nest#sponsor)--> | ||
|
||
## Description | ||
|
||
[Nest](https://github.com/nestjs/nest) framework TypeScript starter repository. | ||
|
||
## Installation | ||
|
||
```bash | ||
$ npm install | ||
``` | ||
|
||
## Running the app | ||
|
||
```bash | ||
# development | ||
$ npm run start | ||
|
||
# watch mode | ||
$ npm run start:dev | ||
|
||
# production mode | ||
$ npm run start:prod | ||
``` | ||
|
||
## Test | ||
|
||
```bash | ||
# unit tests | ||
$ npm run test | ||
|
||
# e2e tests | ||
$ npm run test:e2e | ||
|
||
# test coverage | ||
$ npm run test:cov | ||
``` | ||
|
||
## Support | ||
|
||
Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support). | ||
|
||
## Stay in touch | ||
|
||
- Author - [Kamil Myśliwiec](https://kamilmysliwiec.com) | ||
- Website - [https://nestjs.com](https://nestjs.com/) | ||
- Twitter - [@nestframework](https://twitter.com/nestframework) | ||
|
||
## License | ||
|
||
Nest is [MIT licensed](LICENSE). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"collection": "@nestjs/schematics", | ||
"sourceRoot": "src" | ||
} |
Oops, something went wrong.