Resource Entitlement Management System
Run the official postgres docker image and initialize the database by the way of a lein alias
You can also start an empty development database by running the script
Which does roughly the following:
- run a postgres container named
- initialize the database with
- create the schema with
lein run migrate
When done you can stop (and automatically remove) the database.
docker stop rems_test
Populating the database
- You can get some test data with
lein run test-data
Running the application
REMS is a Clojure+Clojurescript Single Page App.
To start the (clojure) backend:
To start the (clojurescript) frontend, run in another terminal:
Point your browser to http://localhost:3000
To run unit tests:
To run tests that need a database:
lein eftest :all
To run all tests and output coverage (the alias also builds cljs):
To run browser tests (requires chromedriver in $PATH, the alias also builds cljs):
If browser tests fail, screenshots and DOM are written in
Start REPL and run tests in there:
lein with-profile test repl (user/run-all-tests)
First make sure you have the npm depenencies with
and then just run
to run tests in Headless Chrome via Karma.
Running all the tests
To conveniently run all the tests you can run the lein alias
You can access the component guide at
/#/guide. It contains all the
components in various configurations.
REMS is an open source project. In case you would like to contribute to its development, please refer to the CONTRIBUTING.md document.
Documentation files can be found under the docs folder.
Documentation can also be read from the browser by launching user docs server with the command:
or simply by visiting https://rems2docs.rahtiapp.fi.
Alternatively docker images can be used for running the documentation server:
docker build . -f docs-server/Dockerfile -t rems-mkdocs-server docker run -it -p 8000:8000 --name rems-user-guide rems-mkdocs-server --rm
Note live reload is disabled for the docker version of mkdocs.