HydroTracker is a PHP + MySQL web app that turns daily water intake into a simple, gamified habit. Users set a personal hydration goal, log sips or gulps, build streaks, and view daily stats in a clean dashboard.
- Account registration and login
- Personal daily goal setup and reminders
- Quick log buttons (sip, gulp, custom amount)
- Streak tracking and daily history view
- Leaderboard and stats
- Responsive, Tailwind-powered UI
- Live dashboard updates (AJAX)
| Home | Personalization |
|---|---|
| Leaderboard | Login |
|---|---|
- PHP
- MySQL
- Tailwind CSS (CDN)
- JavaScript
index.php- Landing pagelogin.php- Login and registration UIdashboard.php- Main hydration dashboardpersonalization.php- User goal setupactions/- Form handlers and API-like endpointsincludes/- Shared layout and utilitiesassets/- CSS and JS
- XAMPP or any PHP + MySQL local stack
- PHP 8+ recommended
- MySQL 5.7+ or MariaDB
- Clone or download this repo into your local web root.
- Create a MySQL database named
hydrotracker. - Update credentials in
config/db_connect.phpif needed. - Import the database schema from
database/schema.sql. - Start Apache + MySQL, then open
http://localhost/hydrotracker.
The database schema is provided in database/schema.sql.
Import it in phpMyAdmin or via CLI:
mysql -u root -p hydrotracker < database/schema.sql- Base URL is computed dynamically in
config/init.php. - Default timezone is set to
Asia/Kuala_Lumpur.
- Home:
index.php - Login/Register:
login.php - Dashboard:
dashboard.php - Personalization:
personalization.php - Leaderboard:
leaderboard.php - Settings:
settings.php
This project is for portfolio/learning purposes.