Inspiration

As any good hacker, I have tons of ideas buzzing through my head with a new one popping every month or so. But I never seem to have the time to work on them, which is the reason why I go to hackathons as it's a way to site down for 48h, forget responsibilities of everyday life, and work on a project I'm passionate about. From this problem I've thought of another solution: what if I put only 30 minutes a day on working on personal projects, every day. Surely 30 minutes won't stop me from accomplishing my school work and my professional work and I would see a lot more of my ideas come to life.

Therefore, as a way to force myself to adopt this habit, I figured I would attribute a financial penalty to my laziness and force myself to regularly push some work on github. But obviously I didn't feel like giving my money away into something useless, therefore the idea of donating that money to a charity came to be. This way I wouldn't feel bad and I won't quit after the first loss. It's quite literally a win-win.

I'm also very competitive so I've added a gamification aspect to the app. You can challenge another user and if they accept, at the end of the challenge, the one who performed best gets to keep their money and the other gets to be a good samaritan and have the satisfaction of knowing they did their best.

What it does

The user logs in through their github account and starts by entering credit card information. Then they would set their goal for improvement, this includes a target number of commits per day/week/month, the size of the financial penalty and if this should be a repeated event or not. The user can also set up challenges with other users of the app. But other than that most of the app runs in the background and doesn't need the user's feedback. From then on the user must only focus on using github as much as possible.

How I built it

It was built with a NodeJs backend for keeping track of models such as users, credit card information, challenges and goals. The credit card information is tokenized and encrypted with Stripe to make sure that there are no security issues. The Challenges and Goals also contain the user's id and credit card information as jobs that are gone through at a regular interval thanks to a cron job that executes transactions for those that have expired and are marked as failures. If the target is reached nothing is done and there is no need to pay the Stripe API fee.

Challenges I ran into

I wanted to build this app to get familiar with Angular as I've almost exclusively used AngularJS and the user Observables was odd and hard to grasp at first. Also Stripe's documentation is very confusing and somewhat limited to Angular. Probably due to how recent the technology is. Also recuperating the number of commits for each month required some thinking considering they are stored per week for the 52 weeks in a year.

Also, I've worked on this task by myself. Front end, back end and design it was fun to get my hands into all aspects of an app, but it's very tiring.

Accomplishments that I'm proud of

Well, I finished it, when using new technologies and with time to spare. Also, this is something that I want to use in everyday life and I can't wait to do so once I have time to polish it for production, I hope others will see it's valued as well.

What I learned

OAuth tokens are really neat. Observable follow a completely different pattern than promises. Data modeling on MongoDB is odd and I need to look into some NoSQL Database modelling. Clean code is worth the time. Making things quick and dirty ends up wasting time more than anything.

What's next for Self.commit

This is a hackathon so there's a lot of tasks that were glossed over as they don't make the app visibly better, for example, authentification for api routes as well as front-end routing. Also a lot of polish is needed, which does make the app look better.

For example, there is a need to build a more robust API instead of reusing the same route multiple times even if it ends up creating very large packets.

Also need to add as many charities as possible, and also there's a possibility to expend this concept to other communities, not just Github but also Dribble or Medium to motivate other kinds of creators to follow their passion. This concept can even be applied to sports to encourage people to go out running or go to the gym by measuring how many times they are located at their gyms geo location, or how much of a distance was ran each day. This can also be applied for responsible financial planning by depositing the money into a 401k account or something instead of charities. There is also the classic raffle system, but I would be against that.

Share this project:
×

Updates