Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Building an open‑source TDEE calculator you can actually verify

说明与用途

构建了一个开源的 TDEE 计算器,提供经过验证的公式和无权限的 Firefox 扩展,便于在其他项目中集成。

问题

Existing online TDEE calculators are opaque, ad‑laden, and hard to reuse in other projects.

结果

The project delivers a lightweight, open‑source TDEE calculator that can be easily integrated into other applications, with full test coverage and a privacy‑friendly browser extension.

工作流

  • 1. Extract BMR formulas (Mifflin‑St Jeor, Katch‑McArdle, Harris‑Benedict).
  • 2. Implement TDEE as BMR × activity multiplier.
  • 3. Add macro‑split logic with fixed fat percentage and protein per kg.
  • 4. Write unit tests against hand‑derived reference values.
  • 5. Publish @aadifit/tdee‑calc to npm.
  • 6. Wrap the same formulas in a Firefox extension with a popup UI and a zero‑permission manifest.
  • 7. Provide documentation and example usage in the README.

证据

Every TDEE calculator I found online was the same thing: a form behind a wall of ads, math you can't see, and no way to reuse it in your own project.

来源

The package @aadifit/tdee-calc – zero dependencies, ~150 lines, MIT licensed, every formula checked against hand‑derived reference values in the test suite (16 tests).

来源

  • 记录日期: 2026-09-22T19:00:25.359Z