This project is a Svelte application that allows users to compare the cost of using fuel (gasoline or diesel) versus electricity for their vehicles. The application fetches real-time fuel and electricity prices from APIs and performs calculations based on user inputs such as fuel type, fuel consumption per kilometer, and energy consumption per kilometer.
The project will be divided into several Svelte components for better maintainability and readability:
Switch.svelte
: A reusable switch component for selecting the fuel type.FuelCard.svelte
: Handles the fuel-related inputs and calculations.ElectricityCard.svelte
: Handles the electricity-related inputs and calculations.ComparisonCard.svelte
: Handles the comparison between fuel and electricity costs.To run this project locally, follow these steps:
git clone https://github.com/jvik/elbilkalulator.git
cd elbilkalulator
npm install
npm run dev
Contributions are welcome! Please read our contributing guidelines to get started.
This project is licensed under the MIT License. See the LICENSE file for details.