Skip to content
This repository was archived by the owner on Jun 28, 2023. It is now read-only.

Commit 8317f80

Browse files
committed
First public release.
0 parents  commit 8317f80

File tree

703 files changed

+382462
-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.

703 files changed

+382462
-0
lines changed

.env

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
REACT_APP_PRODUCTION_API_URL=https://gremlin.extract.legal
2+
REACT_APP_DEVELOPMENT_API_URL=http://localhost:8000

.gitignore

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
lerna-debug.log*
8+
9+
# Diagnostic reports (https://nodejs.org/api/report.html)
10+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
11+
12+
# Runtime data
13+
pids
14+
*.pid
15+
*.seed
16+
*.pid.lock
17+
18+
# Directory for instrumented libs generated by jscoverage/JSCover
19+
lib-cov
20+
21+
# Coverage directory used by tools like istanbul
22+
coverage
23+
*.lcov
24+
25+
# nyc test coverage
26+
.nyc_output
27+
28+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
29+
.grunt
30+
31+
# Bower dependency directory (https://bower.io/)
32+
bower_components
33+
34+
# node-waf configuration
35+
.lock-wscript
36+
37+
# Compiled binary addons (https://nodejs.org/api/addons.html)
38+
build/Release
39+
40+
# Dependency directories
41+
node_modules/
42+
jspm_packages/
43+
44+
# TypeScript v1 declaration files
45+
typings/
46+
47+
# TypeScript cache
48+
*.tsbuildinfo
49+
50+
# Optional npm cache directory
51+
.npm
52+
53+
# Optional eslint cache
54+
.eslintcache
55+
56+
# Microbundle cache
57+
.rpt2_cache/
58+
.rts2_cache_cjs/
59+
.rts2_cache_es/
60+
.rts2_cache_umd/
61+
62+
# Optional REPL history
63+
.node_repl_history
64+
65+
# Output of 'npm pack'
66+
*.tgz
67+
68+
# Yarn Integrity file
69+
.yarn-integrity
70+
71+
# parcel-bundler cache (https://parceljs.org/)
72+
.cache
73+
74+
# Next.js build output
75+
.next
76+
77+
# Nuxt.js build / generate output
78+
.nuxt
79+
dist
80+
81+
# Gatsby files
82+
.cache/
83+
# Comment in the public line in if your project uses Gatsby and *not* Next.js
84+
# https://nextjs.org/blog/next-9-1#public-directory-support
85+
# public
86+
87+
# vuepress build output
88+
.vuepress/dist
89+
90+
# Serverless directories
91+
.serverless/
92+
93+
# FuseBox cache
94+
.fusebox/
95+
96+
# DynamoDB Local files
97+
.dynamodb/
98+
99+
# TernJS port file
100+
.tern-port

Procfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
web: node server.js

README.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
### Welcome to Gremlin GUI
2+
3+
Gremlin is the open source, low-code microservice framework designed for legal engineering, data extraction, and document analysis. Gremlin GUI is a React-based frontend for the separate Gremlin Server. It is licensed under the AGPL and is free and open source.
4+
5+
### ENV Variables
6+
7+
You need to configure the target URL for the Gremlin backend. Create a file .env in the same folder as server.js. In production, you need this variable:
8+
9+
REACT_APP_PRODUCTION_API_URL="<backend URL>"
10+
11+
When you're not in production, system will look for the target URL in the following env variable:
12+
13+
REACT_APP_DEVELOPMENT_API_URL="<development bakend URL>"
14+
15+
Define both to have the system switch as appropriate depending on where you deploy it.
16+
17+
### Run the Development Server
18+
19+
You can run the Gremlin GUI locally and point it at any valid Gremlin backend. To run a deployment version, try the following:
20+
21+
git clone https://github.com/JSv4/GremlinGUI.git
22+
cd GremlinGUI
23+
npm install
24+
npm run start
25+
26+
You'll need to configure environment variables to point API requests at a Gremlin Backend. This requires you separately have a Gremlin Backend. For more information, see the separate repository at https://github.com/JSv4/GremlinServer.
27+
28+
### Production Deployment
29+
30+
The recommended way to deploy the GUI is via Heroku. The Gremlin GUI has much lower system requirements
31+
than the backend. Whereas the backend is not a good fit for Heroku as we need more control over the build
32+
process and more system resources, the free or hobby instance of Heroku is perfect for our GUI. In the future,
33+
we plan to add an option to deploy the GUI as part of the same docker compose setup that deploys the backend.
34+
35+
This repository is pre-configured for Heroku, so deployment should be easy. In order to deploy, however, we assume you have alreay have a Heroku account and have setup the Heroku CLI. If you haven't set up the Heroku CLI, follow the instructons here first: https://devcenter.heroku.com/articles/heroku-cli
36+
37+
Now, in the same directory as server.js, execute the following commands in your terminal:
38+
39+
heroku git: remote -a [application name]
40+
git push heroku master
41+
42+
You will see the installation progress in the terminal. Once the application has been successfully deployed, you will be able to access it at [application name].herokuapp.com.
43+
44+
### Heroku Configuration
45+
46+
NOTE, if you want to use https and you have deployed to Heroku, you must upgrade to at least a hobby dyno. Heroku provides SSL certificates only for paid apps. A hobby dyno costs under $10 a month, so not a bad price to pay for a faster server and https. If you want to provide your own SSL certificate, you can, but it is fairly involved. Follow instructions here: https://devcenter.heroku.com/articles/ssl
47+
48+
### LESS Styling
49+
50+
I am relying on less-watcher to compile less files into css whenever changes are detected.
51+
The alternative is "ejecting" my webpack config which sounds like a nightmare. Instructions
52+
on how this setup works are here: https://www.folio3.com/using-less-in-react-without-ejecting
53+
54+
### Acknowledgements
55+
56+
- Icons
57+
58+
- *[Starting Flags](https://thenounproject.com/search/?q=start+flag&i=314735)* - By Xela Ub, VN (*[CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)*)
59+
- *[Step Arrows](https://thenounproject.com/search/?q=steps&i=1677173)* - BY luca fruzza, IT (*[CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)*)
60+
- *[Split Arrows](https://thenounproject.com/search/?q=many+arrows&i=498877)* - By Hea Poh Lin, MY (*[CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)*)
61+
- *[Nodes Icon](https://thenounproject.com/search/?q=node&i=159043)* - By Gregor Cresnar (*[CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)*)
62+
63+
- Main Software Libraries
64+
65+
- Node
66+
- React
67+
- React-Diagrams
68+
- Semantic-UI-React
69+
- Json Schema
70+
- Axios
71+
- Redux
72+
- Redux-Thunk

app.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"name": "Cluster Gremlin Frontend",
3+
"description": "Frontend for Cluster Gremlin",
4+
"repository": "https://github.com/heroku/node-js-getting-started",
5+
"logo": "https://cdn.rawgit.com/heroku/node-js-getting-started/master/public/node.svg",
6+
"keywords": ["node", "express", "heroku"],
7+
"image": "heroku/nodejs"
8+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
ace.define("ace/snippets/crystal", ["require", "exports", "module"], function (require, exports, module) {
2+
"use strict";
3+
4+
exports.snippetText = undefined;
5+
exports.scope = "crystal";
6+
});
7+
8+
(function () {
9+
ace.require(["ace/snippets/crystal"], function (m) {
10+
if (typeof module == "object" && typeof exports == "object" && module) {
11+
module.exports = m;
12+
}
13+
});
14+
})();

0 commit comments

Comments
 (0)