Skip to content

Commit e57f30d

Browse files
authored
Merge pull request #1 from KnowWhereGraph/develop
Node Explorer 1.0.0
2 parents b379f4e + cea3a70 commit e57f30d

Some content is hidden

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

47 files changed

+14709
-1
lines changed

README.md

Lines changed: 57 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,58 @@
1-
# node-browser
1+
# kwg-node-browser
2+
23
Web service for viewing data about nodes
4+
5+
## Background
6+
7+
KnowWhereGraph has billions of data nodes, each with an attached HTTP URI. This web application provides an interface for viewing information attached to a particular node.
8+
9+
## Running
10+
11+
The node explorer can be run under several environments, which are defined as Angular environments under `src/app/environments`.
12+
13+
### Local Environment
14+
15+
The local environment assumes that the KnowWhereGraph stack is running locally, which includes an endpoint at `https://localhost/sparql`. It also redirects all web links to localhost.
16+
```
17+
ng serve --configuration=local
18+
```
19+
20+
### Stage Environment
21+
22+
The stage environment uses the staging deployments SPARQL endpoint. It also redirects links to the staging server.
23+
24+
### Production Environment
25+
26+
The prod environment uses the production SPARQL endpoint and redirects to the production server.
27+
28+
### Custom
29+
30+
Changes can be made to any of these environments to mix and match behavior.
31+
32+
## Building & Deploying
33+
34+
When using the node explorer in a production environment, the source should be built and then served with a server like NGINX or Apache.
35+
36+
### Production
37+
38+
Production deployments should deploy the application by building and serving the distribution with a reverse proxy such as nginx or apache.
39+
40+
To build the node explorer,
41+
42+
```
43+
ng build --configuration=prod
44+
```
45+
46+
### Staging
47+
48+
Staging builds are done similarly to production with
49+
50+
```
51+
ng build --configuration=stage
52+
```
53+
54+
## Developing
55+
56+
The standard Git Flow: create a feature branch off of the `develop` branch and make pull requests into it. For full releases, merge from the `develop` branch into `main`.
57+
58+
Before requesting a review, format the code with prettier: `npx prettier . --write`

node-browser/.editorconfig

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Editor configuration, see https://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
indent_style = space
7+
indent_size = 2
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.ts]
12+
quote_type = single
13+
14+
[*.md]
15+
max_line_length = off
16+
trim_trailing_whitespace = false

