SignPuddle 3 Source


The SignPuddle 3 source is written in ApiTxt Format, a custom text markup used to define a RESTful API. Each line in an ApiTxt document is a self-contained element which starts with a name and is followed by separated fields.

AUTHOR: https://SteveSlevinski.me
SUPPORT: https://www.patreon.com/signwriting

Background

While learning to code a RESTful API using the Slim Framework v2, I discovered API Blueprint.

Trying to understand how a RESTful API is structured, I created the ApiTxt Format, a custom markup using plain text lines with tab separated fields.

Automation

Automated tools are used to parse, analyze, validate, and transform the source into a variety of formats.

  • ApiTxt Format
    • JSON Objects
      • ApiTxt Format
      • Server
      • API Pages
      • JavaScript
      • API Blueprint
        • HTML
        • Lint
        • Mock

The first transformation reads the ApiTxt Format document and writes an array of JSON Objects.

ApiTxt Format
OK

The second transformation reverses the process by reading the array of JSON Objects and writing an ApiTxt Format document with standard order and indenting. The original ApiTxt Format document is compared to the new ApiTxt Format document.

Nicely formatted!

With the ApiTxt Format validated, the array of JSON Objects is used for additional transformations.

API Blueprint has excellent tooling. This project makes use of an API Blueprint tool called Snowboard to generate HTML documentation, to check for errors with Lint, and to mimic a real API server with Mock.