Giter VIP home page Giter VIP logo

a-mabe / openhiit Goto Github PK

View Code? Open in Web Editor NEW
40.0 3.0 11.0 3.52 MB

:weight_lifting: :medal_sports: Open-source, cross platform HIIT and Tabata interval timer. Pull requests are appreciated!

License: MIT License

Kotlin 0.05% Ruby 1.13% Swift 1.08% Objective-C 0.01% Dart 79.23% CMake 7.41% C++ 9.54% C 0.56% HTML 0.72% Java 0.26%
flutter intervals opensource timer workout hiit hiit-timer android countdown-timer cross-platform

openhiit's Introduction

OpenHIIT

Integration Tests Release Build

Welcome to OpenHIIT, an open-source workout interval timer mobile application developed using Flutter. This README file provides an overview of the application, its features, installation instructions, and other important information for beta testing.

The timer package is being developed here.

Table of Contents

  1. Introduction
  2. Features
  3. Installation
  4. Usage
  5. Support
  6. Contributing
  7. License

Introduction

OpenHIIT is a fully open source mobile application designed to assist users in their workout routines by providing customizable interval timers. It aims to help users maintain an efficient workout pace by setting intervals for exercise and rest periods.

Features

  • Customizable Timers: Create and customize interval timers according to your workout requirements.
  • Multiple Intervals: Set multiple exercise and rest intervals in a single timer session.
  • Visual and Audio Cues: Get visual and audio cues to indicate the start and end of each interval.
  • Save and Load: Save your favorite interval timer configurations and load them for future use.

Installation

To install and test OpenHIIT, follow these steps:

  1. Ensure you have Flutter and Dart SDK installed on your development environment. For more information, refer to the official Flutter documentation: Flutter Installation

  2. Clone the repository to your local machine using the following command:

    git clone https://github.com/a-mabe/openhiit.git
    
  3. Change your working directory to the cloned repository:

    cd openhiit
    
  4. Fetch the dependencies by running the following command:

    flutter pub get
    
  5. Connect your mobile device or start an emulator.

  6. Launch the application using the following command:

    flutter run
    

The application will be installed on your device/emulator.

Usage

Once OpenHIIT is installed and running on your device, follow these instructions to use the app:

  1. Launch the app and create a new interval timer.

  2. Customize the exercise and rest intervals according to your workout routine.

  3. Save the timer configuration.

  4. Start the timer and follow the visual and audio cues for exercise and rest intervals.

  5. Customize or load different timer configurations as needed.

  6. Provide feedback and report any bugs or issues you encounter during the beta testing phase.

Support

For support and troubleshooting, please visit the support page.

Contributing

Contributions to OpenHIIT are welcome. If you'd like to contribute, please follow these guidelines:

  1. Fork the repository on GitHub.

  2. Create a new branch with a descriptive name for your feature or bug fix.

  3. Make your changes and ensure they follow the project's coding style and guidelines.

  4. Commit your changes and push them to your forked repository.

  5. Submit a pull request, detailing the changes you made and explaining their purpose.

License

OpenHIIT is open-source software released under the MIT License. You are free to modify and distribute the application under the terms of this license. See the LICENSE file for more information.

Please note that this README file is subject to change as the application evolves. Refer to the latest version of this file in the repository for the most up-to-date information.

openhiit's People

Contributors

a-mabe avatar alastairrmcneill avatar aryashakya avatar dhruv282 avatar gantanikhilraj avatar krunal-375 avatar logesh-b avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

openhiit's Issues

[Feature/Improvement] Show interval number during workout

Purpose: As a user, I would like to know how many exercises I have completed and how many are left during the workout.

More details: Show the number that the current exercise corresponds to and total number of workouts, i.e. 4/10 -> completed/remaining.

Acceptance Criteria:

  • Current exercise number and number of total exercises displayed during the workout.

[Feature/Improvement] Simplify setup of workouts with rest periods

Purpose: As a user, I would like to be able to program hiit workouts using a standard set of timings:

  1. Sets
  2. Reps
  3. Rest between reps
  4. Rest between sets
  5. Warm-up / cool-down

More details: Some more details on the feature/improvement

See for example the screenshot which implements 1-4 above (but not 5).

It makes it very easy to schedule a program and I are directly how long it will take.

Doing this for 6 sets or 5 reps (30 intervals), with 30 second break between each set and 10 second rest between reps, using the current workout feature, is very cumbersome.

Screenshot from outdated Fdroid app: https://github.com/kwantam/batsHIIT

