< BACK Balance

An application taking care of everyday expenditure and income Ruby on Rails | Heroku | Ai.api | SQLite | Travis

That was my first time coding with Ruby on Rails. After being graduated from QUT (Queensland University of Technoloy), I started getting my hands dirty on the popular frameworks out there. What we learned in uni was quite basic. We can code easily to meet the assignments requirements but people are not using those simple products in the real life. Thus, the next stage after graduating for myself is learning to use these frameworks and libraries. As a MVC framework, the core part of RoR is CRUD. Also, it’s a good point for me to get started.

Because of some reasons above and I trying to make it useful for myself, I decided to build an accounting application to basically record the daily expenditure and income, which also can be used to review the histories statistically. That is Balance.

Heroku is one of the most popular deploy platforms for RoR, which was used for this application, along with SQLite and Travis. One is for database management, one is for testing before deploying. The main reason is actually that I wanted to learn how it works in a workplace to deal with an web application from developing to publishing.

I didn’t work much on front end, which was mostly developed by Lennon. The back-end part is what I learned and researched.

The most surprising part of RoR to me is the plenty of gems I can install and just use it in the project. I’m probably making a too big deal about this, but it was my first time touching a package-based programming system. Instead of creating classes and implementing every function myself by PHP, this was so straight forward.

The user system is the first thing to consider. Devise was used to manage the authentication system. Everything was as smooth as it could be under RoR framework. Also, I’m using paperclip for user avatar storing (not linked to any cloud storage due to the budget).

Balance gif 1

So, CRUD includes books for different activities, categories for different kinds of expenditures and items for each specific payment. In fact, these has been done mostly by RoR and what’s left is defining the names, resources and routes of every item, which is quite easy.

Querying from the database is what to do next. It was a bit confused because of some difference between SQLite and Postgres. I’m using SQLite for developing and Postgres for production since heroku doesn’t appear to like the previous one.

Balance gif 2

Statistic review is one way to practice using queries with SQLite.

Balance gif 3

Overall, this is a simple application based on Ruby on Rails. It was a self-learning project but also a product used by myself.

After several months since it has been built, I heard about Google’s Api.ai. I decided to add a api interface to this application to enable a faster and more effective way of recording an expenditure.

Api ai

2017 © Kian Zhu