The Sinatra Songbook Project

Cards in the Cloud

I’ve just finished my first full Sinatra project to go live and thought I’d share it with my fellow Crooners.

Cards in the Cloud is a web app that lets you send e-cards without all the usual fluff associated with those kind of sites (like tacky music, annoying animations and loads of intrusive adverts). I decided to build the site to scratch my own itch because I could never find a site that would just let me send cards without trying to spam me or get me to sign up for something.

I built it using Sinatra and DataMapper and used Haml to produce HTML5 that made use of the new header and footer elements as well as the new form input attributes such as placeholder and type='email'. I also used a lot of the new CSS3 rules, such as transformations, text-shadows and gradients. Despite this, it seems to degrade gracefully in Internet Explorer. I also used some fonts from the Google Web Fonts and a nice little JavaScript library called reflection.js to add the reflection effect. The site is hosted on Heroku.

Building a site using these technologies was a pleasure. It is so easy to get projects started in Sinatra - the initial version was just a single 100-line ruby file. And deploying on Heroku is quick and painless.

I had a lot of help along the way - particularly from the helpful people who answered all of my (often stupid) questions on the Sinatra and DataMapper Google Group Sites.

I am pleased so far with how it has turned out. My aim was to make the site as simple as possible to use and I hope that it turned out that way - you should be able to send a card with just a few clicks and a minimum of fuss. You can also personalize the cards by changing the title to whatever you want. I’m really pleased that a year after starting out with the aim of learning Sinatra, I’ve been able to launch a working web app online.

There’s still lots for me to do and I will keep trying to develop the site further. In the future I would like to add the ability to send cards at a later date and send repeated cards (so you never miss any birthdays). A big aim is to have some sort of optional micropayments to charity so that people can help to support charities as they send cards, although I’m not sure how that can be implemented at the moment. And obviously I want to get more card designs on there.

I plan to write about how I built the site on this blog over the coming months.

Please give it a try and let me know whay you think in the comments. If you have any ideas or find any issues then I would love to hear from you.