A web application that helps you track and visualize caffeine levels in your body over time, based on the half-life decay principle.
Half-Life Caffeine Tracker is a single-purpose static web application that helps you visualize the degradation (half-life) of caffeine in your body over time. The app uses a scientifically-backed caffeine metabolism model to show you your current and projected caffeine levels.
- Caffeine Intake Tracking: Log your caffeine consumption with precise timestamps
- Visualization: See your caffeine levels on an interactive chart with projections
- Drink Database: Access a comprehensive database of common caffeinated beverages
- Personalization: Customize metabolism settings based on your biology
- Offline Support: Works without internet as a Progressive Web App (PWA)
- Privacy-Focused: All data stored locally in your browser - no server tracking
- Clone the repository
git clone https://github.com/halflifecaffeine/halflifecaffeine.github.io.git
cd halflifecaffeine.github.io- Install the dependencies
cd src
npm installNote
If you prefer yarn, you can run yarn install instead.
Start the development server:
npm run devThis will start the Vite development server, typically at http://localhost:5173.
Tip
Use the --host flag to make the app accessible from other devices on your network:
npm run dev -- --hostnpm run buildThis will generate optimized production files in the dist directory.
To preview the production build locally:
npm run preview- Use PowerShell or Git Bash for the best experience with the commands above
- If you encounter EACCES permissions errors, run your terminal as Administrator
- No special considerations, all commands should work as expected
- If you encounter permission issues, you might need to use
sudofor npm global installations
Important
When running locally on macOS or Linux, make sure file paths maintain correct case sensitivity for imports.
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the project
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with React, TypeScript, and Vite
- UI components from React Bootstrap
- Charts powered by Recharts

