Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = false
max_line_length = 120
tab_width = 4

[*.scss]
indent_size = 2
indent_style = space
10 changes: 10 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
SERVER_DB_URI=localhost
SERVER_DB_PORT=27017
NODE_ENV=development
SERVER_PORT=5000
SERVER_DB_USER=root
SERVER_DB_PASSWORD=rootpassword
SERVER_DB_NAME=list
SERVER_DB_URI=localhost
SERVER_DB_PORT=27017
CLIENT_PORT=3002
5 changes: 5 additions & 0 deletions .env.routes
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
ROUTE_LISTS=/api/v1/lists
ROUTE_LIST_BY_iD=/api/v1/lists/:id

ROUTE_ITEM_BY_LIST_ID=/api/v1/items/:idList
ROUTE_ITEM_BY_LIST_ID_ITEM_ID=/api/v1/items
11 changes: 11 additions & 0 deletions .eslint.client.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": ["./.eslintrc.base.json"],
"parserOptions": {
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
},
"project": ["./tsconfig.client.json", "./packages/*/tsconfig.json"],
"tsconfigRootDir": "./"
}
}
11 changes: 11 additions & 0 deletions .eslint.server.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": ["./.eslintrc.base.json"],
"parserOptions": {
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
},
"project": ["./tsconfig.server.json", "./packages/*/tsconfig.json"],
"tsconfigRootDir": "./"
}
}
File renamed without changes.
89 changes: 89 additions & 0 deletions .eslintrc.base.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
{
"env": {
"browser": true,
"es6": true,
"node": true
},
"extends": [
"eslint:recommended",
"prettier",
"plugin:prettier/recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:react/recommended"
],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parser": "@typescript-eslint/parser",
"plugins": [
"react",
"eslint-plugin",
"@typescript-eslint",
"jest",
"eslint-comments"
],
"settings": {
"react": {
"createClass": "createReactClass",
"pragma": "React",
"version": "detect"
},
"propWrapperFunctions": [
"forbidExtraProps",
{
"property": "freeze",
"object": "Object"
},
{
"property": "myFavoriteWrapper"
}
],
"linkComponents": [
"Hyperlink",
{
"name": "Link",
"linkAttribute": "to"
}
]
},
"rules": {
"consistent-return":0,
"prettier/prettier": 0,
"@typescript-eslint/no-var-requires": 0,
"global-require": 0,
"@typescript-eslint/no-unused-vars": [
"error",
{
"args": "none"
}
],
"import/no-unresolved": 0,
"@typescript-eslint/unbound-method": 0,
"@typescript-eslint/explicit-function-return-type": 0,
"no-console": 0,
"no-shadow": 0,
"@typescript-eslint/camelcase": 0,

"import/prefer-default-export": 0,
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/no-empty-interface": 0,
"class-methods-use-this": 0,
"@typescript-eslint/consistent-type-assertions": 0,
"no-useless-constructor": 0,
"no-self-compare": 0,
"import/no-extraneous-dependencies": [
"error",
{
"devDependencies": true
}
],
"no-throw-literal": 0,
"space-before-function-paren": [
"error",
"always"
]
}
}
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/node_modules/
.idea
data
dist*
mongo-*
*.log
build
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
registry=http://registry.npmjs.org/
save-exact=true
13 changes: 13 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"printWidth": 120,
"singleQuote": false,
"arrowParens": "always",
"semi": true,
"jsxSingleQuote": false,
"jsxBracketSameLine": false,
"parser": "typescript",
"endOfLine": "lf",
"bracketSpacing": true,
"tabWidth": 4,
"trailingComma": "es5"
}
53 changes: 53 additions & 0 deletions .sass-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
files:
include:
- src/**/*.scss
ignore:
- /node_modules/**
options:
formatter: table
merge-default-rules: false
rules:
property-units:
global: ['px', '%', 's', 'rem', 'vh', 'vw', 'rf', 'fr']
variable-name-format:
- 2
- convention: '^[a-zA-Z_-]+$'
convention-explanation: Variables should only be letters, underscores and dashes
zero-unit: 2
bem-depth: 2
indentation: 0
hex-notation: 2
nesting-depth: 2
space-between-parens: 2
space-before-colon: 2
space-before-brace: 2
space-before-bang: 2
space-around-operator: 2
space-after-comma: 2
space-after-colon: 2
space-after-bang: 2
single-line-per-selector: 2
shorthand-values: 2
pseudo-element: 2
one-declaration-per-line: 2
no-url-protocols: 2
no-transition-all: 0
no-trailing-zero: 2
no-trailing-whitespace: 2
no-universal-selectors: 1
no-important: 0
no-ids: 1
no-empty-rulesets: 2
no-css-comments: 1
final-newline: 2
empty-line-between-blocks: 2
brace-style: 2
border-zero: 0
attribute-quotes: 2
no-combinators: 0
no-attribute-selectors: 0
force-pseudo-nesting: 0
force-element-nesting: 0
force-attribute-nesting: 0
url-quotes: 2
no-extends: 0
29 changes: 29 additions & 0 deletions .stylelintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
module.exports = {
extends: ['stylelint-config-standard', 'stylelint-config-recommended', "stylelint-scss"],
plugins: [
"stylelint-order",
'stylelint-scss'
],
rules: {
'at-rule-no-unknown': [
true,
{
ignoreAtRules: [
'at-root',
'content',
'else',
'extend',
'function',
'if',
'include',
'mixin',
'return',
'warn',
'error',
'each',
'for'
]
}
]
}
};
20 changes: 20 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"skipFiles": [
"<node_internals>/**"
],
"program": "${workspaceFolder}/start-*",
"outFiles": [
"${workspaceFolder}/**/*.js"
]
}
]
}
1 change: 1 addition & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
UNLICENSE
7 changes: 7 additions & 0 deletions Quokka.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"node": "~/.nvm/versions/node/v12.14.1/bin",
"plugins": [
"./my-plugin",
"jsdom-quokka-plugin"
]
}
21 changes: 15 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Let's code some JS!

