Skip to content

sitarane/piggy-bank-2000

Repository files navigation

piggy-bank-2000

Allowance for kids, but more futuristic. Would have been a great dot-com bubble startup.

In a nutshell

I made this app because I kept forgetting to give his allowance to my son every Saturday. It's the same amount every week, this should be automated!

Now, instead of giving cash regularly, you just increment a debt. You'll owe your kids money, they can use you as an ATM, this app keeps track of how much you owe them, and how much they already pulled.

When they ask for 10 bucks, you give it to them and record the withdrawal.

PS: the app assumes a progressive allowance in Euros per year of age. The allowance automatically increases every birthday. For example, a 6 year old kid would get, say 3 € a week, but when they're 10 years old, it's 5 a week.

Setup

Clone the repo

Create an .env file

The app expects the following variables: SECRET_CODE, ALLOWANCE, DATE_OF_BIRTH and START_DATE

For example:

LANGUAGE=en SECRET_CODE=password
ALLOWANCE=0.25 # euros per year of age
DATE_OF_BIRTH=2013-02-01
START_DATE=2021-01-01 # on what date they got their first allowance

Build the container

For running locally:

docker build --target dev -t localhost/piggy-bank-2000:dev .

Set up database

docker compose run --rm web rails db:migrate

Start the app

docker compose up web