AquaSync is a smart water bottle application designed to help users stay hydrated by tracking their water intake, analyzing drinking habits, and monitoring the real-time water level in the bottle by Ultra Sonic Sensor. The application connects to the water bottle via Bluetooth by Xiao ESP32C3 microcontroller, providing data on hydration patterns(intake), water purity, and more. personal health data, such as age, weight, activity level, current weather and sleep hours to provide personalized water intake recommendations tailored to each userโs unique needs. The app also offers reminders to drink water based on these recommendations, ensuring users maintain their hydration goals.
- Real-Time Hydration Tracking: Monitors water levels in the bottle and tracks drinking patterns.
- Daily Consumption Goals: Set and track hydration goals with progress updates.
- Bluetooth Connectivity: Connect the app to the smart bottle for live water-level readings.
- Health and Weather Insights: Customize hydration recommendations based on health status, activity level, sleep time and current weather.
- Data Analytics: Graphs and reports of daily, they can compare two day's water intake and get them feedback.
- Cloud Services: Firebase
- User Feedback: Collect user input for continuous improvement.
-
Frontend: Flutter
-
Backend: Python Flask
-
Database: MongoDB
-
Weather Integration: WeatherAPI for live weather data
1. Clone the Repository:
git clone https://github.com/fasinfasi/SmartWaterBottle.git cd AquaSync
2. Install Dependencies:
Make sure you have Flutter installed. You can check by running:
flutter --version
Next, install dependencies:
flutter pub get
To run the app:
flutter run
Navigate to the Flask backend directory:
cd backend python -m venv venv
Activate the virtual environment:
- Windows: venv\Scripts\activate
- Mac/Linux: source venv/bin/activate
pip install -r requirements.txt
python app.py
- Install MongoDB from MongoDb official center.
- Start MongoDB service:
mongod --dbpath="C:\data\db" # Adjust path based on OS
- Update your Flask environment variables to connect to the database.
- Install Node.js from Node.js official website.
- Navigate to the notification service directory:
cd notification-server
- Install dependencies:
npm install
- Run the server:
node server.js
- Set up Firebase at Firebase Console.
- Download google-services.json (for Android) or GoogleService-Info.plist (for iOS).
- Place them inside your Flutter app under:
nodejs/Notification/Notification-service/aquasync-60d5f-6929bb9836df
- Ensure your Firebase configuration matches in the backend.
keep api key as confidential
Install Arduino from their official website.
AquaSync/
โโโ flutter/
โ โโโ lib/
โ โ โโโ main.dart # File setup in app, initializing Firebase and defining all routes for navigation.
โ โ โโโ welcome_screen.dart # Splash screen with AquaSync text, logo and start button
โ โ โโโ login_screen.dart # Users allow to login
โ โ โโโ sign_up.dart # New user can make an account
โ โ โโโ permission_manager.dart # responsible for handling Bluetooth and location permissions in app.
โ โ โโโ data_analysis.dart # Display a line chart comparing ratings of two dates
โ โ โโโ firebase_options.dart # Provides platform-specific Firebase configuration options for app
โ โ โโโ inputname_screen.dart # Collect name and sex of user
โ โ โโโ inputage_screen.dart # Collect user date of birth
โ โ โโโ inputweight_screen.dart # Collect user weight
โ โ โโโ status_screen.dart # To gather user activity and health status
โ โ โโโ home_screen.dart # Displays water level, bottle's charge, weather, and goal progress
โ โ โโโ bluetooth_screen.dart # To connect mobile app with water bottle
โ โ โโโ graph_screen.dart # To expose the graphical visualization of user's water consumptions in anytime and reports
โ โ โโโ notification_screen.dart # To customize reminder time and notification tones
โ โ โโโ general_setting_screen.dart # To set sleep time, user can get general guide lines and they can sign out
โ โ โโโ feedback_screen.dart # User feed collect
โ
โ
โโโ backend/
โ โโโ app.py
โ โโโ package.json
โ โโโ package-lock.json
โ โโโ routes/
โ โ โโโ auth.py # Handles user authentication using JWT (JSON Web Tokens) and MongoDB as the database
โ โ โโโ bluetooth # Manages user Hydration data is securely stored, updated, and retrieved using MongoDB
โ โ โโโ DataAnalysis.py # Processes hydration records for comparison and provide suggestion
โ โ โโโ google_auth.py # Handling Google authentication using OAuth2
โ โ โโโ Hydration_Calculation.py # Database and schedules hydration reminders based on user attributes
โ โ โโโ Hydration_graph.py # Tracking and visualizing a user's hydration habits
โ โ โโโ mongodb.py # Establishing a connection to a MongoDB database
โ โ โโโ run.py # Initialize and run
โ โ โโโ Water_Intake.py # Personalized daily water intake calculations
โ โ โโโ Weather_adjustment.py # Handles weather-based hydration adjustments
โ
โ
โโโ nodejs/
โ โโโ Notification/
โ โ โโโ notification-service/
โ โ | โโโ aquasync-60d5f-6929bb9836df.json # Accessing Firebase services and authentication
โ โ | โโโ server.js # Node.js backend server
โ โโโ Server Automation/
โ โ โโโ index.js # Tracking and updating user hydration records in a system
โ
โ
โโโ Arduino/
โ โโโ sketch_nov10a # IoT components proper integrated working
The AquaSync smart water bottle utilizes a combination of IoT components to monitor and transmit data about user's water intake and bottle status. These components enable seamless integration with the AquaSync app, providing users with real-time insights and personalized hydration guidance. Below are the primary IoT components used in the bottle:
-
Ultra Sonic Sensor: Tracks the current water level in the bottle by calculating distance from sensor to water.
-
Xiao ESP32C3: Serves as the processing unit, gathering data from sensors and sent to app.
-
Bluetooth Module: Microcontroller has built-in Bluetooth module which allow connection with app.
-
Battery: For power supply to hardware components using 3.7v 300mah capacity battery.
-
Resistors: Ensures circuits protection against exceed current flow.
-
Breadboard: Act as a circuit board to the entire hardware.
-
LED blub: To indicate connection status or working condition.
- Home Screen: View daily hydration goals, current water level in the bottle, battery status, and real-time weather conditions.
- Profile Screen: Update health metrics like age, weight, activity level, sleep time and health conditions for personalized hydration recommendations.
- Personalized Hydration Suggestions: Receive customized water intake goals based on personal data such as activity level, weight, and weather.
- Drink Reminders: Get timely notifications to drink water throughout the day based on your personalized hydration needs.
- Graph Analytics: Track historical water intake data with daily, weekly, and monthly views to observe hydration trends over time.
- Hydration Progress Bar: Monitor how close you are to reaching your daily hydration goal with a dynamic progress bar.
- Bluetooth Bottle Connection: Seamlessly connect with the smart bottle to receive live updates on water level and bottle status.
- Real-Time Water Level Updates: View real-time water levels in the bottle, allowing users to see their progress instantly.
- Weather-Based Hydration Adjustments: AquaSync adjusts daily hydration goals according to current weather conditions, with suggestions on extra hydration during hot weather.
- User Feedback and Suggestions: Users can provide feedback directly in the app to improve AquaSync's features and functionality.
- Integrate AI recommendations for personalized hydration advice.
- Build hand band that measure body conditions and integrate with bottle and app.
- Implement for feature to app for overall health care to user like diet plan, fitness tracker etc
- implementfFeature for fasting people
- Make community and they can connect with together
- Latest health research summary about health physical as well as mental as like news
-
Fork the repository.
-
Create your branch
git checkout -b feature-name
-
Commit your changes:
git commit -m "Add new feature"
-
Push to your branch:
-
git push origin your_branch_name
-
Open a pull request.
This project is licensed under the MIT License - see the License file for details.