What is the ColorNet QRC Server?
The ColorNet QRC Server is a stand-alone web (HTTP) server process that receives and responds to requests for creating and managing Quick Response Codes (QR Codes or QRCs). It's primary use is powered by QR Factory, a macOS Application by Tunabelly Software, and provides the ability to utilize QR Factory to generate QRC codes from other (possibly non-Mac) computers on your network.
QR Factory provides enhancements over many "generic" QRC generators, and supports features such as colors, shading, embedded logos, text annotation, etc.
Click here for the full ColorNet QRC Server XML / JSON API
Why Do I Need a Server?
The primary purpose of the QRC Server is to use and integrate the generation of rich QRCs into other applications, and across other (possibly non-Mac) platforms. For example, an application running on a Linux server in the cloud can -- assuming that the proper network connectivity has been configured (e.g., VPN or firewall rules) -- generate and serve QRCs generated on a back-end Mac server to a user on the public Internet. Likewise, in a heterogeneous (Mac + Windows) environment, Windows desktop users can utilize a simple web client (example provded) or a command line tool (examples provided) to have access to rich QRC generation.
What If I Don't Have a Mac / Have Not Purchased QR Factory?
Although there are numerous applications and libraries for generating QRCs, this server is -- at least initially -- focused on the QR Factory macOS Application because of its stabiity (in use for almost 10 years) and its capabilities. Also, unlike comparable solutions available on the web -- most with advertising -- this server is designed to run independently from any 3rd party web site and does not require Internet connectivity.
However, if you do not have a Mac, or have not purchased QR Factory, the ColorNet QRC Server can fall-back to use an alternate QRC generator, although possibly with less functionality and capabilities. At of the current time, the open source qrencode comand line utility is also supported for generating QRCs, although without any formatting options.
What are the Requirements?
The ColorNet QRC Server requires Java 8+, and either QR Factory 3+ or qrencode. It has been tested on macOS and Linux, but should run on other placforms that meet these requirements.
How Do I Run the ColorNet QRC Server from the CLI (Command Line Interface)?
- Download the QRC Server (either tar or zip)
- Unpack the Archive:
$ tar xvf QRC-1.0.0.tar
or
$ unzip QRC-1.0.0.zip
- Run the QRC Server:
$ cd QRC-1.0.0
$ ./QRCServer run
- Configure the QRC Server
Starts automaticlly the first time run, can accept defaults for most values
(see below for configuration details)
How Do I Install the ColorNet QRC Server as a Service?
To install the QRC Server as a service in:
MacOS (using launchctl): /Library/QRC
Linux (using systemd): /opt/QRC
- Download the QRC Server (either tar or zip)
- Unpack the Archive
$ tar xvf QRC-1.0.0.tar
or
$ unzip QRC-1.0.0.zip
- Install the QRC Server as a Service:
$ cd QRC-1.0.0
$ ./QRCServer install
- Configure the QRC Server:
Starts automatically the first time run, can accept defaults for most values
*** Configuring Properties for QRC Server ***
If not sure about any property, it is usually safe to accept the default
provided in brackets ([ ]); to remove a property value entirely, provide
single space (' ')
Please provide an available port for the QRC Server XML/JSON REST API:
QRC Server HTTP Port: [9010]:
The Data File is a where QRCs accessible from the server are stored,
whereas the Working Directory is where QRCs can also be stored
outside of the server, i.e., on the filesystem:
QRC Server Data File: [/tmp/QRCServer.dat]:
QRC Server Working Directory: [/tmp/QRCServer]:
If you don't want QRC files accessible from outside of the QRC server,
then answer false:
Save QRC Files to Filesystem [true or false]: [true]:
QRCs are cached and accessible from the QRC Server only before the expiration
time, after which they will be removed and no longer accessible:
QRC Expiration Time (seconds): [86400]:
Provide any default QRC Factory properties:
Default QRC Appearance Properties: [OutputSize=200;PixelRoundness=1.0;PixelColorStart=#0000FF]:
MQTT is an optional message bus; if you don't use it, you can accept defaults
for the next two values:
MQTT Host: []:
MQTT Port: []:
Certain privileged QRC Server functions, such as shutting down the server,
require providing a password:
QRC Server Password: [secret]:
Debugging messages are helpful for diagnosing any problems:
Print Debugging Messages [true or false]: [true]:
How Do I Test the ColorNet QRC Server After Installation?
From a web browser (change localhost to the server name, if the browser is not on the same machine):
To display information about the server:
http://localhost:9010/XML/Info
To create a sample QRC for Google:
http://localhost:9010/XML/Create?text=http://www.google.com&redirect=true
How Do I Manage the ColorNet QRC Service?
From the service directory:
MacOS: /Library/QRC
Linux: /opt/QRC
To stop the service:
$ ./QRCServer stop
To start the service:
$ ./QRCServer start
To display the service status:
$ ./QRCServer status
To re-configure the service:
$ ./QRCServer config
To uninstall the service:
$ ./QRCServer uninstall
What Sample Clients Are Provided?
PHP Web:
Example:
o Local web server configured for PHP
o qrc_web.php deployed to /samples/
o Generating a QRC for Google
o 200x200 pixel QRC
http://localhost/samples/qrc_web.php
QRC Text: http://www.google.com
QRC Options: OutputSize=200
QRC Host: localhost
PHP Command Line:
Usage: php qrc_cli.php {server} {text} [{options}]
Example:
o QRCServer running locally
o Generating a QRC for Google
o 200x200 pixel QRC
$ php qrc_cli.php localhost http://www.google.com OutputSize=200
Node.js Command Line:
Usage: node qrc_cli.js {server} {text} [{options}]
Example:
o QRCServer running locally
o Generating a QRC for Google
o 200x200 pixel QRC
$ node qrc_cli.js localhost http://www.google.com OutputSize=200
Still To Do
The following QR Factory features are not currently supported:
- Add support for multiple QRCs in one request
- Add support for crypto
- Add support for social media
- Add support for SEPA (Single Euro Payments Area) money transfers
In addition, support for other QRC generators, and possibly support for qrencode formatting options, may be provided in a future release.