Ipfs exposes a JSON API locally. Not sure why the author didn't just use a JavaScript front end making calls to the local API.
EDIT: I'd encourage the HN community to look past the technical merits of the code, and focus on the idea presented (and even perhaps fork and contribute back an improved version).