Acceptance Criteria:

It is possible to specify in the interval timer screen:

  1. Sets
  2. Reps
  3. Rest between reps
  4. Rest between sets
  5. Warm-up / cool-down

Thank you!

Screenshot_20231108-065852_Bats! HIIT

[Feature/Improvement] Increase seconds or add minutes in the timer

Purpose: As a user, I'd like to use this app also for other types of workouts that require sets longer than 120 seconds

More details: For example WOD such as "AMRAP" that could last 10 minutes, cyclette sets many minutes long or "FOR TIME" workouts in which you have to end it by the time given

Acceptance Criteria:

[Refactor] Follow Proper Naming Conventions

  • Use snake_case (lowercase with underscores) for libraries, directories, packages, and source files.
  • Start private variable names with underscores.
  • Use lowerCamelCase for functions, methods, constants, variables, parameters, and named parameters.
  • Use UpperCamelCase for classes, types, extension names, and enums.

[BUG] iOS status bar text always white

Describe the bug
The text on the iOS status bar is always white and does not change to black when the background is also white. See screenshots for reference, the text is white no matter the background.

To Reproduce
Steps to reproduce the behavior:

  1. With the device set to light mode, open the app.
  2. The background of the home screen will be white. The status bar text will also be white, but it should change to black automatically.

Expected behavior
Status bar text should always be readable.

Screenshots
If applicable, add screenshots to help explain your problem.

Device and Operating System (please complete the following information):

  • OS: iOS 17

Additional context
Add any other context about the problem here.

[Feature/Improvement] Improve sound selection screen

Purpose: As a user, I want to be able to select from a variety of sounds with descriptive names.

More details: Some more details on the feature/improvement

Map the sound file names to descriptive names.

Also, improve the appearance of the page. Something like the following screenshot:

Form field image
From: https://stackoverflow.com/a/56170945/13394227

Acceptance Criteria:

  • Sound selection screen drop downs are visually improved.
  • Each sound has a readable and descriptive name.

[Feature/Improvement] Add more sound options

Purpose: As a user, I would like to be able to choose what sound effects play during my workout.

More details: Provide more than just the default sound effects. Examples of more options:

  • Soft sound effects mode. Sound effects played are less harsh than the default.
  • Vocal mode. Play a voice that starts "Work" and "Rest".
  • Class mode. Play longer sound effects for a group exercise class. This ensures the full group hears the audio cue.
  • No audio mode.

Allow the user to either select these specific modes, or change each sound effect individually.

Acceptance Criteria:

  • Additional sound effect options are provided and are configurable.

[Integration Test] Complete the integration test for creating and saving a Workout

Test: Create a workout

Scenario outline:

  1. Start the app.
  2. Select the +.
  3. Select add a workout.
  4. Use all UI elements to adjust the workout settings on the creation page.
  5. Continue.
  6. Add exercises.
  7. Continue.
  8. Use all UI elements to adjust the work and rest times.
  9. Continue.
  10. Use all UI elements to select audio.
  11. Continue.
  12. Verify that the created workout appears on the home screen.

Verify that:

  1. All number pickers and text inputs work as expected.
  2. The workout is available to select from the app's home screen.

[Feature/Improvement] 3 second audio delayed

Purpose: As a user, I expect audio to sound as the clock shows the 3, 2, 1 second marks.

More details: Currently, the 3, 2, 1 second mark audio is slightly delayed.

Acceptance Criteria:

  • Audio sounds as the 3, 2, 1 second marks occur, not after.

[Feature/Improvement] Inherit device theme

Purpose: As a user, I the application to inherit the device them.

More details: ^

Acceptance Criteria:

  • Application inherits the device them, i.e. light mode/dark mode.

[Feature/Improvement] Increase the max allowed number of exercises

Purpose: As a user, I would like to create an interval timer or workout with more than 50 work intervals.

More details: Currently, the Number of exercises picker only goes up to 50. Increase this to 100 and verify that no issues are introduced, e.g. performance issues when running a workout with 100 exercises.

Acceptance Criteria:

  • Number of exercises picker for both creating a workout and creating an interval is increased to 100 (or less if issues are introduced with the number being as high as 100)
  • Verified that the app does not experience performance issues with the new max number of exercises

Icon too small (and README with non-transparent background)

