A comprehensive web-based conversion utility built with Blazor WebAssembly and .NET 8 that focuses on Indian and international units of measurement.
- Land Area Conversions: Convert between hectare, square meter, acre, square kilometer, square foot/feet, square yard/yards, square guz, square bigha.
- Weight Conversions: Convert between kilogram, gram, pound, ounce, tonne, stone, milligram.
- Currency Conversions: Convert between USD, EUR, INR, GBP, JPY, AUD, CAD, CHF with real-time rates.
- Gold Price Calculator: Get current gold prices in different units (gram, tola, ounce, kilogram, pound, carat) and currencies.
- Modern UI: Responsive design.
The solution consists of two main projects:
- Backend services handling all conversion logic
- RESTful endpoints for all conversion types
- External API integration for currency and gold price data
- Client-side Blazor application
- Modern responsive UI with Bootstrap
- Seamless integration with the backend API
- .NET 8 SDK
- Visual Studio 2022 or later / Visual Studio Code
-
Clone the repository: git clone https://github.com/yourusername/IndianUnitsConversion.git cd IndianUnitsConversion
-
Run the API: cd ConversionAPI dotnet run
API will be available at
https://localhost:7001 -
Run the Frontend (in a separate terminal): cd ConversionFrontend dotnet run
Frontend will be available at https://localhost:7106
Supports conversions between:
- Hectare
- Square Meter
- Acre
- Square Kilometer
- Square Foot/Feet
- Square Yard/Yards
- Square Guz
- Square Bigha
Supports conversions between:
- Kilogram
- Gram
- Pound
- Ounce
- Tonne
- Stone
- Milligram
Supports conversions between:
- USD (US Dollar)
- EUR (Euro)
- INR (Indian Rupee)
- GBP (British Pound)
- JPY (Japanese Yen)
- AUD (Australian Dollar)
- CAD (Canadian Dollar)
- CHF (Swiss Franc)
Supports weight units:
- Gram
- Tola (11.66g)
- Ounce (31.10g)
- Kilogram (1000g)
- Pound (453.59g)
- Carat (0.2g)
And currencies:
- INR (Indian Rupee)
- USD (US Dollar)
- EUR (Euro)
- GBP (British Pound)
Backend:
- ASP.NET Core 8
- C# 12
- RESTful API design
- Entity Framework Core with SQLite
- HttpClient for external API integration
Frontend:
- Blazor WebAssembly
- Bootstrap 5
- Bootstrap Icons
- Custom CSS
| Endpoint | Method | Description | Request Body | Response |
|---|---|---|---|---|
| Land Conversion | ||||
/api/LandConversion/convert |
POST | Convert land area units | {"value": 10, "fromUnit": "acre", "toUnit": "hectare"} |
{"convertedValue": 4.04686, "fromUnit": "acre", "toUnit": "hectare", "landId": "guid"} |
/api/LandConversion/units |
GET | Get supported land units | None | ["hectare", "square_meter", "acre", "square_kilometer", ...] |
/api/LandConversion/history |
GET | Get land conversion history | None | Array of conversion records |
| Weight Conversion | ||||
/api/WeightConversion/convert |
POST | Convert weight units | {"value": 100, "fromUnit": "gram", "toUnit": "kilogram"} |
{"convertedValue": 0.1, "fromUnit": "gram", "toUnit": "kilogram", "weightId": "guid"} |
/api/WeightConversion/units |
GET | Get supported weight units | None | ["kilogram", "gram", "pound", "ounce", ...] |
/api/WeightConversion/history |
GET | Get weight conversion history | None | Array of conversion records |
| Currency Conversion | ||||
/api/CurrencyConversion/convert |
POST | Convert currency amounts | {"amount": 100, "fromCurrency": "USD", "toCurrency": "EUR"} |
{"convertedAmount": 85.20, "fromCurrency": "USD", "toCurrency": "EUR"} |
/api/CurrencyConversion/currencies |
GET | Get supported currencies | None | ["USD", "EUR", "INR", "GBP", ...] |
/api/CurrencyConversion/history |
GET | Get currency conversion history | None | Array of conversion records |
| Gold Price Calculation | ||||
/api/GoldPriceConversion/calculate |
POST | Calculate gold prices | {"weight": 10, "unit": "gram", "currency": "USD"} |
{"pricePerGram": 63.25, "pricePerUnit": 63.25, "totalPrice": 632.50, "unit": "gram", "currency": "USD"} |
/api/GoldPriceConversion/units |
GET | Get supported gold weight units | None | ["gram", "tola", "ounce", "kilogram", ...] |
/api/GoldPriceConversion/currencies |
GET | Get supported gold price currencies | None | ["INR", "USD", "EUR", "GBP"] |
/api/GoldPriceConversion/history |
GET | Get gold price calculation history | None | Array of conversion records |
| Conversion History | ||||
/api/ConversionHistory |
GET | Get all conversion history | None | Array of all conversion records |
/api/ConversionHistory/types |
GET | Get all conversion types | None | ["Land", "Weight", "Currency", "Gold"] |
/api/ConversionHistory/{type} |
GET | Get history for specific conversion type | None | Array of conversion records for specific type |
- Add more Indian traditional units
- Add temperature conversion
- Adding unit tests
- Add volume conversion
- Add offline mode support
- Add historical conversion data
- Implement user accounts to save favorite conversions
This project is licensed under the MIT License - see the LICENSE file for details.




