Orange Roster

August 20, 2010 12:00 am

Avatar Michael Snoyman

For the past few months, I've been writing a lot of code using Yesod. The problem is, this has all been on a proprietary project. Not only can I not open source the code for the site, I can't even show you the site. (I'm sure a little detective work would be enough to discover it, but even so you can't get past the homepage without an account.)

So this presents a little bit of a predicament for learning Yesod. There's a documentation site that has some screencasts, and I've started to work on writing a more detailed book, but sometimes you just need to see the code for a real live site to get a feel for things.

So I started putting together a site called Orange Roster, both to scratch a personal itch and to get out a real-life Yesod example project. The source code is available on Github. I know that I put the Facebook secret key in the repo; if anyone decides to abuse my Facebook application test account... well, you suck ;).

This project demonstrates the most recent "best practices" for laying out a large Yesod project, splitting up the code into multiple files, separating the Hamlet templates into separate files, and using Cassius and Julius. It depends on Yesod 0.5, which hasn't been released quite yet. This was in fact done on purpose: I'm using this project to smoke out the last few changes to be made to Yesod before releasing.

You don't really need to know what the point of the site is to benefit from the source code, but I'll give a brief description. I'm always irked that I need to log into Facebook to get someone's phone number. I actually keep a spreadsheet with a lot of people's phone numbers, but numbers change, and you don't always remember to put everyone's number in your address book/spreadsheet. All together, here are the annoyances:

So Orange Roster is a very simplistic website: you log in, create a profile, share your profile with whomever you want, and add entries to an address book. You share your profile via email addresses. If the user is in the system already, then you immediately show up in their "sharing" tab. Otherwise, they get an email invitation. And here's another great feature: sharing is unidirectional. I can share with you and you don't have to share with me.

The site is not done, and I'm not giving any guarantees on holding onto your data yet, but you can play around with it, experiment, and give me feedback. Here are some of the features I haven't yet implemented:

As stated, Yesod 0.5 is almost ready for release. I'm playing around with a few last-minute changes, such as persistent using the newly released enumerator package.

PS: My appologies if the site runs a bit slowly, I'm running it on an (apparently) very low-end VPS. I'll probably be switching providers before bumping this site up to beta status.

blog comments powered by Disqus