A little exercise to build a web application following an agile development process. See the instructions for more detail.
.
├── LICENSE
├── Models.py
├── README.md
├── __pycache__
│ └── Models.cpython-310.pyc
├── app.py
├── exercise_data.json
├── food_data.txt
├── images
│ ├── ankle_circles.gif
│ ├── ...
├── instructions.md
├── requirements.txt
├── static
│ ├── add-button.png
│ ├── css
│ │ ├── calories.css
│ │ ├── index_style.css
│ │ ├── my_weekly_report_style.css
│ │ └── style.css
│ ├── delete-button.png
│ ├── icon.svg
│ └── trash-fill.svg
├── templates
│ ├── auth.html
│ ├── details.html
│ ├── food_instruction.html
│ ├── index.html
│ ├── my_weekly_report.html
│ └── workout_instruction.html
└── utils
├── exercise_db.py
└── food_db.py
[
{
"_id": {
"$oid": "670c941221e2684be29679f6"
},
"user_name": "imyhalex",
"password": "imyhalex",
"height": {
"feet": 5,
"inches": 7
},
"weekly_values": [
{
"weekly_weight": [
0,
0,
0,
0,
0,
0,
133 // number added to here because test date was Sunday
],
"weekly_calorie": [
0,
0,
0,
0,
0,
0,
105.9
],
"weekly_bmi": [
0,
0,
0,
0,
0,
0,
20.8
],
"weekly_protein": [
0,
0,
0,
0,
0,
0,
0.5
],
"weekly_carbs": [
0,
0,
0,
0,
0,
0,
28.1
],
"weekly_fats": [
0,
0,
0,
0,
0,
0,
0.3
],
"weekly_sugar": [
0,
0,
0,
0,
0,
0,
20.6
]
}
],
"daily_workout_plan": [
{
"name": "seated side crunch (wall)",
"setNum": 2,
"gif_path": "images/seated_side_crunch_wall.gif",
"target_muscle": "abs",
"timer": {
"duration": 0,
"status": "stopped"
}
},
{
"name": "band vertical pallof press",
"setNum": 5,
"gif_path": "images/band_vertical_pallof_press.gif",
"target_muscle": "abs",
"timer": {
"duration": 0,
"status": "stopped"
}
}
]
},
{
...
...
}
]
[
{
"food_name": "Bread"
, "category": "carbs"
, "query_name": "bread"
},
{
...
...
}
]
[
{
"categories": "waist",
"equipment": "body weight",
"gif_path": "images/flag.gif",
"id": "3303",
"name": "flag",
"target_muscle": "abs",
"secondaryMuscles": [
"obliques",
"shoulders"
],
"instructions": [
"Start by gripping a vertical pole with both hands, palms facing each other, and arms fully extended.",
"Engage your core and lift your legs off the ground, keeping them straight.",
"Using your core and upper body strength, raise your legs until they are parallel to the ground.",
"Hold this position for as long as you can, maintaining a straight body line.",
"Slowly lower your legs back down to the starting position.",
"Repeat for the desired number of repetitions."
]
},
{
...
...
}
]
The vision behind our application is simple: to simplify the journey towards personal health and fitness. So our vision statement can be:
Our app empowers users to achieve their fitness goals by providing a platform that not only guides through workout plans but also tracks dietary calorie intake.
- A link to user stories
1. Maker sure MongodDB is installed in your computer
- link to download the mongodb
- You shold download the commity server, mongo shell, and the mongodb compass based on your computer's operation system
2. Clone this repository to your local machine
https://github.com/software-students-fall2024/2-web-app-garage1.git
3. Start and make sure your mongodb is working in terminal(Linux/MacOS)
$ sudo systemctl start mongod
$ sudo systemctl status mongod
4. Open the workspace, create a new virtual with the name .venv
$ python3 -m venv .venv
5. Ensure your .venv
and .env
is included within the .gitignore
6. Ensure your .env
contains your localhost databse and API keys
# MongoDB Configuration
MONGO_URI=YOUR_MONGODB_URI
# Api Key
API_NINJAS_KEY=3/8OcZmswlIcnvOJgeDsig==wroCzK0qvIl8W7XM (copy this directly to the file)
7. In the terminal, enter these two command to seed the data respectively
$ python utils/food_db.py
$ python utils/exercise_db.py
8. Run the application
$ python app.py