Create and Deliver Invoices Online with IBM Bluemix and PHP

At the end of every month, I sit down for a couple of hours to create and send out invoices to my customers. Up until very recently, this involved opening up an invoice template in a word processor, entering the date and invoice number, adding up the hours worked, and calculating the total and any taxes. I’d then export each invoice as a PDF and email it out. As if that wasn’t bad enough, at the end of each accounting year, I had to review a directory full of PDF files to calculate how much I’d earned, if any invoices were unpaid, and how many projects I’d completed.

Sounds tedious? It was.

A few months ago, I decided I needed a better, less annoying approach. I decided to create a Web-based invoice generator, one that would need only the minimum necessary information from me and would take care of everything else (including generation, delivery and reporting). Since the plan was to eventually release it as an open source project for anyone to use and since every firm has its own invoice format, easy customization of the invoices was also a key design factor.

It didn’t take long to come up with a working prototype and go from there to the finished product. The final version of the application asks for basic invoice details (which customer, what was purchased, for how much) and then created a PDF invoice by merging this input with an HTML template. The template is fully customizable (so long as you know HTML, you can add your own logo, fonts, colours and layout) and the final invoice is saved online, sent to the customer via email and can be exported as a PDF file on demand. Oh, and it’s fully mobile-optimized too, so you can bill a customer with just a few keystrokes even if you’re travelling…

Here’s a sample invoice:

To make reporting and management easier, I wrapped a couple of views around the information in the database:

I used a bunch of different tools to create this application:

If you’re looking for a better way to do invoices, try the live demo or fork the code on Github and use it for your own business. If you’re interested in finding out how to deploy or customize the application, read my developerWorks article for the full details.

Build a Mobile Web App for Assisting Stray Dogs

Ever seen an injured stray on the side of the road and wished you could help, but didn’t know who to call? A couple of months ago, I started thinking about how technology could help address this problem. I began to imagine a mobile application which anyone could use to quickly report injured or ill strays to a central database, including photos and GPS locations. This information could then be used by rescue agencies dedicated to stray assistance.

The more I thought about it, the more viable it seemed. After a few experiments, I had the basic user interface ready and a MongoDB database provisioned to receive user reports (with GPS coordinates automatically included). I added an option for users to attach photos from their device cameras to their reports, and hooked it all up to the Google Maps API so that every report could be correlated with a visual map location. A few minutes later, and it was live on Bluemix.

Here’s what the reporting form looks like:
stray-report
And here’s an example report cross-referenced with Google Map data. This additional information makes it easier to locate the animal being reported.
stray-map
Try the prototype out, or fork the code on Github and use it for your own neighbourhood or city. If you’re interested in finding out more, read my developerWorks article, which walks you through all the technical details.

Create a Browser-Based PDF Storage and Search Application

Like most people, I send and receive a lot of documents over email, and the vast majority of those are in PDF format. Over the last few months, I’ve been playing with the idea of moving all these documents into a single location and building an application to automatically index them. This would not only make it easier to find a specific one quickly, but also simplify backing things ups.

Fast forward to last week, and I was reading about some of the Watson services in IBM Bluemix. It occurred to me that it would be fairly easy to combine the Watson Document Conversion service with the AlchemyAPI Keyword Extraction service to automatically turn PDFs into text and then extract keywords from them. I could store the keywords in a database and wrap a search interface around it to create a fairly neat little PDF storage/search application.

As it turned out, it worked exactly as I’d thought it would. A few hours of coding and I had the skeleton of a working application. A few more hours to hook it up with a couple of data stores (MongoDB for the keywords, a Swift object store for the actual PDFs) and add a pretty GUI, and my application was live on Bluemix.

The final version lets users select and upload PDF documents from their computer. As each document is uploaded, it is automatically and intelligently scanned for keywords and those keywords are extracted and stored in a database. Users can later search by keyword to quickly identify and download documents relevant to their needs. Needless to say, it’s all mobile-optimized, so you can get to your documents from both your smartphone and your desktop computer.

Here’s an example of what it looks like in action:

pdf-keyword-search
Try the prototype out, or fork the code on Github. If you’re interested in finding out more, read my developerWorks article, which walks you through all the technical details.