Developer Client

The Credit Commons Developer Client code is available here.

The developer client php application implements the Credit Commons protocol from the client side and was developed in tandem with the reference node. Playing the role of ’leaf’ in a credit commons tree, it stores no data except perhaps login credentials.

Each API method is shown as a tab with a form, allowing the user to make most possible API requests. The request is then printed to screen along with the response. Some of the responses are rendered as raw json, others a bit more visually.

Requirements

  • A web server such as nginx or apache2 with rewriteEngine module enabled. Note that we had problems configuring Nginx so you might need to debug the autogenerated config file.
  • At least php 7.0
  • Mysql or mariadb.
  • Composer (php package manager). Install Composer
  • A web browser

Installation procedure on localhost

Set up a credit commons node as a server i.e. cc-server

Create a virtualhost in your web server config (examples below)

$ git clone https://gitlab.com/credit-commons/cc-client.git myccclient
$ cd myccclient
$ composer install

Modify /etc/hosts something like 127.0.0.1 myccclient

Navigate in your browser to the new virtualhost

The default users in the reference implementation are admin, alice & bob, each with auth key ‘123’

Example config

Apache

<VirtualHost *:80>
  ServerName myccclient
  DocumentRoot /var/www/myccclient
</VirtualHost>

Nginx

@todo What about .htaccess and nginx?