PHP, MySQL, and Contact Management: Contacts 0.1

Posted: October 22, 2007 Comments(11)

I’ve always been a bit obsessed with keeping an up-to-date list of contacts. I think it goes hand in hand with the OCD I’ve diagnosed myself with when it comes to computers and my using them. One thing that seems to constantly come up in the office is a lack of client contact information. Different people have different ways of storing such information. Some have a physical address book, some keep everything on their computers, and others are able to remember everything they need.

I thought this little problem of mine would be a good reason to whip up a really simple address book we could run on our in-house server. The idea would be to keep an up to date listing of basic contact information for any clients we’ve ever done business with. It wouldn’t be anything spectacular, just an easy way to enter in basic contact information for people, and group them by their company. This past weekend, I fired up Coda and got to work.

Contacts. FOSS contact management.

Screenshot of Contacts 0.1

Contacts is a really simple application modeled after many desktop address books. When you bring it up, you’re given a list of entered contacts, as well as a list of companies that have been entered. Clicking a company name will limit the contacts list to only those contacts which are part of the selected company. Clicking a contact name will take you to a details page which contains information about the selected contact. This details page is (partially) equipped with hCard. At the bottom of the details page, you’re able to edit or delete the active contact.

I told you it was basic.

Contacts uses some icons from the famous Silk icon set, as well as an icon from the Tango icon set.

Getting on to the demonstration

The demonstration is the best part. You can check out the Contacts 0.1 Demo and see what it’s all about. The demo does have some restrictions you should know about. First and foremost, when you hit the demo, you’ll be asked for your name. This is used to ensure that any data you add/remove/edit will be seen only by you. Obviously this is a very simple solution, and there is a chance that two people could enter the same name. Please keep this in mind before entering any sensitive data. Also, the database will be purged on a regular basis to control table size. If your data goes missing while you’re checking out the demonstration, (hopefully) it’s just the clean-up process.

The live demo has been temporarily disabled due to a recent server change.

I can’t stress enough that this version is very early in development, so if you do happen to come across any bugs or awkward behavior, please take a few minutes to send me an email.

Contacts is definitely a work in progress

The 0.1 release of Contacts is definitely a work in progress. As Colin Devroe reminded me; “FOSS is always release early, release often”. I’m going to keep this in mind and mark this project as ‘live development’. In much of the same style as a live redesign, this project will [ideally] be updated often, and I’m going to chronicle the changes as I go along.

Download Contacts 0.1

To install Contacts 0.1, you’ll need a server running PHP and MySQL. You can then follow these steps:

  1. Create a MySQL database and user with appropriate privileges
  2. Extract the archive and copy the contents into an empty folder
  3. Edit config.php and enter the correct DB_NAME, DB_USER, and DB_PASSWORD
  4. Hit install.php in your browser (sets up table)
  5. Delete install.php

Feature Requests

As I was working on Contacts, there were a number of things that came to mind that I’d like to include as features go. My main goal with this project was to end up with a simple and lightweight contact management Web app, so I don’t want to bloat things with completely superfluous features. Some of the things I plan on adding:

  • Better hCard support
  • Multiple phone numbers
  • Phone number types (i.e. work, home, mobile, etc)
  • Multiple email addresses
  • Mobile version
  • Better search functionality (currently only works with single words)
  • Progressive enhancement via JavaScript
  • Optimized database structure

My list goes on, and I hope to implement these features as soon as possible. What other features would you like to see in Contacts? Is it something that’s of any use to anyone besides me?

Get my newsletter

