Lots of companies have fridges with special drinks at low costs for employees which are maintained by volunteers. Operating those fridges is time consuming and often results in large bags of coins.
SmartFridge is a laster-pay web app that makes operations easier. Purchases are stored in a database, user can review their purchases and make payments (eg. with PayPal) whenever they want in their profiles. This provides a constant cash flow for continuously buying new drinks. There is also an email system attached, reminding users of payments. No more tally charts, no more coin boxes! Digitalize your frigde!
How to make purchases? The app provides a public REST endpoint which can be triggered with a user ID. At the moment every purchase is € 1,00. Here are some ideas on how to call the API:
- A Raspberry Pi attached to the fridge with an RFID reader that reads the customer's ID and call the endpoint. (That is what I do - see my smart-fridge sensor project).
- The same but with NFC and the customer's phone instead of an RFID card.
- The same but with a fingerprint reader.
- An app on the customer's phone with a button that triggers an endpoint call.
- Something even nerdier?
The web app provides a user side (user purchase and payment history) and an admin side (confirmation of payments, user CRUD, dashboard). Users have a unique secret link instead of a username/password login.
This web app works fine with Heroku, Heroku Postgres and Sendgrid.
- Create a
config/adminList.jsfrom the template. Those are the admin accounts. - Create a
config/databaseConnection.jsfrom the template. It has to be Postgres. - Create a
config/mailProvider.jsfrom the template. Sendgrid works fine. - Edit the
services/mailService.jsif you want to use different email contents. - Setup your payment information by creating
frontend/scripts/config/paymentMethods.tpl.htmlfrom the template. - Setup your frontend translation by creating
frontend/scripts/config/i18n.jsfrom the template.
- run
npm install - Provision the database by running
npm run provision
- run
npm installinfrontend - run
grunt buildinfrontendto build the frontend
- start the backend with
npm run start - start the frontend with
npm run startinfrontend
- run
grunt buildinfrontendto build the frontend - run
npm run start(or simply push to Heroku)





