I have spent the last month building lovetocalc.com, a free calculator and formula site in English and Swedish. No account, no ads, no backend. The architecture rests on one idea: a formula is data, not a page. Each formula is an expression tree with typed variables such as length, time and money. From that one definition the build generates: the formula page versions solved for each variable practice questions with worked solutions printable worksheets with answer keys the formula's entry in a PDF collection Add one formula and all of those exist on the next build. There are a little over 500 formulas now. Stack: Astro 7, static output and strict TypeScript. React is only used as islands where something actually calculates. A simple page can ship around 2 kB of JS, a formula page with practice around 130 kB gzipped, and a larger calculator around 200 kB. The latter is one area I want to improve. All calculations live in a framework-free engine with unit tests. There are around 21,000 tests, most generated across formulas and every variable they can be solved for. The UI only handles presentation. EN and SV use the same components and engine. Strings, slugs and number formats are data rather than separate implementations. A few things that worked well: Calculator state lives in the URL, so every result is shareable without storage. Open Graph images are generated from the same registry as the pages, and the build fails if a sitemap page is missing one. Excel exports contain real formulas rather than static values. The e2e tests open the files in LibreOffice and Apple Numbers and compare the resulting cells against the calculation engine. The main pain points so far: 1,300 static pages means changes to shared content touch almost everything. Deploying them over FTPS from GitHub Actions takes about 30 minutes. Keeping print/PDF output independent of dark mode has been more awkward than expected. The part I am least sure about is the core abstraction. It works well for formulas that can be represented as expression trees, but I am starting to add diagrams and multi-step questions. If you were designing this, where would you expect the “formula as data” model to stop scaling cleanly? Examples: lovetocalc.com/en/loan-calculator/ lovetocalc.com/en/formulas/mathematics/geometry/pythagorean-theorem/ lovetocalc.com/en/loan-amortization-schedule-excel/   submitted by   /u/onceweweredigital   to   r/webdev [link]   [comments]