Glam is an app for linguistic data annotation that's still under construction. It's built using Clojure(Script), Material-UI, Fulcro, and XTDB. Check back soon 🚧
Resources:
- For a short summary of this app's goals and vision, see this post.
- Demo is live at https://demo.use-glam.app/ (ask Luke for login credentials).
- Documentation is available at http://lgessler.com/glam/.
(These instructions are a sketch--more detailed instructions will be given later.)
- Secure a server that will run the app. We will assume you are using an Ubuntu machine.
- Download a JAR from the latest release.
- Configure the JAR as a service.
- Set up HTTPS. If you do not set up HTTPS, your instance of Glam will be vulnerable to password-stealing attacks. Fortunately, this is fairly easy--we recommend running Glam on the default port (8080) and using a reverse proxy like Nginx with certbot to provide HTTPS.
First, take care of dependencies. You will need to:
# install dependencies
$ yarn
# start compiling CLJS--leave this running in a terminal session...
$ yarn client
# and in a separate session, start a server repl--note you'll have to type `(start)`
$ yarn server
clojure -A:dev
Clojure 1.10.1
user=> (start)
# navigate to localhost:8085, and see package.json for more
On the terminal:
yarn client
Clojure Server Profile:
- Make a new profile based on "Clojure REPL > Local"
- Select "Run with Deps"
- Put
dev
in Aliases - Run and write (start)
- See
src/dev/user.clj
for development tools.
ClojureScript Client Profile:
- Make a new profile based on "Clojure REPL > Remote"
- Connection type:
nREPL
- Connection details: "Use port from nREPL file"
- Project:
glam
- Make sure you're entered
(start)
in the server. - Navigate to
localhost:8085
- Run your client profile and enter:
(require '[shadow.cljs.devtools.api :as shadow])
(shadow/repl :main)
- Write
(js/console.log "hi")
and ensure that it was printed out to the console in your browser session
Note: all docs
command will require additional dependencies for asciidoctor
. Use gem
to get them.
client
: Start the shadow-cljs ClojureScript compiler, which will compile code to JS and also hot reload any changes.client/cljs-repl
: Get a client CLJS REPL (note: requires a running browser session).client/clj-repl
: Get a client CLJ REPL (note: this is only useful if you want to fiddle with shadow-cljs, which is rare).server
: Start a server REPL. (This will not start the server automatically--to do that, you need to type(start)
.)start
: Convenience function for runningclient/main
andserver
.clean
: Remove all compilation artefacts.client/release
: Build the single.js
bundle for a production release.server/release
: Build the single.jar
file for a production release.release
: Convenience function for runningclient/release
andserver/release
.test
: Run all Clojure tests. (Currently, there are no CLJS tests.)clojure-outdated
: Check Clojure dependencies for oudatedness.npm-outdated
: Check NPM dependencies for outdatedness.loc
: Count lines of code (requirescloc
:npm install -g cloc
).docs/html
: Compiledocs/book.adoc
into HTML attarget/book.html
docs/pdf
: Compiledocs/book.adoc
into a PDF attarget/book.pdf
docs
: Performdocs/html
anddocs/pdf
Navigate to http://localhost:8085/rest-api/v1/docs/index.html
Set the environment variable XTDB_INSPECTOR_URI_PREFIX=/_inspector
(e.g. XTDB_INSPECTOR_URI_PREFIX=/_inspector yarn server
), and see http://localhost:8085/_inspector/attr