Skip to content

Commit 5a06c1d

Browse files
committed
Initial commit
0 parents  commit 5a06c1d

File tree

9 files changed

+4023
-0
lines changed

9 files changed

+4023
-0
lines changed

.gitignore

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
.idea
2+
3+
# Logs
4+
logs
5+
*.log
6+
npm-debug.log*
7+
yarn-debug.log*
8+
yarn-error.log*
9+
10+
# Runtime data
11+
pids
12+
*.pid
13+
*.seed
14+
*.pid.lock
15+
16+
# Directory for instrumented libs generated by jscoverage/JSCover
17+
lib-cov
18+
19+
# Coverage directory used by tools like istanbul
20+
coverage
21+
22+
# nyc test coverage
23+
.nyc_output
24+
25+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
26+
.grunt
27+
28+
# Bower dependency directory (https://bower.io/)
29+
bower_components
30+
31+
# node-waf configuration
32+
.lock-wscript
33+
34+
# Compiled binary addons (https://nodejs.org/api/addons.html)
35+
build/Release
36+
37+
# Dependency directories
38+
node_modules/
39+
jspm_packages/
40+
41+
# TypeScript v1 declaration files
42+
typings/
43+
44+
# Optional npm cache directory
45+
.npm
46+
47+
# Optional eslint cache
48+
.eslintcache
49+
50+
# Optional REPL history
51+
.node_repl_history
52+
53+
# Output of 'npm pack'
54+
*.tgz
55+
56+
# Yarn Integrity file
57+
.yarn-integrity
58+
59+
# dotenv environment variables file
60+
.env
61+
62+
# next.js build output
63+
.next
64+
65+
dist/main.js

README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# doctari test project
2+
## Description
3+
Create a tool which presents the given test data in `data/testdaten.txt` in an user interface. Use HTML.
4+
In addition, the tool must be able to display the federal states of Germany (Bundesland) for each of the records.
5+
Request the GoogleMaps Geocoding API to get the federal states.
6+
*Hint: In Germany, the zip code is clearly assigned to a federal state.*
7+
8+
`https://maps.googleapis.com/maps/api/geocode/json?address=<ADRESS>&key=<GOOGLE_API_KEY>`
9+
10+
**Please consider that API requests are expensive and limited.**
11+
12+
Write your code like you would do it for a production system in a company and please consider the following points:
13+
* architecture / code structure
14+
* OOP
15+
* performance
16+
* reusable code
17+
* modularity
18+
* clean code
19+
20+
PS: We don't care about a good frontend layout ;)
21+
22+
We wish you success!
23+
24+
## Installation
25+
26+
1. `yarn install`
27+
28+
## Run the tool
29+
30+
1. `yarn webpack` (watcher)

data/testdaten.txt

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
Sandra Abendroth
2+
Fischerinsel 4
3+
41063 Mönchengladbach Eicken
4+
5+
Tina Tester
6+
Testweg 123
7+
123456 Teststadt
8+
9+
Stephan Schmid
10+
Kantstrasse 24
11+
90453 Nürnberg
12+
13+
Felix Duerr
14+
Potsdamer Platz 68
15+
85113 Böhmfeld
16+
17+
Anja Finkel
18+
Konstanzer Strasse 78
19+
87725 Babenhausen
20+
21+
Dieter Kluge
22+
Inge Beisheim Platz 85
23+
21727 Estorf
24+
25+
Ulrich Herzog
26+
Postfach 12345
27+
Invalidenstrasse 8
28+
66919 Hermersberg
29+
30+
Christin Finkel
31+
Eschenweg 45
32+
98536 Zella-Mehlis
33+
34+
Heike Berg
35+
Marseiller Strasse 91
36+
82386 Huglfing
37+
38+
Kristian Ehrlichmann
39+
Los-Angeles-Platz 61
40+
23752 Oldenburg
41+
42+
Tim Waechter
43+
Ziegelstr. 45
44+
84389 Postmünster
45+
46+
Mathias Lehrer
47+
Luebeckertordamm 43
48+
82386 Huglfing
49+
50+
Peter Schmidt
51+
Bleibtreustraße 87
52+
79865 Grafenhausen
53+
54+
Dominik Koertig
55+
Karl-Liebknecht-Strasse 14
56+
28832 Achim
57+
58+
Daniela Hertz
59+
Grolmanstraße 82
60+
82386 Huglfing
61+
62+
Christin Finkel
63+
Eschenweg 45
64+
98536 Zella-Mehlis
65+
66+
Frank Schuhmacher
67+
Güntzelstrasse 94
68+
54668 Prümzurlay
69+
70+
Janina Freytag
71+
Ziegelstr. 22
72+
94149 Kößlarn
73+
74+
Alex Heinrich
75+
Plauener Weg 22
76+
62000 Neustadt

dist/index.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>doctari test project</title>
6+
</head>
7+
<body>
8+
<div id="root"></div>
9+
<script src="main.js"></script>
10+
</body>
11+
</html>

package.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"name": "testprojekt",
3+
"version": "1.0.0",
4+
"main": "index.js",
5+
"license": "MIT",
6+
"devDependencies": {
7+
"@babel/core": "^7.5.4",
8+
"@babel/preset-env": "^7.5.4",
9+
"babel-loader": "^8.0.6",
10+
"webpack": "^4.35.3",
11+
"webpack-cli": "^3.3.6"
12+
}
13+
}

src/index.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import readFile from './utils/readFile';
2+
3+
const app = document.getElementById('root');
4+
5+
readFile('../data/testdaten.txt').then((content) => {
6+
const element = document.createElement('pre');
7+
element.appendChild(document.createTextNode(content));
8+
9+
app.appendChild(element);
10+
});

src/utils/readFile.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export default function readFile(fileName) {
2+
return fetch(fileName)
3+
.then(response => response.text())
4+
}

webpack.config.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
module.exports = {
2+
watch: true,
3+
module: {
4+
rules: [
5+
{
6+
test: /\.(js|jsx)$/,
7+
exclude: /node_modules/,
8+
use: {
9+
loader: "babel-loader"
10+
}
11+
}
12+
]
13+
}
14+
};

0 commit comments

Comments
 (0)