node-browser/.gitignore

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# See http://help.github.com/ignore-files/ for more about ignoring files.
2+
3+
# Compiled output
4+
/dist
5+
/tmp
6+
/out-tsc
7+
/bazel-out
8+
9+
# Node
10+
/node_modules
11+
npm-debug.log
12+
yarn-error.log
13+
14+
# IDEs and editors
15+
.idea/
16+
.project
17+
.classpath
18+
.c9/
19+
*.launch
20+
.settings/
21+
*.sublime-workspace
22+
23+
# Visual Studio Code
24+
.vscode/*
25+
!.vscode/settings.json
26+
!.vscode/tasks.json
27+
!.vscode/launch.json
28+
!.vscode/extensions.json
29+
.history/*
30+
31+
# Miscellaneous
32+
/.angular/cache
33+
.sass-cache/
34+
/connect.lock
35+
/coverage
36+
/libpeerconnection.log
37+
testem.log
38+
/typings
39+
40+
# System files
41+
.DS_Store
42+
Thumbs.db

node-browser/.prettierrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=827846
3+
"recommendations": ["angular.ng-template"]
4+
}

node-browser/.vscode/launch.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
3+
"version": "0.2.0",
4+
"configurations": [
5+
{
6+
"name": "ng serve",
7+
"type": "chrome",
8+
"request": "launch",
9+
"preLaunchTask": "npm: start",
10+
"url": "http://localhost:4200/"
11+
},
12+
{
13+
"name": "ng test",
14+
"type": "chrome",
15+
"request": "launch",
16+
"preLaunchTask": "npm: test",
17+
"url": "http://localhost:9876/debug.html"
18+
}
19+
]
20+
}

node-browser/.vscode/tasks.json

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
// For more information, visit: https://go.microsoft.com/fwlink/?LinkId=733558
3+
"version": "2.0.0",
4+
"tasks": [
5+
{
6+
"type": "npm",
7+
"script": "start",
8+
"isBackground": true,
9+
"problemMatcher": {
10+
"owner": "typescript",
11+
"pattern": "$tsc",
12+
"background": {
13+
"activeOnStart": true,
14+
"beginsPattern": {
15+
"regexp": "(.*?)"
16+
},
17+
"endsPattern": {
18+
"regexp": "bundle generation complete"
19+
}
20+
}
21+
}
22+
},
23+
{
24+
"type": "npm",
25+
"script": "test",
26+
"isBackground": true,
27+
"problemMatcher": {
28+
"owner": "typescript",
29+
"pattern": "$tsc",
30+
"background": {
31+
"activeOnStart": true,
32+
"beginsPattern": {
33+
"regexp": "(.*?)"
34+
},
35+
"endsPattern": {
36+
"regexp": "bundle generation complete"
37+
}
38+
}
39+
}
40+
}
41+
]
42+
}

node-browser/README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# NodeBrowser
2+
3+
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 16.1.8.
4+
5+
## Development server
6+
7+
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The application will automatically reload if you change any of the source files.
8+
9+
## Code scaffolding
10+
11+
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
12+
13+
## Build
14+
15+
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory.
16+
17+
## Running unit tests
18+
19+
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
20+
21+
## Running end-to-end tests
22+
23+
Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
24+
25+
## Further help
26+
27+
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.

node-browser/angular.json

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
{
2+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3+
"version": 1,
4+
"newProjectRoot": "projects",
5+
"projects": {
6+
"node-browser": {
7+
"projectType": "application",
8+
"schematics": {
9+
"@schematics/angular:component": {
10+
"style": "scss"
11+
},
12+
"@schematics/angular:application": {
13+
"strict": true
14+
}
15+
},
16+
"root": "",
17+
"sourceRoot": "src",
18+
"prefix": "app",
19+
"architect": {
20+
"build": {
21+
"builder": "@angular-devkit/build-angular:browser",
22+
"options": {
23+
"outputPath": "dist/node-browser",
24+
"index": "src/index.html",
25+
"main": "src/main.ts",
26+
"polyfills": "src/polyfills.ts",
27+
"tsConfig": "tsconfig.app.json",
28+
"inlineStyleLanguage": "scss",
29+
"assets": ["src/favicon.ico", "src/assets"],
30+
"styles": [
31+
"src/styles.scss",
32+
"./node_modules/leaflet/dist/leaflet.css",
33+
"./node_modules/material-icons/iconfont/material-icons.css",
34+
"./node_modules/leaflet.markercluster/dist/MarkerCluster.Default.css"
35+
],
36+
"scripts": [
37+
"./node_modules/leaflet/dist/leaflet.js",
38+
"./node_modules/leaflet.markercluster/dist/leaflet.markercluster.js",
39+
"./node_modules/wicket/wicket.js"
40+
]
41+
},
42+
"configurations": {
43+
"production": {
44+
"fileReplacements": [
45+
{
46+
"replace": "src/environments/environment.ts",
47+
"with": "src/environments/environment.prod.ts"
48+
}
49+
],
50+
"budgets": [
51+
{
52+
"type": "initial",
53+
"maximumWarning": "500kb",
54+
"maximumError": "2mb"
55+
},
56+
{
57+
"type": "anyComponentStyle",
58+
"maximumWarning": "2kb",
59+
"maximumError": "2mb"
60+
}
61+
],
62+
"outputHashing": "all"
63+
},
64+
"stage": {
65+
"buildOptimizer": false,
66+
"optimization": false,
67+
"vendorChunk": true,
68+
"extractLicenses": false,
69+
"sourceMap": true,
70+
"namedChunks": true,
71+
"fileReplacements": [
72+
{
73+
"replace": "src/environments/environment.ts",
74+
"with": "src/environments/environment.stage.ts"
75+
}
76+
]
77+
},
78+
"local": {
79+
"buildOptimizer": false,
80+
"optimization": false,
81+
"vendorChunk": true,
82+
"extractLicenses": false,
83+
"sourceMap": true,
84+
"namedChunks": true,
85+
"fileReplacements": [
86+
{
87+
"replace": "src/environments/environment.ts",
88+
"with": "src/environments/environment.local.ts"
89+
}
90+
]
91+
}
92+
},
93+
"defaultConfiguration": "production"
94+
},
95+
"serve": {
96+
"builder": "@angular-devkit/build-angular:dev-server",
97+
"configurations": {
98+
"prod": {
99+
"browserTarget": "node-browser:build:production"
100+
},
101+
"local": {
102+
"browserTarget": "node-browser:build:local"
103+
},
104+
"stage": {
105+
"browserTarget": "node-browser:build:stage"
106+
}
107+
},
108+
"defaultConfiguration": "prod"
109+
},
110+
"extract-i18n": {
111+
"builder": "@angular-devkit/build-angular:extract-i18n",
112+
"options": {
113+
"browserTarget": "node-browser:build"
114+
}
115+
},
116+
"test": {
117+
"builder": "@angular-devkit/build-angular:karma",
118+
"options": {
119+
"polyfills": "src/polyfills.ts",
120+
"tsConfig": "tsconfig.spec.json",
121+
"inlineStyleLanguage": "scss",
122+
"assets": ["src/favicon.ico", "src/assets"],
123+
"styles": ["src/styles.scss"],
124+
"scripts": []
125+
}
126+
}
127+
}
128+
}
129+
}
130+
}

0 commit comments

Comments
 (0)