Balance Tracker and Maintaining a Community Module

It's been almost a full month since Balance Tracker was released to the Drupal community, and I think it's probably about time to mention it on our website, and try to provide a look into our experience maintaining a community module.

Balance Tracker is a module we wrote to handle user earnings and payouts for a client. The client had a website which paid a commission to users based upon sales, and they needed a way to track how much each user earned in commission, and to track when each user was paid out.

Balance tracker handles a large portion of the work above. It is composed of two sections: a simple API and a rather basic user interface.


The API was intended to be simple - it allows a few simple functions: a user may be credited or debited with an accompanying message, and a user's current balance may be fetched. There are also some functions to grab all the balance sheet entries within a given date range, but they were initially written in a specific way for the accompanying UI, and may not be of the greatest utility as general-purpose API functions.

User Interface

The user interface (screenshot) presents a balance sheet and two blocks.

The balance sheet is a log of account activity, optionally over a specified date range. This view shows the timestamp of the transaction, the message which accompanied the transaction, the amount the account was adjusted by, and the balance after the transaction was completed.

The first of the two blocks provided has a form which will allow an admin or user with the appropriate permissions to look up the balance sheet of a user by username. The second block, visible only while viewing balance sheets, allows the administrator to manually credit or debit a user's account.

Invite Commissions

Balance Tracker is intended to be used in conjunction with other modules which use the Balance Tracker API to credit and debit accounts. One example module, Invite Commissions, is included with Balance Tracker releases since 6.x-1.4.

Invite Commissions integrates with Invite and Ubercart. It creates a new conditional action for Ubercart which credits a user with a configurable commission when anybody that user has invited makes a purchase.

Community Support

In the past month, we've seen Balance Tracker get a warm reception from the Drupal community. According to the project usage statistics, there were at least 18 copies of the module running last week on various sites.

In addition to the usual incoming bug reports, the community has also led us to incorporate features into Balance Tracker that weren't necessary for the original client's usage, including full internationalisation of time, currency, and date formats, as well as translation templates so the module can easily be translated into other languages. Additionally, Views integration code was provided by kidrobot.

Overall, our experience maintaining a community module has been quite pleasant so far. We hope to continue to draw on community support we've seen so far.

In the meantime, we've seen this module grow and develop based on the community feedback we've gotten, both via the issue queues and direct contact. This continues to provide greater value both to the client who initially sponsored the module, and the community who appear to be getting good use out of it.