a simple bill splitter webapp
git clone https://www.aktsbot.in/git-web/panku-app/panku-app.git
# പങ്ക് - panku
A progressive webapp(PWA) for splitting bills between friends.
See it live: https://panku.one0.xyz
All data lives in the browser!
Users add their UPI id and note down activities that they have done
with their friends. Then can share UPI payment requests as QR codes per activity. Currently sharing is done via WhatsApp messages as a normal
deep-link i.e an `` tag.
At first I thought I could get away with sending a upi link in the message.
But it turns out, google pay, phonepe and the likes have started marking
*intents* from links as "insecure" and wont proceed with the payment.
A upi link looks like so
```
upi://pay?pa=iamrock@oksbi&pn=James%20Gilbert&cu=INR&am=25.00&tn=Goa%20Trip
```
We convert it to a QR code with the lovely [qrcode.react](https://www.npmjs.com/package/qrcode.react) package.
To run the project for the first time
```
$ npm i
$ npm run dev
```
## Notes
1. URL encoding / decoding funcions
https://meyerweb.com/eric/tools/dencoder/
```
function encode() {
var obj = document.getElementById('dencoder');
var unencoded = obj.value;
obj.value = encodeURIComponent(unencoded).replace(/'/g,"%27").replace(/"/g,"%22");
}
function decode() {
var obj = document.getElementById('dencoder');
var encoded = obj.value;
obj.value = decodeURIComponent(encoded.replace(/\+/g, " "));
}
```