DEV Community

Cover image for React PWA: Salary per time calculator
Alex Parra
Alex Parra

Posted on

React PWA: Salary per time calculator

This weekend I took on automating something many of us probably do over and over... (at least I do).

Problem:

If I make x€ per hour how much is that per year in £?
If I make y$ per year, how much is that per month in €?

Solution:

A pwa that calculates all other values when I change one of them.

App: https://alex-parra.github.io/salary-per-time-calculator/

Repo: https://github.com/alex-parra/salary-per-time-calculator

TODO

  • favicon images
  • local storage
  • ??

Top comments (13)

Collapse
 
ahmad_sanwal_f4f108f08e6c profile image
Ahmad Sanwal • Edited

Great walkthrough. I especially like that the article points out the difference between a working demo and a production-ready MCP service. The process-local session map is easy to understand for a small example, but authentication, session expiration, request validation, and protection against session-ID leakage become important as soon as the server is exposed beyond localhost.

Another useful improvement would be to add structured logging around tools/call request without logging sensitive session informatio so developers can distinguish transport errors, tool execution failures, and incorrect model reasoning. Keeping the tool layer deterministic while leaving semantic decisions to the agent seems like a solid architecture for experimenting with MCP in Dart.

Collapse
 
daviddalbusco profile image
David Dal Busco

That background slowing varying between colors, that's the kind of attention to the details I really like! Well played Alex 👍

Collapse
 
shozab_adeel profile image
Shozab

Hey Alex, this is a super useful project. I’ve been working on something kind of related, more focused on German users who need to calculate work hours and wages accurately. It’s a full-featured Stundenrechner that handles time differences, break deductions, decimal conversions, and even helps estimate hourly wages from salaries. Yours feels more cross-currency focused, which is great, but this might complement it well if anyone needs something more tailored to working hours.
Regards,
Shozab

Collapse
 
simonholdorf profile image
Simon Holdorf

Nice, keep going :)

Some comments may only be visible to logged-in visitors. Sign in to view all comments.