Hey, welcome to the first coding challenge of your interview process, you'll be presented with a set of steps to accomplish in order to get yourself graded on
Hey, welcome to the first coding challenge of your interview process, you'll be presented with a set of steps to accomplish in order to get yourself graded on

> Fullstack JavaScript using the MEAN stack

Expand Down Expand Up @@ -30,20 +30,20 @@ This challenge is not set by any hard rule regarding time or style, although bot

You will be creating a simple server-client application so common nowadays, using the MEAN stack, the requirements are as follows.

- As an individual,
- As an individual,
- I need a way to create lists of my favorite stuff ( so cliche, right? ) so, several lists of different stuff (books, movies, stores, pizza flavors, whatevs...)
- I need a way to add, edit, and delete items on such lists
- I need a way to view the lists I create
- As a developer,
- I need the node_modules to be ignored by git
- I need the node_modules to be ignored by git
- I need to be able to access the CRUD capabilities of the lists through a RESTful API, json based, from external domains
- I need schemas ( mongoose preferred ) for the Lists and Items entities
- I need an exposed CRUD API to affect the Lists and Items entities using the correct HTTP verbs for each
- Create, update, remove, fetch all and fetch by id should be supported for lists and items (10 endpoints total)
- I need middleware to happen on each request validating that the user has a cookie named "auth" or not (log the value to output, we are not managing authentication of any kind just yet)
- I need a test suite testing the endpoints
- I need a test suite testing the endpoints
- I need a test suite testing the middleware covering the cases where the user has a cookie named "auth", a cookie with another name or no cookie at all


## The small print

Expand All @@ -53,4 +53,13 @@ Stuff that will be graded
Code coverage ( Is my code tested? Are all scenarios considered? )
Requirement coverage ( Is the application doing what it is meant to be doing? )
Rule compliance ( Did i follow the few rules set on __The rules__ ? )



___
# Ernesto Jara

## Start the project on dev both back and front

```bash
$ npm start
```
Loading