If you'd like to contribute code to this project or give it a try locally (before deploying it), you need to:
-
clone this repository
-
get Docker and Docker Compose -- used for running a local Matrix Synapse + element-web setup, for testing
-
start all dependency services (Postgres, Matrix Synapse, element-web):
make services-start
. You can stop them later withmake services-stop
or tail their logs withmake services-tail-logs
-
create a sample "system" user:
make create-sample-system-user
-
copy the sample configuration:
cp config.json.dist config.json
-
copy the sample policy:
cp policy.json.dist policy.json
-
build and run the
matrix-corporal
program by executing:make run-in-container-quick
-
you should now be able to log in with user
a
and passwordtest
(as per the policy) to the element-web instance -
you should also be able to log in with the system user
matrix-corporal
and passwordsystem-user-password
to the element-web instance -
create a few rooms manually, through element-web with that system (
matrix-corporal
) user -
modify
policy.json
(e.g. defining new managed rooms, definining users, defining room memberships, etc) and watchmatrix-corporal
reconciliate the server state
For local development, it's best to install a Go compiler (version 1.12 or later is required) locally.
Some tests are available and can be executed with: make test
.