A roommate taking 3 eggs from me doesn’t bother me. Firing off a text, “Hey, I took 3 eggs” is all I need.
We really just don’t like to share these days. That’s the problem we are now solving it appears.
Live and let live is what I say. Writing code for yourself and your own problems is fun.
Yeah, capitalism took over the sharing economy and turned it into the gig economy.
0.25 per egg assumed the dozen cost $3 but what happens when I go to a value brand and my cost is $2 or the fancy $5 dozen eggs. Does the roommate have to update the price per item for everything they buy?
How do things like a bag of chips work? Cost per weight probably makes the most sense but the overhead of such a system seems enormous.
Also, what happens when your roommate gets mad at you because they bought those eggs for a specific meal they planned on cooking for dinner and now have to go to the store for more or change their plan? This is the main reason I most had a no sharing rule with my roommates.
To initialize an item, you take a QR code off a sheet of QR stickers (each one has a random v4 UUID as part of the web app URL) and choose a sharing method. In the case of eggs, I would simply enter whatever I paid for the eggs, and it is up to the roommate that scans the code to decide whether to take it or not.
There are four "sharing schemes" supported so far - share by quantity, by rotation (so someone can join the rotation to replenish something like a spice), by percent (so someone can offer/claim 25% of a leftover pizza), or the whole item (probably ideal for the bag of chips example).
The whole system is very hands-free and opt-in, and everything stays synchronized with Splitwise (I wanted to add some screenshots of that bit, but my roommate's names were all over - I might set up an example or GitHub repo for this project some day).
We noticed that we buy a lot of the same things (bananas, avocados, eggs, etc), so we implemented a system where anyone can stick a QR code onto something they want to share, and anyone else can scan it to record what they took. For example, this morning I pulled a carton of eggs out of the fridge, scanned it, recorded that I took 3, and a Splitwise expense was automatically updated between me and the person who bought the eggs (much easier and less awkward than handing someone 75 cents). Everyone is logged into the application via Splitwise OAuth, and all products/expenses/debts are automatically simplified within Splitwise and updated via the API - so the app is pretty much a wrapper over Splitwise specifically for granular sharing of food.