Take a break from gaming with the help of loss aversion.
Games can be quite addicting! Even when you have an important deadline coming up, you might not be to resist slaying the next dragon or getting new loot.
By committing to pay a charity 'x' amount of dollars if you fail to take a break from playing, it might give you that extra bit of motivation you need to resist playing.
**Note that Potion Break is still in testing and no real money is involved! Use test cards such as '4242 4242 4242 4242' for testing.
3 Steps to Potion Break:
- Customize your Potion Break - Options include game, charity and duration
- Go AFK! - Spend your extra time learning a new hobby, studying for that test or playing some basketball.
- Sucessfully take a break? Save your hard earned cash.
Give in to temptation? Lose your money to the charity of your choice
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
What things you need to install the software and how to install them.
For development, you will only need Node.js (v14.8) and a node package manager installed in your environment.
-
Just go on official Node.js website and download the installer. Also, be sure to have
gitavailable in your PATH,npmmight need it (You can find git here).
If the installation was successful, you should be able to run the following command.
$ node --version
v14.8
$ npm --version
6.14.5
$ git clone https://github.com/HalfLife7/potion-break
$ cd potion-break
$ npm install
$ knex migrate:latest
$ knex seed:run
Open potion-break/.env.example then edit it with your settings and rename to ONLY '.env'. You will need:
- STEAM_API_KEY - https://steamcommunity.com/dev/apikey
- STRIPE_API_KEYS - https://stripe.com/docs/keys
$ npm run start
app will be hosted at localhost:5000/
- NodeJS - Server Environment
- Express - Server Framework
- PostgreSQL - Database
- Knex - SQL Query Builder
- Objection - ORM Built on Knex
- Bulma - CSS Framework
- mustache - Templating
- fancybox - Media Lightbox
- swiper - Media Carousel
- Flatpickr - Datetime Picker
- Babel - JavaScript Transpiler
- axios - HTTP Client
- Passport - Authentication
- Bottleneck - Rate Limiter
- cron - Scheduler
- date-fns - Datetime Library
- Stripe - Payment Processing
- Steam - Steam API
- Big thanks to anyone whose code was used (acknowledged in code comments)
- Pocket Article on Killing Bad Habits for initial idea - https://getpocket.com/explore/item/the-behavioral-economics-diet-the-science-of-killing-a-bad-habit
- stickK for an example that loss aversion works - https://www.stickk.com/
- Images used are attribution free from unsplash.com and pexels.com
