IndieWebCamp is a 2-day creator camp focused on growing the independent web

Taproot

This article is a stub. You can help the IndieWebCamp wiki by expanding it.

Contents

Taproot

Taproot is Barnaby Walters’ publishing software. It’s written in PHP 5.4 and drives most of waterpigs.co.uk. It is not currently released to the public, although parts of it are:

Design Principles

In addition to the indiewebcamp principles, these are some principles I have discovered through building taproot.

  • Build software which feels safe, all other concerns (UI, UX, privacy, security) are secondary [1] — this is based on personal experience through selfdogfooding taproot
  • Easy things should be easy, remove friction so hard things are only has hard as they need to be [2]
  • Use event listener patterns to build upon the same data in intelligent ways [3]

Structure

Taproot has a highly modular structure. It is made up of an Application class, which handles event dispatching, simple dependency injection, routing and module loading. There are two types of modules — full modules, which expose URLs, and listeners, which listen to events dispatched within taproot.

Currently there are modules for Index, Notes, Articles, Contacts, Tunes, Tags and Mentions.

There are a large number of listeners which handle everything from authentication to POSSE and content transformation. Typically if I want to add a new piece of functionality I’ll do it in a listener, if I want to add a new content type I’ll create a new module.

Storage

Most modules store their data in a PDO-accessible database, with the partial exception of the Contacts module which uses the DB as a cache — the canonical data location is a CardDAV share.

As of 2013-03-24 I am tired of DB management and uncertainty, and am reimplementing a new CRUD library which will allow me to use files for data storage, and whatever DB I want for indexing --Waterpigs.co.uk 13:12, 24 March 2013 (PDT)

Notes

The Notes module is the mainstay of my Taproot usage. It handles the creation and display of short notes — kinda like tweets, but with a potentially much larger scope through the excessive use of tagging.

As in most of Taproot, the notes module handles basic CRUDL of data, and various listeners do everything else, including converting markdown, interpreting hashtags, autolinking @names, syndication of content.

Posting a note looks like this:

taproot-posting-ui.gif

A still of the posting UI just after the note has saved:

note-saved-ui.png

See Also