Friday 6 April 2012

Fuel: a Ruby on Rails app

After completing the Software as a Service course and the Ruby on Rails tutorial guide I thought it was about time to start putting what I had learned into practice.
I'd spent several days thinking about what I wanted to create, had several complicated ideas then (prompted by filling the car with petrol) decided on an app to monitor fuel consumption.
So far I have created some screen layouts while thinking about what I want the app to achieve.

Initial Screen layouts

Homepage

There will be a homepage with possibly some statistics on the data held, although what I don't quite know what - perhaps something line the total spend on fuel in the past month compared to 12 months ago.

Sign up

A means to register on the site. Every site needs one, unless all the data is to be made public. I didn't seriously think about that at all.

Sign in

A means for a user to recover a forgotten password would be helpful here, it's a feature I certainly have used several times on various websites.

Users homepage

To show details of the vehicles operated by the user. Initial builds may restrict to a single vehicle.
Summaries of the fuel usage to be included here.

Vehicle details

The screen to show the details of fuel used for the vehicle.
A history of the fuel used and some comparisons with 3/6/12 months ago might be interesting.

Fuel upload

The means of adding the fuel used to the database.
Not much point without including this!

What else?

The means to allow another user to upload fuel details might be useful (I know it would for me), and that would need some form of authorisation scheme, along the lines of friend requests on social networking sites.

Top Down Design

I intend to use a combination of Cucumber feature lists and rspec specifications to ensure the app is working the way I intend. This will also help reduce the risk of a change breaking the site without being noticed.
I did notice something interesting: I have written one user script for logging into the system, and I currently have 100% code coverage. Although as I don't have any lines of code in the system, that's quite easy to achieve.

The next steps

They are going to be to create further rspec and cucumber test scripts and implement the user sign in model, followed by adding vehicle details and then adding fuel loads.
I have a fairly comprehensive list of all of the fuel I have put into my current car going back several years since I first bought it (about a week before I started dating my girlfriend).
The source code is currently sitting on a github repository, with the first build pushed to heroku, although I'm not planning on publishing the url for the moment.

No comments:

Post a Comment