Important
This project is a client-side, zero-backend calculator focused on Factorio solar and accumulator balancing. It is intentionally lightweight and can be shipped as static files.
- Features
- Technology Stack
- Technical Notes
- Getting Started
- Testing
- Deployment
- Usage
- Configuration
- License
- Community and Support
- Support the Development
- Fast solar-to-accumulator ratio math using a fixed, game-oriented ratio (
0.84). - Live recalculation while typing input values (no submit button, no refresh loop).
- Power output estimation in MW based on panel count.
- Accumulator storage estimation in MJ with locale-aware number formatting.
- Multi-language UI powered by per-language profile files in
profiles/. - Persistent language preference via browser
localStorage. - No dependencies / no build step workflow for ultra-low maintenance and instant onboarding.
Tip
If you want to add another language, you only need one extra profile file and one language option in the selector.
- HTML5 for semantic page structure.
- CSS3 for layout/styling.
- Vanilla JavaScript (ES6+) for calculator logic and i18n runtime behavior.
- Static asset architecture (no Node runtime, no package manager, no framework lock-in).
solar-accumulator-calculator/
├── index.html # Main UI skeleton
├── style.css # Visual styling
├── script.js # Calculator + localization runtime
├── profiles/
│ ├── en.js # English translations
│ ├── ru.js # Russian translations
│ └── ... # Additional language packs
├── README.md # Project documentation
├── CONTRIBUTING.md # Contribution workflow
├── CODE_OF_CONDUCT.md # Community behavior standard
└── LICENSE # GPL-3.0 license
- Pure front-end architecture: all logic runs in-browser to keep latency effectively zero and hosting dead-simple.
- Translation-per-file model: language files are decoupled from runtime logic for easier maintenance and contributor onboarding.
- No framework abstraction: minimizes cognitive overhead and makes the app easy to audit for small teams.
- Deterministic formulas: ratio and constants are hardcoded in
script.jsso output is predictable and reproducible.
Note
This repo optimizes for maintainability and accessibility over framework complexity.
You only need:
- A modern browser (
Chrome,Firefox,Edge,Safari). - Optional:
Python 3if you prefer serving files through a local HTTP server. - Optional:
Gitfor cloning and contributing.
# 1) Clone the repo
git clone https://github.com/OstinUA/solar-accumulator-calculator.git
# 2) Enter project directory
cd solar-accumulator-calculator
# 3) Quick start: open index.html directly
# Linux
xdg-open index.html
# macOS
open index.html
# Windows (PowerShell)
start index.htmlOptional local server mode:
# Serve static files on http://localhost:8000
python3 -m http.server 8000Then open http://localhost:8000 in your browser.
Current testing model is manual smoke testing (appropriate for the current no-build static setup).
Suggested checks:
# Start local static server
python3 -m http.server 8000Manual verification checklist:
- Open the app in browser and input values like
1,100, and10000. - Verify accumulator count updates instantly.
- Switch language and verify labels + units change correctly.
- Reload page and verify language preference persists.
- Confirm values are locale-formatted (group separators, decimal format).
Warning
There is no CI pipeline configured in this repository right now. If you add one, update badges and testing docs immediately.
Because this is a static web app, deployment is straightforward:
- GitHub Pages: push to default branch and serve root.
- Netlify / Vercel (static mode): connect repository and deploy without build command.
- Any CDN / static host: upload files as-is.
Example (generic static host pipeline):
- Pull latest
main. - Validate manual smoke tests.
- Upload
index.html,style.css,script.js, andprofiles/. - Purge CDN cache after release.
Basic usage flow:
1) Select language from dropdown.
2) Enter total number of solar panels.
3) Read calculated:
- Required accumulators
- Max generation (MW)
- Total storage capacity (MJ)
Example logic snapshot:
const RATIO = 0.84;
const SOLAR_POWER = 60; // kW per panel
const ACCUMULATOR_CAPACITY = 5; // MJ per accumulator
const accumulators = Math.ceil(panels * RATIO);
const totalPowerMW = (panels * SOLAR_POWER) / 1000;
const totalStorageMJ = accumulators * ACCUMULATOR_CAPACITY;This project currently does not use .env or runtime server config.
Configuration points are code-level constants and language resources:
script.jsconstants (RATIO,SOLAR_POWER,ACCUMULATOR_CAPACITY).profiles/*.jstranslation dictionaries.index.htmllanguage selector options.
Caution
If you add a new language profile but forget to register it in index.html and locale mapping in script.js, the UI will fall back and your language won’t be selectable.
Distributed under the GNU General Public License v3.0.
See LICENSE for full legal text.
Project created with the support of the FCTostin community.
- GitHub: OstinUA
- Team page: FCTostin-team
- Contribution process: see
CONTRIBUTING.md.