Demonstration
-------------

The demonstration requires taskd and an installed copy of Taskwarrior 2.3.0 or
later.

Follow these steps:


Build / Install
---------------

Follow these commands to build and install taskd.

  $ git clone https://git.tasktools.org/scm/tm/taskd.git taskd.git
  $ cd taskd.git
  $ cmake .
  $ make
  $ cd test
  $ make
  $ ./run_all

Note that the tests are all expected to pass.  If they do not all pass, do not
install taskd.  Please report the failures.

  $ cd ..
  $ sudo make install

Run these commands to verify your installation:

  $ taskd --version
  ...
  $ taskd diagnostics
  ...
  $ taskd
  ...

You should see a version, copyright and license information.  The diagnostics
option provides details about the build environment.  The last command should
present a list of commands that can be run.


Create Keys and Certs
---------------------

The server and client communicate using Transport Layer Security (TLS), which
requires certificates and keys.  Generate these using:

  $ cd pki
  $ ./generate
  $ cd ..


Setup and Run the Server
------------------------

It is recommended that you run the server and the client in separate windows.
In the server window, the setup script creates a server instance, with an
organization ("ORG") that has a group ("Group Name"), and two users ("USER",
"User Name").  There is also a suspended organization ("ABC Corp").

  $ cd demo/server
  $ ./setup

Run the server:

  $ ./run

Note that the server is not run as a daemon, so use Ctrl-C to kill the server,
when the client tests are complete.


Setup and Run the Client
------------------------

In the client window, the client tests are a set of simulated transactions.
First setup the client:

  $ cd ../client
  $ ./setup

You can run all the tests at once:

  $ ./run

Or you can run them individually, and see what's happening:

  $ ./case1
  $ ./case2
  $ ./case3
  etc


Test interface
--------------

There is currently a test client interface, used for further testing.  This may
be removed before release.  In the meantime it serves as a means to send
requests to the server.  The requests are fully-formed API messages, in files,
sent using the 'client' command.

  taskd client localhost:53589 stats.0
  taskd client localhost:53589 sync.1

---
