leap
Python package for the Lifetime Exposures and Asthma outcomes Projection (LEAP) Model
Notice your added sugar without the guilt. A personal daily limit, sourced sugar counts, and Honey the bear cheering you on.
HealthJavaScript · HTMLGitHub @rachelselbredeOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
No updates detected yet. GitHub releases will appear here.
Owners of public repositories under a personal GitHub account can sign in to verify ownership and manage the introduction themselves. No administrator approval is needed.
Sign in, generate a verification file, and commit it to this repository’s default branch within 30 minutes. Files on other branches or forks do not count. Then check the file below to manage the project without administrator approval. Keep the file to retain your access.
If needed, you will go to sign-in. After signing in, return here and press your chosen verification button again.
Run /nomorevibe verify in your project folder to verify ownership and manage the introduction yourself.
Verify in one minuteAsk about other verification options
A cute, guilt-free added-sugar tracker for people who are prediabetic or not sure: a personal, sourced daily limit, and every treat's number traced to its Nutrition Facts label. Built for Devpost's Build With AI: Basics.
Taken from the repository README
Loading the full README. The saved excerpt is shown below.
A cute, guilt-free added-sugar tracker. Answer two questions, get a personal daily added-sugar limit with its source, then tap treats to see how close you are. Honey the bear keeps you company, and nothing you enter leaves your browser.
Built as a small proof of concept for Devpost's Build With AI: Basics hackathon with the Devpost Learn skill pack, following its plan-first workflow (scope → PRD → spec → build). The planning documents are in devpost/: scope.md, prd.md, spec.md, the build checklist.md, and a take-home app map. skills-lock.json records which skill-pack versions were used.Read the full README ↗A cute, guilt-free added-sugar tracker. Answer two questions, get a personal daily added-sugar limit with its source, then tap treats to see how close you are. Honey the bear keeps you company, and nothing you enter leaves your browser.
Built as a small proof of concept for Devpost's Build With AI: Basics hackathon with the Devpost Learn skill pack, following its plan-first workflow (scope → PRD → spec → build). The planning documents are in devpost/: scope.md, prd.md, spec.md, the build checklist.md, and a take-home app map. skills-lock.json records which skill-pack versions were used.
Try it: https://rachelselbrede.github.io/sugar-tracker/ · Code: https://github.com/rachelselbrede/sugar-tracker
Someone who is prediabetic, or isn't sure, and wants to notice how much added sugar they eat without a diet app that feels like calorie-shaming. Anyone can use it, but the default limits and the wording are tuned for them.
Why it matters: more than 2 in 5 American adults have prediabetes, which raises the risk of type 2 diabetes, heart disease, and stroke (CDC). US adults average about 17 teaspoons of added sugar a day, roughly 68 g at 4 g per teaspoon, and the leading sources are sugar-sweetened beverages, desserts, and sweet snacks (CDC). The American Heart Association's limit for women is 25 g. The app counts added sugar only, because that is what the public limits are written about, and because it's the sugar you can actually choose.
devpost/checklist.md > Revisions).No build step and nothing to install. Serve the folder, then open the page:
python3 -m http.server 8000
Then visit http://localhost:8000. Opening index.html directly won't work, because browsers block JavaScript modules on file://.
npm test
This uses Node's built-in test runner and installs nothing. The tests cover the limit table, the scale math, goal validation, the day key, safe storage, a check that every built-in treat has a positive added-sugar value, a serving, a valid basis, an https source, and a check date, plus validation and safe storage of treats you add yourself.
Daily limits (added sugar per day):
| Profile | Limit | Source |
|---|---|---|
| Prediabetic, or not sure | 25 g, labeled as general guidance | There is no official added-sugar number for prediabetes. This uses the careful end of public guidance: the WHO's conditional target of under 5% of energy and the AHA's limit for women. |
| Not prediabetic, female | 25 g | American Heart Association |
| Not prediabetic, male | 36 g | American Heart Association |
| Not prediabetic, prefer not to say | 25 g | American Heart Association (the more careful limit) |
Treats. A treat only goes on the built-in list if its added sugar is known, not guessed. Each value is the "Includes Xg Added Sugars" line from the product's US Nutrition Facts panel, read from a grocery-store product page that shows the full panel, for the serving shown. Items whose labels only give total sugar and contain milk, fruit, or juice were left out. The list and its source links live in js/treats.js, and the research notes are in devpost/sources.md. Treats you add under My treats come from your own label and are stored only in your browser.
Product names appear only to identify which Nutrition Facts panel a number came from. No logos or brand assets are used.
Treat Yourself is general guidance, not medical advice. Talk to your clinician about what's right for you.
Plain HTML, CSS, and JavaScript modules, with no framework and no dependencies.
index.html — both screens (Profile and Tracker), the goal panel, the source popup, the add-your-own-treat form, and the footerstyles.css — the pastel candy-shop look, layout, and reduced-motion fallbackjs/app.js — wires the page together: loads saved state, renders, handles taps, checks for a new dayjs/logic.js — the rules, as pure functions: recommendedLimit, scaleState, isValidGoal, todayKey, customTreatErrorsjs/storage.js — safe localStorage reads and writes (ty.profile, ty.goal, ty.log, ty.custom) that never crash on blocked or corrupt datajs/treats.js — the treat list with added sugar, serving, basis, and source linkjs/honey.js — Honey the bear, drawn as SVG in four moodstests/ — the Node testsHoney the character comes from our earlier Treat Yourself project and was redrawn for this build; no earlier code was reused. The fonts (Fredoka, Nunito, Pacifico) and the pastel palette carry over as the design direction.
MIT. See LICENSE.