Describe the bug
Not a user of the application here, but I saw it on the new fresh updates in F-droid (with Izzy's repo) and icon looks a lot smaller than all the other ones. Probably because the icon itself is surrounded by too much empty space compared to its own size. This can somehow be seen on your README in the repo, where the icon would also be benefiting from transparent background, because when you use dark themed GitHub, you see the icon into a very big white square background. The icon's size should be increased compared to the square's size, or the square's size decreased.

Expected behavior
Icon should have a scaling similar to other applications, and a transparent background everywhere.

I don't think screenshots are necessary here, but lemme know if you really need some.

[Feature/Improvement] Confirmation on workout deletion

Purpose: As a user, I would like to be asked for confirmation before a workout is deleted.

More details: Some more details on the feature/improvement

Currently, it is easy to accidentally delete a workout as workouts are immediately deleted upon tapping the delete icon.

Implement something similar to the alert dialog shown here: https://medium.com/multiverse-software/alert-dialog-and-confirmation-dialog-in-flutter-8d8c160f4095

Acceptance Criteria:

  • Deletion confirmation screen appears after tapping the delete icon.

[Feature/Improvement] Show upcoming exercise on the Rest screen.

Purpose: As a user, I would like to see the next exercise during the rest countdown.

More details: ^

Acceptance Criteria:

  • Upcoming exercise is displayed on the rest screen.
  • It is clearly conveyed to the user that the exercise is upcoming, and not the current interval as the current interval should be Rest.

[Feature/Improvement] Add visual cue for the halfway point

Purpose: As a user, I want to be aware of the halfway point while my device's volume is lowered.

More details: Currently, there is only an audio cue at the halfway point of the work interval. There should be a visual cue as well so that the user is aware of the halfway point even when the device's volume is lowered. Some ideas:

  • Invert the background and text colors for a second. I.e. the background will become white and the text will become green.
  • Animate some sort of partially transparent overlay.
  • Flash or animate the seconds on the screen.

Acceptance Criteria:

  • Visual cue implemented to show the halfway mark of each work interval.

[Feature/Improvement] Improve workout finished screen

Purpose: As a user, I want to go back to the view workout screen when all intervals are complete.

More details: ^

Acceptance Criteria:

  • After a workout, the user is sent back to the "view workout" screen so they can restart the workout if needed.

[Bug] Workout restart crashes on iOS

Describe the bug
Crashes when restarting the timer on iOS.

To Reproduce
Steps to reproduce the behavior:

  1. Complete a workout.
  2. Leave the app on the Nice job! screen.
  3. Momentarily exit the OpenHIIT app.
  4. Return to OpenHIIT, and the app will crash.

Expected behavior
The Nice job! screen should not crash when the app is back in the foreground.

Screenshots
If applicable, add screenshots to help explain your problem.

Device and Operating System (please complete the following information):

  • Device: iPhone 12
  • OS: iOS 16.5

Additional context
Add any other context about the problem here.

[Integration Test] Test editing a workout

Test: Test editing a workout

Scenario outline:

  1. Assume an existing workout.
  2. Select the workout.
  3. From the View Workout page, select edit.
  4. Make changes to the workout.
  5. Save the changes and verify they were applied successfully.

Verify that:

  1. An existing workout can successfully be edited and the changes saved.

[Bug] Unable to save workout when the halfway checkbox isn't visible

Purpose: As a user, I don't want the halftime sound effect to interrupt any other sound effects.

More details: When creating a workout, remove the halftime checkbox if the working time is 6 seconds or less so the user can't turn on the halftime. This is because the halfway beep would play over the countdown beeps.

Acceptance Criteria:

  • The user is able to save a workout with a working time of 6 seconds or less and the halfway checkbox disappears.

[Feature/Improvement] Alert the user when there are no workouts to show on the home screen

Purpose: As a user, I would like to know that the app has loaded properly even if there are no workouts to display.

More details: Currently, upon starting the app for the first time, the home screen appears blank since there are no saved workouts to display. Display a message like "No saved timers" so that the user is aware that the app is working as expected.

Acceptance Criteria:

  • When there are no saved workouts/timers, a message such as "No saved timers" is displayed.

[Feature/Improvement] View workout details from home page

Purpose: As a user, I want to know the details of a workout before I select it, such as the total time, number of exercises, exercise time, and rest time.

Description: Refine the workout list tile that is displayed on the home page.

Acceptance Criteria:

  • Total workout time, number of exercises, exercise interval time, and rest interval time are visible.
  • Design scales for a variety of workout inputs.

[Feature/Improvement] Improve the home screen appbar

Purpose: As a user, I want the homepage appbar to have useful functionality but also not get in the way of selecting a workout.

Description: ^

Acceptance Criteria:

  • Appbar is small and works with the homepage design.
  • Appbar allows the user to access settings.

[Bug] Bluetooth not working on iOS

Describe the bug
When playing music through a bluetooth speaker, OpenHIIT will cancel the bluetooth and music will stop playing.

To Reproduce
Steps to reproduce the behavior:

  1. Using an iOS device, connect to a bluetooth speaker or headphones.
  2. Play sound through the bluetooth device.
  3. Start the OpenHIIT app.
  4. Connection to the bluetooth device will be lost.

Expected behavior
OpenHIIT should not interfere with bluetooth.

Screenshots
If applicable, add screenshots to help explain your problem.

Device and Operating System (please complete the following information):

  • Device: [e.g.iPhone12]
  • OS: [e.g. iOS16.5]

Additional context
Add any other context about the problem here.

[BUG] iOS version crashes after leaving the app in the background

Describe the bug
After completing a workout and leaving the app in the background on the Nice job! screen, the app will crash when the user attempts to use the Back or Restart buttons.

To Reproduce
Steps to reproduce the behavior:

  1. Start a workout.
  2. Allow the workout to complete and the app to display the Nice job! screen
  3. Leave the app in the background for several minutes.
  4. Upon bringing the app to the foreground, attempt to use either the Back or Restart buttons.

Expected behavior
App should not crash.

Screenshots
If applicable, add screenshots to help explain your problem.

N/A

Device and Operating System (please complete the following information):

  • Device: iPhone 13 Pro
  • OS: iOS 17.0.3

Additional context
Add any other context about the problem here.

[Feature/Improvement] Swap timer screen colors

Purpose: As a user, I want the timer screen visual cues to be intuitive. Green means "go" (work), red means "stop".

More details: ^

Acceptance Criteria:

  • Work timer screen is green
  • Rest timer screen is red
  • Get ready screen is another color that is not similar to red/green

[Feature/Improvement] Add a check box to make half time optional

Purpose: As a user, I want to be able to create workout with or without a halfway point in the exercise time interval.

More details: If the half time box is checked, half time defaults to zero and there is a sound effect halfway through the exercise time. If the half time is increased, there is a pause equal to the amount of half time in addition to the sound effect at the halfway point.

Acceptance Criteria:

  • Half time check box toggles half time.
  • Workouts without half time have no halfway sound effect.
  • Workouts with half time checked have a half time sound effect.
  • Workouts with a half time above zero have a pause in addition to the sound effect.

[Feature/Improvement]Prepare app for beta

Purpose: As a user, I want all features included in the app to be completed for a smooth experience.

More details: Clean up/remove any features that aren't completed and prep the app to be a finished product.

Acceptance Criteria:

  • Number of intervals correctly displayed for interval timers on the homepage. ✅
  • View workout page does not have empty containers. ✅
  • View workout page shows all interval information. ✅
  • Interval list on timer page horizontal spacing is correct. ✅
  • Interval timer shows "Work" when no exercise provided. ✅
  • Widen "x/10" on workout timer list. ✅
  • Add optional halfway beep.
  • App icon.
  • Fix screen sleep after restart. ✅
  • Character limits. ✅
  • No overflow on create workout/timer screen.

[Feature/Improvement] Reorder timers on the homepage

Purpose: As a user, I would like to be able to reorder the timers I have created.

More details: Some more details on the feature/improvement

Currently, timers are listed on the homepage in order of creation; the oldest timers at the top and the newest at the bottom. Users should be able to reorder timers as needed.

Ideally this will be done by drag and drop as shown here: https://stackoverflow.com/a/71071205/13394227

Acceptance Criteria:

  • Timers on the home screen can be rearranged.

[Bug] Unable to initialize DB on Windows

Seeing the following error:

StateError (Bad state: databaseFactory not initialized
databaseFactory is only initialized when using sqflite. When using `sqflite_common_ffi`
You must call `databaseFactory = databaseFactoryFfi;` before using global openDatabase API
)

[Integration Test] Complete the integration test for creating and saving an Interval Timer

Test: Create an Interval Timer

Scenario outline:

  1. Start the app.
  2. Select the +.
  3. Select add an interval timer.
  4. Use all UI elements to adjust the interval timer settings on the creation page.
  5. Continue.
  6. Use all UI elements to adjust the work and rest times.
  7. Continue.
  8. Use all UI elements to select audio.
  9. Continue.
  10. Verify that the created interval timer appears on the home screen.

Verify that:

  1. All number pickers and text inputs work as expected.
  2. The interval timer is available to select from the app's home screen.

[Feature/Improvement] Inconsistent form field placement on different screen sizes

Purpose: As a user, I want the UI to make sense and have proper formatting on all screen sizes.

More details: Currently, the new interval timer and workout screens have a large amount of empty space above the Name this timer field on larger screens. See screenshots for reference.

Too much space above Name this timer:

Should be more like this:

Acceptance Criteria:

  • The new interval timer and workout screens have consistent formatting on all screen sizes.

Impossible to increase the number of exercises from an existing workout

Describe the bug
If I build and deposit a new workout and try to change the practices, I get a white screen and nothing happens after it.
I try it multiple times with the same effect.

To Reproduce
Steps to reproduce:

  • create a workout with some practices
    - open it and try to change the number of practices upper than before

If I change the number of practices lower than before, it is possible and I don't get an error.

Expected behavior
Accept the changed number of practices.

Screenshots
Screen.png

Device and Operating System (please complete the following information):
- Fairphone 4
- Android 13 (official CalyxOS 4.15.0 - without google services)

Additional context
I don't can use logcat as root and I don't have TWRP as recovery, however it is not possible to get some logs.

[Feature/Improvement] Run the timer in the background

Purpose: As a user, I want the timer to continue running even if OpenHIIT isn't the currently active app.

More details: The timer should continue running even if another app becomes active. For example, if the user opens their music app during a workout the timer should continue counting down.

Acceptance Criteria:

  • When OpenHIIT is not the active app, the timer should continue counting down.
  • Sound effects should also play when OpenHIIT is not the currently active app.

[Bug] Crash on iOS on workout start

Describe the bug

App crash on workout start. Stuck on loading screen.

To Reproduce
Steps to reproduce the behavior:

  1. Open the app and tap on a workout.
  2. Select start.
  3. App will begin to load the workout and will freeze showing the loading spinner.

Expected behavior

Workout to start as expected.

Screenshots
If applicable, add screenshots to help explain your problem.

Device and Operating System (please complete the following information):

  • Device: iPhone 6
  • OS: 15.7.8

Additional context

Logs:

2023-11-28 20:05:16.492398-0500 Runner[24780:557467] flutter: initDB executed
2023-11-28 20:05:17.653133-0500 Runner[24780:557467] flutter: initDB executed
2023-11-28 20:05:18.679078-0500 Runner[24780:557467] [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(2003329396, The operation couldn’t be completed. (OSStatus error 2003329396.), null, null)
StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:651:7)
MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:322:18)

