On a monthly basis roommates have to split rent, electricity, gas, internet, cable, and food bills. One night out with friends can have numerous bills to split and can result in one friend paying more than they should. I wanted to create something that would keep track of how much each user pays and how much each user owes towards each bill so in the end every user pays what they owe and no one is left being owed money.

What it does

This app keeps track of how much each member has paid and how much is owed to each member. Multiple bills can be added and they can be split evenly or split in a specific way. When you are ready to settle up the app will tell you who pays who and how much so that everyone receives what they are owed.

How I built it

I built this using a linked list data structure in javascript. I created all of the methods and functions I would need then created the web page using html and css. I then linked all the buttons and input fields with the appropriate javascript functions to get everything working. I also added some checks that will throw out error messages to prevent the user from adding incorrect data and making the calculations off.

Challenges I ran into

I am not very experienced with javascript so I had to google many things to figure them out. I was also not able to figure out how to store the variables so they would not be lost after refreshing.

Accomplishments that I'm proud of

This is the first time I have built a website that required some back-end functionality. I have solved problems using java in school and have created basic websites, but this was the first time putting the two together.

What I learned

I learned a lot about javascript that I didn't know before. I was very beginner, but struggling with this project made me learn a lot very quickly.

What's next for click to split

I will figure out how to store the data so that it can survive a refresh. I will also work on the design to make it look nicer. I also plan on adding the functionality to settle the bill for a single user and continue with the remaining users. For example on a night out with friends, one may have to leave early so I would want to be able to close out the tab on that user while allowing the remaining users to continue to track their spending.

Built With

Share this project: