This is a submission for Twilio Challenge v24.06.12
What I Built
GymBuddy
GymBuddy is a web application designed to help fitness enthusiasts track their workout performance and nutritional intake efficiently. Whether you're a beginner looking to establish a fitness routine or a seasoned athlete aiming to optimize your training, GymBuddy provides essential tools and insights to support your fitness journey.
Key Features
- Performance Metrics: Track sets, reps, workout duration, and calories burned across different exercises.
- Nutrition Tracking: Monitor meals consumed throughout the day to maintain a balanced diet.
- Daily Quotes: Get inspired with daily motivational quotes to keep you motivated.
- Interactive Charts: Visualize your progress with interactive charts showing performance trends over time.
Technologies Used
- Frontend: React.js, Chakra UI
- Backend: Flask
- External APIs: Twilio Api for whatsapp messaging and Cohere Api for AI responses
Demo
Twilio and AI
I utilized the Cohere API to generate AI-driven content, such as daily motivational quotes and personalized workout plans based on user input. When a user fills out the form, a workout plan is dynamically generated, including meal suggestions.
For communication, I integrated the Twilio API to send messages. Upon completing their workout, users can enter details in a specific format like "10 10 50 200". Twilio then sends this data to a Flask server via its API. The Flask server interprets the message to update the dashboard with details such as 10 reps, 10 sets, 50 minutes, and 200 calories burned.
I could not have achieved this functionality without Twilio Kudos to Twilio team.
Also I had already written Blog around Twilio so I had little experience with Twilio API and Whatsapp business API.
I wanted to use Twilio Whatsapp business API but time was less as it takes verification so I sticked to using Whatsapp Sandbox.
Getting Started
To get started with GymBuddy, and follow these steps:
1.You can try it out by scanning the QR Code in the image or by texting the code join four-mental to the number +14155238886 on WhatsApp.
Once that is done clone the repository.
Source code
Prerequisites
Before you begin, ensure you have the following installed on your development environment:
- Python 3.x
- Node.js
- npm (Node Package Manager)
Join Twilio Sandbox
Backend Setup
-
Navigate to the backend directory:
cd twilio/backend
-
Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install the required Python packages:
pip install -r requirements.txt
-
Configure environment variables:
- Create a
.env
file in thebackend
directory with the following contentTWILIO_ACCOUNT_SID= Your SID TWILIO_AUTH_TOKEN=Your Auth Token COHERE_API_KEY=Your API KEY
- Create a
-
Run the backend server:
python app.py
Your Flask server will start running on http://127.0.0.1:5000/.
-
** Running Flask with ngrok**
-
If you want to expose your local Flask server to the internet for testing:
choco install ngrok(in Powershell if windows) ngrok config add-authtoken Your AuthToken ngrok http 5000 Embed the url obtained after hosting into whatsapp Sandbox settings inside When a message comes in
…
-
Additional Prize Categories
<!-- Does your submission qualify for any additional prize categories
Twilio Times Two
: My usage of Twilio's Whatsapp Messaging API for outbound messages and the Twilio REST Client for handling incoming messages qualifies your project under the Twilio Times Two category.
Impactful Innovators
: My project, GymBuddy, innovatively integrates the Cohere API and Twilio to revolutionize fitness tracking and engagement. Using Cohere, GymBuddy generates personalized motivational quotes and custom workout plans. Twilio facilitates seamless communication, enabling users to log workout details via simple text messages and receive instant updates on their progress.
<!-- Thanks for participating! →
Top comments (1)
Hello everyone, I hope you're all doing well. I recently launched an open-source project called GraphQLPlaceholder, and I'd love your support. Please check it out and give it a star on GitHub github.com/enochval/graphql-placeh.... Your support would mean a lot to me and help immensely in the project's growth.
Thank you.
Some comments have been hidden by the post's author - find out more