Skip to content

Commit a65e62b

Browse files
author
Andreas Vercell
committed
Initial commit
0 parents  commit a65e62b

File tree

583 files changed

+35931
-0
lines changed

Some content is hidden

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

583 files changed

+35931
-0
lines changed

.babelrc.json

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"presets": [
3+
[
4+
"@babel/preset-env",
5+
{
6+
"targets": "> 0.25%, not dead, ie >= 11",
7+
"corejs": 3,
8+
"useBuiltIns": "entry"
9+
}
10+
],
11+
"@babel/preset-react"
12+
],
13+
"plugins": ["react-hot-loader/babel"],
14+
"env": {
15+
"development": {
16+
"compact": false
17+
}
18+
}
19+
}

.eslintignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
dist
2+
!/.eslintrc.js
3+
!/.prettierrc.js

.eslintrc.js

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
module.exports = {
2+
parser: "@typescript-eslint/parser",
3+
extends: [
4+
"eslint:recommended",
5+
"plugin:react/recommended",
6+
"plugin:@typescript-eslint/eslint-recommended",
7+
"plugin:@typescript-eslint/recommended",
8+
"prettier/@typescript-eslint",
9+
"plugin:prettier/recommended",
10+
],
11+
settings: {
12+
react: {
13+
version: "detect",
14+
},
15+
},
16+
plugins: ["prettier"],
17+
parserOptions: {
18+
sourceType: "module",
19+
},
20+
env: {
21+
browser: true,
22+
node: true,
23+
es6: true,
24+
},
25+
rules: {
26+
"no-console": "error",
27+
"prettier/prettier": "error",
28+
},
29+
overrides: [
30+
{
31+
files: ["*.js", "*.jsx"],
32+
rules: {
33+
"@typescript-eslint/no-var-requires": "off",
34+
"@typescript-eslint/explicit-function-return-type": "off",
35+
},
36+
},
37+
{
38+
files: ["*.ts", "*.tsx"],
39+
rules: {
40+
"eslint(react/prop-types)": "off",
41+
},
42+
},
43+
],
44+
};

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.DS_Store
2+
node_modules
3+
dist

.prettierrc.js

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
quoteProps: "consistent",
3+
};

.stylelintrc.js

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
extends: "stylelint-config-recommended-scss",
3+
};

.vscode/settings.json

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"editor.formatOnSave": true,
3+
"editor.defaultFormatter": "esbenp.prettier-vscode",
4+
"[typescript]": {
5+
"editor.defaultFormatter": "esbenp.prettier-vscode"
6+
},
7+
"[typescriptreact]": {
8+
"editor.defaultFormatter": "esbenp.prettier-vscode"
9+
},
10+
"eslint.enable": true,
11+
"files.exclude": {
12+
".babelrc.json": true,
13+
".eslintignore": true,
14+
".eslintrc.js": true,
15+
".gitignore": true,
16+
".prettierrc.js": true,
17+
".stylelintrc.js": true,
18+
"jest-file-transformer.js": true,
19+
"jest.config.js": true,
20+
"LICENSE.md": true,
21+
"node_modules": true,
22+
"package-lock.json": true,
23+
"server.js": true,
24+
"tsconfig.json": true,
25+
"webpack": true
26+
}
27+
}

LICENSE.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
ISC License (ISC)
2+
3+
Copyright (c) 2020 Nuuday A/S
4+
5+
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
6+
7+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

README.md

+76
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Frontend Challenge
2+
3+
We would like you to make your own small telecom branch, where people can browse and perhaps purchase phones and accessories. Everthing you need to get started right away is included in this repository.
4+
5+
The main purpose of this challenge is for you to show us your frontend skills which include your knowledge of React and how you are constructing and organizing components and assets.
6+
7+
We prefer you to solve the challenge using TypeScript, however, plain JavaScript will do just fine.
8+
9+
If you do not consider yourself particularly good at visual expressions, don't worry. This challenge is primarily to see how well you master React.
10+
Likewise, we do not expect you to be all knowledgeable about either Node or NPM, if you do, that's great, but it's not a requirement. We do, however, expect you to have extensive first-hand knowlagde of ES6, HTML5 and CSS3.
11+
12+
## Sample files
13+
14+
Just to get you started, we have included some sample files which show how to connect to the data API, using CSS modules and how to display static assets.
15+
16+
All sample files are formatted using [Prettier](https://prettier.io/). We are recommending you to
17+
continue to do so, but it's not mandatory.
18+
19+
NB. If you're using VS Code as your IDE, configuration files such as eslintrc and webpack are hidden by default. Likewise, Prettier auto format on save is enabled. You can disable it all in `/.vscode/settings.json` if you like.
20+
21+
## Install and run
22+
23+
This package will install all the necessary modules, include component Hot-Loader and various linting and formating tools, to immediately let you begin coding.
24+
25+
npm install
26+
npm start
27+
28+
The development server (include the API) is running at [http://localhost:3000]()
29+
30+
To lint all your scripts and style components:
31+
32+
npm run lint
33+
34+
To build and run your app:
35+
36+
npm run build
37+
npm run app
38+
39+
The production server is likewise running at [http://localhost:3000]()
40+
41+
You are welcome to add or modify packages.
42+
43+
## Data API
44+
45+
Product data is located in the `/data` directory as a collection if JSON files and is accessible through an API. All requests have a built-in delay randomizer to simulate a live environment.
46+
47+
- `/api/device/list` returns a complete list of products.
48+
- `/api/device/{PRODUCT_ID}` returns an individual product.
49+
50+
## Static files
51+
52+
All files in the `/static` directory will become available at runtime. The files will follow the current tree structure in the directory and be accessible like so:
53+
54+
- `/static/devices/Apple_iPhone7_Slv-1.png`
55+
56+
## Requirements
57+
58+
- You must use React.
59+
- Display the product list as a whole or partial.
60+
- Display individual product information.
61+
- The content must be responsive.
62+
- Must build without errors.
63+
64+
The final result has to be available in a public Git repository which include the commit history. You are also permitted to use a private repository, just make sure we have read access.
65+
66+
## Optional tasks
67+
68+
- Show product variants.
69+
- Sort product list by brands and/or vendor.
70+
- Implement [React Router](https://reacttraining.com/react-router/web/guides/quick-start) for better navigation.
71+
- Implement a simple shopping basket.
72+
- Create unit tests.
73+
74+
## Restrictions
75+
76+
There are no restrictions as such. However, we do prefer you to show us your own idea and work; not just reusing or refactoring other libraries or frameworks.

0 commit comments

Comments
 (0)