The Mithqál-Culator is a Mithqál Calculator (get it?) web application built with Svelte, Astro, and Tailwind CSS that allows users to calculate the value of gold and silver in various currencies in Mithqáls.
A Mithqál is a unit of weight usually used to measure gold and silver. One Mithqál is 3.642g. This calculation is useful for Bahá'ís who want to calculate the value of gold and silver in Mithqáls for the payment of the Huqúqu'lláh (The Right of God).
- Can copy the calculated value to the clipboard by clicking on the total price.
- Displays the date and time of when metals and currency values were last updated.
- Metals and currencies values update once a day (by calling
runMetalsAPI.js
in bun run build:prod) and timestamp value is then updated.
- Open the Mithqal Calculator in your browser.
- Enter the amount of metal in Mithqal(s) in the input field.
- Click on the button to switch between gold and silver.
- The calculated value will be displayed in the selected currency.
- Click on the calculated value to copy it to the clipboard.
The goal of this project was to build something that can be of service, and also practice coding and calling/handling APIs.
- Add a random Huqúqu'lláh quote under the calculation.
- Light/Dark mode switch.
- Language switch.
- SEO
To run the project locally (if you want?), use the following commands:
# Install dependencies
bun install
# Build the project
bun run build
# OR:
# Call the Metals API and build the project (for production)
bun run build:prod
# Start the development server
bun run dev
The application uses an API to get the current values of gold and silver (from Metals.dev). The API is called in the runMetalsAPI.js
script.
- Astro (Meta Framework)
- Svelte (JS Framework)
- Tailwind CSS
- Bun
- Prettier
- Github Actions
- Netlify
Contributions and feedback are welcome! Feel free to open an issue!