From d10aa80da0a678f197ee7056c8e214f6fa3eb944 Mon Sep 17 00:00:00 2001 From: Sakura Date: Wed, 8 Jan 2025 20:30:25 +0300 Subject: [PATCH 1/5] Add bodybuilding features to the app Add hormone tracking, body stats tracking, diet plan management, progress photos, and trainer profile management features. * **Hormone Tracking:** - Add `HormoneTrackerService` to manage hormone data. - Add `HormoneScheduleScreen` to view and edit hormone schedules. - Add `HormoneCard` widget to display hormone details. * **Body Stats Tracking:** - Add `BodyTrackingScreen` to display body stats and progress charts. - Add `BodyStats` model to define body stats data structure. - Add `BodyStatChart` widget to visualize body stats over time. - Add `BodyStatsService` to manage body stats data. * **Diet Plan Management:** - Add `DietPlanScreen` to view and edit diet plans. - Add `DietPlan` model to define diet plan data structure. - Add `DietCard` widget to display diet plan details. * **Progress Photos:** - Add `ProgressPhotosScreen` to upload and view progress photos. - Add `PhotoComparisonWidget` to compare before and after photos. * **Trainer Profile Management:** - Add `TrainerDashboardScreen` to view and manage clients. - Add `TrainerProfile` model to define trainer and client data structure. - Add `ClientCard` widget to display client details. * **Notification System:** - Add `NotificationService` to handle notifications for training sessions, meal plans, and hormone schedules. --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/sakura-source/Werdany?shareId=XXXX-XXXX-XXXX-XXXX). --- README.md | 92 +++-------- lib/database/database_helper.dart | 99 +++++++++++ lib/models/body_stats.dart | 23 +++ lib/models/diet_plan.dart | 35 ++++ lib/models/trainer_profile.dart | 107 ++++++++++++ lib/screens/body_tracking_screen.dart | 65 ++++++++ lib/screens/diet_plan_screen.dart | 73 ++++++++ lib/screens/hormone_schedule_screen.dart | 193 ++++++++++++++++++++++ lib/screens/progress_photos_screen.dart | 82 +++++++++ lib/screens/trainer_dashboard_screen.dart | 73 ++++++++ lib/services/body_stats_service.dart | 66 ++++++++ lib/services/hormone_tracker_service.dart | 78 +++++++++ lib/services/notification_service.dart | 62 +++++++ lib/widgets/body_stat_chart.dart | 61 +++++++ lib/widgets/client_card.dart | 57 +++++++ lib/widgets/diet_card.dart | 57 +++++++ lib/widgets/hormone_card.dart | 42 +++++ lib/widgets/photo_comparison_widget.dart | 24 +++ 18 files changed, 1221 insertions(+), 68 deletions(-) create mode 100644 lib/database/database_helper.dart create mode 100644 lib/models/body_stats.dart create mode 100644 lib/models/diet_plan.dart create mode 100644 lib/models/trainer_profile.dart create mode 100644 lib/screens/body_tracking_screen.dart create mode 100644 lib/screens/diet_plan_screen.dart create mode 100644 lib/screens/hormone_schedule_screen.dart create mode 100644 lib/screens/progress_photos_screen.dart create mode 100644 lib/screens/trainer_dashboard_screen.dart create mode 100644 lib/services/body_stats_service.dart create mode 100644 lib/services/hormone_tracker_service.dart create mode 100644 lib/services/notification_service.dart create mode 100644 lib/widgets/body_stat_chart.dart create mode 100644 lib/widgets/client_card.dart create mode 100644 lib/widgets/diet_card.dart create mode 100644 lib/widgets/hormone_card.dart create mode 100644 lib/widgets/photo_comparison_widget.dart diff --git a/README.md b/README.md index 97b379c..663d271 100644 --- a/README.md +++ b/README.md @@ -1,90 +1,46 @@
- +# Bodybuilding Trainer and Nutrition App -# Code with GitHub Copilot - -_GitHub Copilot can help you code by offering autocomplete-style suggestions right in VS Code and Codespaces._ +_Enhance and expand a Bodybuilding Trainer and Nutrition App with advanced features and functionality tailored for a professional bodybuilder._
- - -## Step 1: Leverage Codespaces with VS Code for Copilot - -_Welcome to "Develop With AI Powered Code Suggestions Using GitHub Copilot and VS Code"! :wave:_ - -GitHub Copilot is an AI pair programmer that helps you write code faster and with less work. It draws context from comments and code to suggest individual lines and whole functions instantly. GitHub Copilot is powered by OpenAI Codex, a generative pretrained language model created by OpenAI. +## App Overview -**Copilot works with many code editors including VS Code, Visual Studio, JetBrains IDE, and Neovim.** +The Bodybuilding Trainer and Nutrition App is designed to provide professional bodybuilders with a comprehensive tool for managing their training schedules, nutrition plans, hormone tracking, and progress tracking. The app includes core features such as training schedules, nutrition and diet plans, hormone tracking system, body stats tracking, recurring notifications, and progress photos. It also offers advanced features for trainers to manage multiple clients, personalized schedules, and detailed tracking of stats and progress. -Additionally, GitHub Copilot is trained on all languages that appear in public repositories. For each language, the quality of suggestions you receive may depend on the volume and diversity of training data for that language. +## Folder Structure -Using Copilot inside a Codespace shows just how easy it is to get up and running with GitHub's suite of [Collaborative Coding](https://github.com/features#features-collaboration) tools. +The app follows a modular folder structure to ensure clean and maintainable code. The main folders are: -> **Note** -> This skills exercise will focus on leveraging GitHub Codespace. It is recommended that you complete the GitHub skill, [Codespaces](https://github.com/skills/code-with-codespaces), before moving forward with this exercise. +- `lib/screens`: Contains screens like dashboards, profiles, and tracking. +- `lib/widgets`: Contains reusable UI components (e.g., cards, graphs). +- `lib/models`: Contains data models (e.g., hormones, user profiles). +- `lib/services`: Contains backend integrations and logic. +- `lib/database`: Contains SQLite database integration. -### :keyboard: Activity: Enable Copilot inside a Codespace +## Setup Instructions -**We recommend opening another browser tab to work through the following activities so you can keep these instructions open for reference.** - -Before you open up a codespace on a repository, you can create a development container and define specific extensions or configurations that will be used or installed in your codespace. Let's create this development container and add copilot to the list of extensions. - -1. Navigating back to your **Code** tab of your repository, click the **Add file** drop-down button, and then click `Create new file`. -1. Type or paste the following in the empty text field prompt to name your file. +1. Clone the repository: ``` - .devcontainer/devcontainer.json + git clone https://github.com/sakura-source/Werdany.git ``` -1. In the body of the new **.devcontainer/devcontainer.json** file, add the following content: +2. Navigate to the project directory: ``` - { - // Name this configuration - "name": "Codespace for Skills!", - "customizations": { - "vscode": { - "extensions": [ - "GitHub.copilot" - ] - } - } - } + cd Werdany + ``` +3. Install dependencies: + ``` + flutter pub get + ``` +4. Run the app: + ``` + flutter run ``` -1. Select the option to **Commit directly to the `main` branch**, and then click the **Commit new file** button. -1. Navigate back to the home page of your repository by clicking the **Code** tab located at the top left of the screen. -1. Click the **Code** button located in the middle of the page. -1. Click the **Codespaces** tab on the box that pops up. -1. Click the **Create codespace on main** button. - - **Wait about 2 minutes for the codespace to spin itself up.** - -1. Verify your codespace is running. The browser should contain a VS Code web-based editor and a terminal should be present such as the below: - ![Screen Shot 2023-03-09 at 9 09 07 AM](https://user-images.githubusercontent.com/26442605/224102962-d0222578-3f10-4566-856d-8d59f28fcf2e.png) -1. The `copilot` extension should show up in the VS Code extension list. Click the extensions sidebar tab. You should see the following: - ![Screen Shot 2023-03-09 at 9 04 13 AM](https://user-images.githubusercontent.com/26442605/224102514-7d6d2f51-f435-401d-a529-7bae3ae3e511.png) - -**Wait about 60 seconds then refresh your repository landing page for the next step.**