This article describes a TDD (Test Driven Development) approach to implement a Finite State Machine (FSM) using PHP+Laravel. However, such method is general and could be used in the programming language of your choice.
Learn how to use a relational DBMS as authentication provider for Shibboleth IDP instead of default LDAP
Learn how to write Shibboleth IDP logs to a database instead of simple text file
More than once I needed to render a laravel view as a downlodable file. This task could be easily accomplished