AVAudioSession.setActive (package:audio_session/src/darwin.dart:150:8)

AudioSession.setActive (package:audio_session/src/core.dart:237:14)

2023-11-28 20:05:18.819018-0500 Runner[24780:557234] [ERROR:flutter/shell/platform/darwin/graphics/FlutterDarwinContextMetalImpeller.mm(42)] Using the Impeller rendering backend.
2023-11-28 20:05:20.294721-0500 Runner[24780:558041] [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(1836282486, The operation couldn’t be completed. (OSStatus error 1836282486.), null, null)
StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:651:7)
MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:322:18)

AudioSession.configure (package:audio_session/src/core.dart:202:5)

CountdownState.onStart (package:background_timer/background_timer.dart:333:5)

[Feature/Improvement] Status bar background color match workout screen color

Purpose: As a user, I would like the status bar to match the workout screen.

More details: Some more details on the feature/improvement

Currently, the status bar is a different color than the rest of the screen during the workout. See screenshot:

Screenshot 2023-11-19 at 1 51 54 PM

The status bar color should match the current color of the workout screen, i.e. green, red, or black depending on the timer interval.

Acceptance Criteria:

  • Status bar color matches the rest of the workout screen for a cohesive appearance.

[Feature/Improvement] Edit a Workout

Purpose: As a user, I would like to be able to edit a workout I have already created.

Description: ^

Acceptance Criteria:

  • Edit button shown when viewing a workout allows the user to view the workout in edit mode.

[Feature/Improvement] Create a workout or an interval timer

Purpose: As a user, I want to be able to create an interval timer without adding in exercises.

More details: Allow the user to create a workout with exercises or just a simple interval timer. The workout screen should still work even when an exercise string is not present.

Acceptance Criteria:

  • User can create workout or interval timer.
  • Workout screen works as expected.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.