Receive periodic updates right in the mail!

  • This field is for validation purposes and should be left unchanged.


  1. Ooo, a shout out!

    After reading through your list of feature requests I’m not so sure I have a ton to add at the outset. But here are some things I’d like to see added “long term” (and may even take the time to help you with should I get a few free moments):

    1. Export to vCard
    You can setup a permalink per contact (an address card if you will) then just push the URL of said card to Technorati’s Contact Service (eg. my vCard).

    2. Option to show and/or link to maps service.
    Typically a link would be created to open the current address in Google/Yahoo! Maps or Mapquest. However now that Google Maps can be embedded easily I think it’d be a nice addition.

    3. iPhone version
    Perhaps this is in your plans with the ‘mobile version’ you mentioned. The iPhone could easily navigate the current layout (since it has a full version of mobile Safari running Webkit) – but creating a simple look up and entry point for this application for the iPhone would be killer. I could see companies or family sharing a contacts database this way.

    4. hAtom for the hell of it?
    The main reason I think it’d be cool to add hAtom is so that coworkers or family members could subscribe to changes found in the database. If someone’s number is changed and/or a new contact is added to the database by one of the applications users – all other users would be notified via a feed.

    5. Data import / export / share.
    Obviously having some way to import my current address book would be killer. Also, exporting for backup or moving to another platform (or just into my address book) would be killer too. Exporting into vCard per card is ok but if we could have one big vCard with all contacts that’d be neat). This could be done pretty easily with a large list of all contacts on a single sheet marked up with hCard. Though that probably wouldn’t scale too hot.

    Sharing though – is something I think would be really neat. It’d be neat to create a community around this project and allow people to share their contact information through this system automatically importing anyone that shares their information into a new “company” called “shared contacts”. Quick and easy way to get in contact with other people that use this app. Just a thought.

    6. AIM / Skype contact information
    I suppose support for Yahoo!, MSN, Jabber, Gmail, etc would be a plus. But for me AIM and Skype information is crucial.

    This isn’t all – I will have more. Now you have wanting to help you out!!

  2. Great idea. Besides Colin’s great suggestions, I have a couple of things that came to mind.

    I don’t know if this goes beyond simple and lightweight, but it would be really cool to be able to specify a list of URLs (which may be RSS feeds, OPML, or pages that contain links to RSS feeds) that belong to a person. Then aggregate their RSS onto their contact detail page and aggregate all of your contacts RSS onto a main group page. This could be especially useful for things like Google calendar, for instance. In any case, this would probably be a low priority.

    Alternatively, it might be sweet to build in some sort of plugin mechanism, so people could add cool features without modifying the core.

    This is pretty exciting. It’ll be cool to see where this goes.

  3. Joe Lencioni: Excellent suggestion. Many address books allow for URLs to be placed in the contact card. Perhaps doing so would then automatically “look” for a XML feed to parse on demand. This way local caching mechanisms wouldn’t need to be too big but yet the “browser” of the contacts would be able to pull in any information they want.

    For instance… if someone finds the contact they are looking for – I could see it showing the latest few posts from their blog, photos from flickr, etc. – anything applicable.

    One step further would be to have links to various “tag searches” based on the persons name, company name, and perhaps location.

    The possibilities are seemingly endless – which makes your request for a plugin system all the more valid.

  4. Oooh, how about adding tags? That would open a bunch of new and interesting possibilities right there.

    It would also be sweet to be able to upload or link to an avatar, be it a photo or an icon or whatever. If you end up going this route, let me know–I have been working on a dead easy image resizing script and it might come in useful for something like this.

    The more I think about this, it’s starting to feel a little like your own personal Facebook.

  5. I’m working on a WordPress Plugin which handles stuff like that.
    There isnt an online version yet to show as its really beta.

    But got an updated version on my computer so might release the newest version after reading ur post here, maybe someone need it too.

  6. @Colin Devroe: WOW! Awesome ideas! I’m definitely going to add those to my task list for this project. Thanks so much for posting your ideas, I really appreciate it.

    @Joe Lencioni: Also some really great ideas, tags, plugins, and parsing would be really great to implement. Thanks!

    @raz!el: I say release it to the world!

    @Jason Simanek: I did in fact make the switch to OS X a couple months ago. I still work on a Linux machine from time to time because I really do love it as an OS. The trouble for me came down to a necessity to work in various Creative Suite applications for work. The ability to run a virtual machine is totally fantastic, but the amount of time I was spending in the sluggish environment started effecting my productivity. I plan on doing a writeup of the experience within the next few weeks. Thanks for posting!

  7. You can’t design something that is going to satisfy everyone… but you can design something that most people can (and will) use. My advice would be to stick to your guns and avoid all the superfluous enhancement requests made above. Keep it simple enough so most people can use it. The more features/enhancements that you add, the more people you will potentially alienate (since the majority of them won’t need these features). Go with the 37Signals approach! Less is more!

    Great work!

  8. Bit Americanised in the address field needs to be more open to other countries,

    the possibility of being in more than one “company”. would be useful for grouping

  9. @bombaru: I wouldn’t implement features simply for the sake of implementing them. Most of the suggestions offered here are quick and easy additions that could make the mini-app that much more useful. I definitely can agree with the ‘less is more’ mindset as well 🙂

    @daniel: You are absolutely right. In my own sub-par defense, the app was written to be used within the company I work, but I should have been more considerate and attentive before releasing it for use. I’ll definitely be sure to broaden the functionality of the address field in a future release. I appreciate your opinion.

Leave a Reply

Your email address will not be published. Required fields are marked *