DEV Community

devthink Toomuch
devthink Toomuch

Posted on

How I built a zero-backend cross-border fee calculator in a single HTML file

Many fee calculators online have too many additional features. Whether you’re a freelancer or selling internationally, it can be super frustrating to lose between 3-5% of your earnings due to unseen foreign exchange fees from Stripe/Paypal/SWIFT. True Net Calculator allows you to calculate accurate net earnings in one single file, quickly.
Architecture
No build process. The app is contained within the index.html file. We are using React, Babel Standalone and Tailwind (from CDN).
Maths on the frontend The structured fee lists and FX rate matrices mean we can instantly calculate new results as a user types. There is no delay by connecting to an API.
Hosting This was deployed on Cloudflare Pages, pulling from GitHub. This means it can be cached instantly at all edge locations. It costs nothing to host.
Try it out! Here is a working version of this calculator:
https://truenetcalculator.pages.dev/
Please comment below how you perform multi currency fee calculations in your own work. Or, if there are any edge cases that should be added.

Top comments (0)