The starting source code is available here on GitHub.
The ending source code for this module is available here on GitHub.