Skip to content

Commit 95edfa9

Browse files
Initial Commit
0 parents  commit 95edfa9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+21696
-0
lines changed

Diff for: README.md

+172
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,172 @@
1+
![Maxxidata](https://camo.githubusercontent.com/5e9ffa46a7213e9e65e733ed2f7b1bb4554490c486846386515c885ae949fefd/68747470733a2f2f692e706f7374696d672e63632f715258545a5a307a2f6c6f676f2d332e706e67)
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)

Diff for: api/.eslintrc.js

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
module.exports = {
2+
parser: '@typescript-eslint/parser',
3+
parserOptions: {
4+
project: 'tsconfig.json',
5+
sourceType: 'module',
6+
},
7+
plugins: ['@typescript-eslint/eslint-plugin'],
8+
extends: [
9+
'plugin:@typescript-eslint/recommended',
10+
'plugin:prettier/recommended',
11+
],
12+
root: true,
13+
env: {
14+
node: true,
15+
jest: true,
16+
},
17+
ignorePatterns: ['.eslintrc.js'],
18+
rules: {
19+
'@typescript-eslint/interface-name-prefix': 'off',
20+
'@typescript-eslint/explicit-function-return-type': 'off',
21+
'@typescript-eslint/explicit-module-boundary-types': 'off',
22+
'@typescript-eslint/no-explicit-any': 'off',
23+
},
24+
};

Diff for: api/.gitignore

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# compiled output
2+
/dist
3+
/node_modules
4+
5+
# Logs
6+
logs
7+
*.log
8+
npm-debug.log*
9+
yarn-debug.log*
10+
yarn-error.log*
11+
lerna-debug.log*
12+
13+
# OS
14+
.DS_Store
15+
16+
# Tests
17+
/coverage
18+
/.nyc_output
19+
20+
# IDEs and editors
21+
/.idea
22+
.project
23+
.classpath
24+
.c9/
25+
*.launch
26+
.settings/
27+
*.sublime-workspace
28+
29+
# IDE - VSCode
30+
.vscode/*
31+
!.vscode/settings.json
32+
!.vscode/tasks.json
33+
!.vscode/launch.json
34+
!.vscode/extensions.json

Diff for: api/.prettierrc

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"singleQuote": true,
3+
"trailingComma": "all"
4+
}

Diff for: api/README.md

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
<p align="center">
2+
<a href="http://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo_text.svg" width="320" alt="Nest Logo" /></a>
3+
</p>
4+
5+
[circleci-image]: https://img.shields.io/circleci/build/github/nestjs/nest/master?token=abc123def456
6+
[circleci-url]: https://circleci.com/gh/nestjs/nest
7+
8+
<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>
9+
<p align="center">
10+
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/v/@nestjs/core.svg" alt="NPM Version" /></a>
11+
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/l/@nestjs/core.svg" alt="Package License" /></a>
12+
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/dm/@nestjs/common.svg" alt="NPM Downloads" /></a>
13+
<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>
14+
<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>
15+
<a href="https://discord.gg/G7Qnnhy" target="_blank"><img src="https://img.shields.io/badge/discord-online-brightgreen.svg" alt="Discord"/></a>
16+
<a href="https://opencollective.com/nest#backer" target="_blank"><img src="https://opencollective.com/nest/backers/badge.svg" alt="Backers on Open Collective" /></a>
17+
<a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://opencollective.com/nest/sponsors/badge.svg" alt="Sponsors on Open Collective" /></a>
18+
<a href="https://paypal.me/kamilmysliwiec" target="_blank"><img src="https://img.shields.io/badge/Donate-PayPal-ff3f59.svg"/></a>
19+
<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>
20+
<a href="https://twitter.com/nestframework" target="_blank"><img src="https://img.shields.io/twitter/follow/nestframework.svg?style=social&label=Follow"></a>
21+
</p>
22+
<!--[![Backers on Open Collective](https://opencollective.com/nest/backers/badge.svg)](https://opencollective.com/nest#backer)
23+
[![Sponsors on Open Collective](https://opencollective.com/nest/sponsors/badge.svg)](https://opencollective.com/nest#sponsor)-->
24+
25+
## Description
26+
27+
[Nest](https://github.com/nestjs/nest) framework TypeScript starter repository.
28+
29+
## Installation
30+
31+
```bash
32+
$ npm install
33+
```
34+
35+
## Running the app
36+
37+
```bash
38+
# development
39+
$ npm run start
40+
41+
# watch mode
42+
$ npm run start:dev
43+
44+
# production mode
45+
$ npm run start:prod
46+
```
47+
48+
## Test
49+
50+
```bash
51+
# unit tests
52+
$ npm run test
53+
54+
# e2e tests
55+
$ npm run test:e2e
56+
57+
# test coverage
58+
$ npm run test:cov
59+
```
60+
61+
## Support
62+
63+
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).
64+
65+
## Stay in touch
66+
67+
- Author - [Kamil Myśliwiec](https://kamilmysliwiec.com)
68+
- Website - [https://nestjs.com](https://nestjs.com/)
69+
- Twitter - [@nestframework](https://twitter.com/nestframework)
70+
71+
## License
72+
73+
Nest is [MIT licensed](LICENSE).

Diff for: api/nest-cli.json

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"collection": "@nestjs/schematics",
3+
"sourceRoot": "src"
4+
}

0 commit comments

Comments
 (0)