A Progressive Web App for tracking your daily protein drink intake. Works fully offline, supports 7 languages, and includes gamification features like streaks, badges, and heatmaps.
Live app: protein-shake-tracker.netlify.app
Install it on your phone for free: open the link above in your mobile browser and tap "Add to Home Screen".
- One-tap daily protein tracking with undo
- Streak counter and milestone badges (7, 14, 30, 100 days)
- Weekly progress ring and 365-day heatmap
- Monthly stats with completion percentage
- Dark / light theme (auto-detects OS preference)
- 7 languages: English, French, Dutch, Turkish, Arabic, Spanish, Swedish
- Motivational daily quotes
- Full history table with CSV and PDF export
- World clock strip (7 cities)
- Push notification reminders
- Fully offline via service worker
No build tools required. The app is plain HTML, CSS, and JavaScript.
# 1. Clone (or fork first, then clone your fork)
git clone https://github.com/softwarewithnick/protein-drink-tracker.git
cd protein-drink-tracker
# 2. Serve locally (any static server works)
npx serve .
# or: python3 -m http.server 8000
# or just open index.html in your browserOpen http://localhost:3000 (or whatever port your server uses) and you are ready to go.
protein-drink-tracker/
|-- index.html # Main PWA shell
|-- protein-food.html # Protein food chart page
|-- app.js # Core application logic (14 sections)
|-- sw.js # Service worker (offline + notifications)
|-- translations.js # i18n dictionary (7 languages)
|-- styles.css # Design system (17 sections)
|-- manifest.json # PWA manifest
|-- icons/ # App icons (SVG)
|-- images/ # Illustrations (drank / not-drank)
|-- ARCHITECTURE.md # Detailed technical reference
+-- README.md # This file
For a deep dive into every function, data flow, and constant, see ARCHITECTURE.md.
This project is open-source and built for learning. Contributions of all sizes are welcome -- from typo fixes to new features.
Don't be afraid to fork the repo and experiment!
If you are new to open-source contributions, these videos walk through the process:
Click Fork at the top-right of the GitHub page, then clone your fork:
git clone https://github.com/<your-username>/protein-drink-tracker.git
cd protein-drink-trackerAlways work on a new branch -- never commit directly to main:
git checkout -b feature/my-featureUse a descriptive name like fix/button-color or feature/dark-mode.
- Read ARCHITECTURE.md to understand how the code is organized.
- Keep changes focused and self-contained.
- Follow the existing code style (see the JSDoc comments and section headers in each file).
- Test your changes locally by serving the app and clicking through the UI.
git add <files-you-changed>
git commit -m "Add dark mode toggle"
git push origin feature/my-featureWrite clear, descriptive commit messages. Only stage the files you actually changed (avoid git add .).
- Go to your fork on GitHub.
- Click Compare & pull request.
- Set the base repository to
softwarewithnick/protein-drink-trackerand the base branch tomain. - Give your PR a descriptive title and explain:
- What you changed
- Why the change is useful
- Reference any related issue (e.g.
Closes #5)
- Submit the PR.
- A maintainer will review your PR and may request changes -- this is normal and part of the learning process.
- Push updates to the same branch; the PR updates automatically.
- Once approved, your changes will be merged.
If other changes are merged while your PR is open:
git remote add upstream https://github.com/softwarewithnick/protein-drink-tracker.git
git fetch upstream
git checkout main
git merge upstream/main
git push origin mainFor larger changes or new features, open an issue before starting work:
- Describe the problem or feature idea.
- Wait for discussion or approval.
- Reference the issue in your PR (e.g.
Closes #10).
This keeps the project organized and prevents duplicate effort.
Not sure where to start? Here are some beginner-friendly ideas:
- Add a new language -- see the "Adding a New Language" section in ARCHITECTURE.md
- Add a new protein food to the chart page
- Fix a UI bug on mobile or a specific browser
- Improve accessibility (ARIA labels, keyboard navigation)
- Write better error handling for edge cases
- Add a new badge milestone (e.g. 50-day streak)
This project is open-source and primarily for educational purposes. Every contribution counts -- from small bug fixes to new features. Thank you for helping make Protein Drink Tracker better!