Algorithm:
Step 1 – Start the program
The program begins and opens a window using Tkinter.
Step 2 – Display Login Screen
Show text boxes to enter Username and Password.
Give two buttons:
o Login
o Register
Step 3 – User Registration
If the user clicks Register:
1. Check if both username and password are filled.
2. If the username already exists in [Link], show an
error.
3. Otherwise, save the new username and password
in the file.
4. Show a message “User registered successfully”.
Step 4 – User Login
If the user clicks Login:
1. Read the [Link] file.
2. If the username and password match, open the
main tracker window.
3. Otherwise, show “Invalid credentials”.
Step 5 – Main Tracker Window
After successful login, the main screen appears with
tabs:
o 🏠 Dashboard
o 💧 Water
o Meal
o ⚖️BMI
o 🧘 Stress
Step 6 – Dashboard Tab
Shows all the health logs saved by the user.
A Show Logs button displays all entries (like water,
meals, BMI, etc.).
Step 7 – Water Tab
The user enters the amount of water (in litres).
On clicking Log Water, it saves the record with the
current date and time.
Step 8 – Meal Tab
The user selects Meal Type (Breakfast, Lunch, Dinner or
Snack).
Enters Calories and a Meal Description.
On clicking Log Meal, the meal is stored with date and
time.
Step 9 – BMI Tab
The user enters Height (cm) and Weight (kg).
On clicking Calculate, the program computes BMI
using:
Weight
BMI=
¿¿
Shows the result and saves it to the log.
Step 10 – Stress Tab
The user selects a Stress Level (Low, Medium, High).
On clicking Log Stress, the level is saved with date and
time.
Step 11 – Saving Data
When the user clicks Save Data, all logs are written to a
text file named
username_data.txt.
Step 12 – Logout
When the user clicks Logout, it returns to the login
screen.
Step 13 – End
The program stops when the window is closed.
✨ Output
A user-friendly GUI to:
o Log water intake
o Record meals and calories
o Calculate BMI
o Track stress levels
o Save all data in a text file