eXist-db 4.3.0: Download and install eXist-db 4.3.0, see eXist-db Remember to note down the admin password of the eXist-db installation, you will need that later. If you are installing eXist-db on Mac OS X, install it within the User folder, installing it in /Applications causes problems sometimes as the permissions required for eXist-db to write to the file system are for a super user.

Apache HTTPD 2.4.x: Install Apache, on Cent OS, Ubuntu and OS X this will likely be installed by default, on Windows you will have to download and install, see Apache for Windows; enable mod_alias, mod_rewrite, mod_proxy, mod_proxy_http and enable htaccess.

You can either build the source from github for each component, or you can install a released version of a component. For getting familiar with the system we recommend starting by installing a released version.

Gawati Portal provides access to all legal and legislative data in the system.
See Gawati Portal System for an architecture overview.

IMPORTANT: In Gawati Component interaction is purely via REST services, we use Apache HTTP as a reverse proxy to bind all the services together under one domain and user interface for the user. You may want to read up and get an idea of the Apache configuration before starting the installation. Testing Development & Production modes side by side

To setup the PDF data-set, you just need to extract the files into a folder, e.g if you extract the PDF files into /home/data/akn_pdf, and add a Apache configuration to serve the folder contents (See Apache configuration for binary data)

To setup the XML data-set, extract the archives into separate folders (e.g. /home/data/akn_xml/akn and /home/data/akn_xml/akn_ft). On Linux and MacOS you can run the following command to get the data input password:

If eXist-db is installed in a remote server, by default the server starts on port 8080 and listens only to localhost.
To access the web-based dashboard from a remote computer, you need to use ssh tunneling. For example, if your remote server is on the I.P. Address 101.102.103.104, and eXist-db is on port 8080, running the following command, will give you access to the eXist-db dashboard on http://localhost:9999 :

Within the auth.gawati.local realm, navigate to the Clients tab. Click on gawati-portal-ui. Set the other parameters as shown below. In this case we have set the root url, valid url etc to http://localhost:3000 which is the dev mode host and port for Gawati Editor UI. If you are deploying on a domain e.g. http://www.domain.org you can set it to that domain. Note the RedirectURLs can be set to multiple urls, this is because, the profiles services typically runs on a different url base .e.g. a different domain than the portal, so the authentication headers need to support such redirects, and unless each of the redirect domains ( for the portal-ui and for the profiles system) are set here, then the authenticated redirect will fail. You can set WebOrigins to + which tells KeyCloak to set valids CORS headers RedirectUrls.

Within the client config, switch to the Credentials tab and regenerate the secret.

Switch to the Installation tab in the client section, and choose the format as KeyCloakOIDCJSON. Download the json file.

Open the dowloaded json file using your preferred text editor. Copy the variables auth-server-url to url and resource to clientId. It should look similar to the json shown below.

Finally, login as admin into KeyCloak and create some users. You can create a test users like portaladmin, portaleditor, portaluser and associate them with the groups portalui.Admins, portalui.Editors and portalui.Editors .

Above: a user called portaladmin has been added.

Above: the user has been added to the portalui.Admins group to give it the portalui.Admin role.

Gawati Profiles allows authenticated users in system to have a profile with their personal information.
The Profiles system supports other functionality in the system, like allowing logged in users to save their searches.
The profiles system is made up of 3 different components:

Gawati Data Editor (or Gawati Editor in short), is a tool that allows inputting managing documents in the portal. Gawati is a suite of distributed applications, and the same model applies here for data entry. The Gawati Portal System has been conceived has a public facing system to access and search for data. The Gawati Editor is a back-office systme that allows managing the process of entering data and publishing it online.

Gawati Editor can be used independent of the Gawati Portal System, as it has its own working-data store and workflow, and information is published onto the Gawati Portal System via a asynchronous message queue.

The above generates gawati-client-data-1.x.xar package in the build folder. Install it using the Package Manager in the eXist-db admin dashboard to manually select and install the package (see Installing Packages in eXist-db).
Alternatively, here is a video that shows how to install a package in eXist-db:

the user here is gawati-client-data which is the user with permissions over the /db/docs/gawati-client-data collection where we are storing the xml documents. The password for this user is generated during installation and stored in the /db/apps/gawati-client-data/_auth/_pw.xml file. The same instructions are shown in the video below.

Within the auth.gawati.local realm, navigate to the Clients tab. Click on gawati-client. Set the other parameters as shown below. In this case we have set the root url, valid url etc to http://localhost:3000 which is the dev mode host and port for Gawati Editor UI. If you are deploying on a domain e.g. http://www.domain.org you can set it to that domain.

Within the client, switch to the Credentials tab and regenerate the secret.

Switch to the Installation tab in the client section, and choose the format as KeyCloakOIDCJSON. Download the json file.

Open the dowloaded json file using your preferred text editor. Copy the variables auth-server-url to url and resource to clientId. It should look similar to the json shown below.

Finally, login as admin into KeyCloak and create some users. You can create test users like submitter, editor, admin and associate them with the groups client.Submitters, client.Editors and client.Admins .

Above: a user called submitter has been added.

Above: the user has been added to the client.Submitters group to give it the client.Submitter role.