https://github.com/macolmenerori/electrocalc
Electricity consumption cost calculator
https://github.com/macolmenerori/electrocalc
calculator consumption electricity electricity-consumption energy
Last synced: 5 months ago
JSON representation
Electricity consumption cost calculator
- Host: GitHub
- URL: https://github.com/macolmenerori/electrocalc
- Owner: macolmenerori
- License: mit
- Created: 2025-06-18T08:47:09.000Z (12 months ago)
- Default Branch: master
- Last Pushed: 2026-01-15T12:09:10.000Z (5 months ago)
- Last Synced: 2026-01-15T16:18:08.551Z (5 months ago)
- Topics: calculator, consumption, electricity, electricity-consumption, energy
- Language: TypeScript
- Homepage: https://electrocalc.miguelangelcolmenero.es/
- Size: 3.77 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
README
# electrocalc
This is a web application for calculating electricity costs.
Try it out [here](https://electrocalc.miguelangelcolmenero.es/)
## How to use
1. Access the app
2. Insert the power of the load (in W)
3. Insert the price of the electricity (in €/kWh)
4. Press _calculate_
5. The results are shown on a table
## Run locally
### Requirements
- Node JS `>=24.0.0`
- [PNPM](https://pnpm.io/installation) `>=10.12.1`
### Run
First, install the needed packages with
```bash
pnpm i
```
Then, start the app with
```bash
pnpm start
```
The app should be available in `localhost:3000`
## How to contribute
1. Clone the repo, create a branch and do the desired changes
2. Open a PR and wait for review
Before creating the PR ensure to run the command `pnpm verify` to perform some basic checks.
## How to dockerize
A Dockerfile is provided to build an image and create a container out of it.
The image can be generated with
```bash
docker build -t miancolrin/electrocalc .
```
And then the container can be created and run with
```bash
docker run -p 80:80 --name electrocalc miancolrin/electrocalc
```
## How to run tests
### Jest test
```bash
pnpm test
pnpm test
```