Skip to content

DailyGYM is a fitness app for iOS where users can find daily exercises tailored to their condition and skill level. The app generates daily routines and offers a wide variety of exercises, allowing users to create their own routines to suit their needs.

Notifications You must be signed in to change notification settings

alexmaxu/DailyGYM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DailyGYM App

Hi! My name is Alex, and this is a personal project to improve my skills as an iOS developer.

Why DailyGYM?

Many of us spend long hours in front of screens. DailyGYM aims to simplify fitness by eliminating the guesswork and making it easy to stay active, whether you're at home, at work, or on the go.

Overview

DailyGYM is a fitness app designed for iOS to help users maintain an active lifestyle conveniently from their devices. Whether you're a beginner or a seasoned fitness enthusiast, DailyGYM provides tailored daily exercise routines to fit your skill level and personal goals.

MainView DailyRoutine ExerciseDaily Congrats NewRoutine History Profile

Features

  • Daily Routines: Automatically generated daily exercise routines based on your skills and preferences.

    Simulator Screen Recording - iPhone 15 Pro - 2024-06-27 at 10 08 43

  • Customization: Ability to create and customize personal workout routines from a wide variety of exercises.

    Simulator Screen Recording - iPhone 15 Pro - 2024-06-27 at 10 05 32

  • User-Friendly Interface: Intuitive and easy-to-use design for a seamless fitness experience.

    Simulator Screen Recording - iPhone 15 Pro - 2024-06-27 at 10 03 19

  • Motivation: Track your progress and stay motivated with built-in features.

    Simulator Screen Recording - iPhone 15 Pro - 2024-06-27 at 10 11 20

Architecture (MVVM)

MVVM is an architecture that clearly separates presentation logic (View) from business logic (ViewModel) and data (Model).

  • Model: Defines the "Exercise" struct representing an exercise with the name, type muscle, the intensity lvl, video, It implements Identifiable to uniquely identify each exercise in a list, and so on.

    image

  • ViewModel: Acts as an intermediary between the View (UI) and the Model (data and business logic) and manages the state of the View. @Published is a Property Wrapper SwiftUI and Combine framework. It is used in ViewModels to automatically notify the View when a property changes. This enables reactive UI updates based on data changes.

    image

  • View: The view primarily focuses on rendering the user interface and responding to user interactions. In ContentView, it binds to view models to display profile information, daily routines, and exercise lists. It also manages navigation to different views and displays history in a modal sheet based on user actions.

image

Data Persistence

DailyGYM utilizes JSON for data persistence, allowing efficient storage and retrieval of exercise routines. Here's how it works:

  • Encoding and Storage: Exercise routines are encoded into JSON format using JSONEncoder and stored in the local file system of the application.
  • Data Retrieval: Upon application launch, DailyGYM checks for previously saved data. If data is found, it is loaded and used; otherwise, it initializes with an empty array. image

This approach ensures users can maintain and customize their exercise routines, even when offline.

API

All data we use for the app is obtained from an API. DailyGYM connects to an external API to fetch tailored daily exercises and user profiles. We use URLSession in Swift to make HTTP GET requests to the API, which returns data in JSON format. The received data is decoded using JSONDecoder and used to update the local data models in our application.

image image

The API accepts query parameters that allow filtering by a list of specific muscles, name, equipment, and more. However, for simplicity and to keep the app intuitive, DailyGYM primarily uses the muscle type query parameter.

I hope you find it interesting!

Installation

To install DailyGYM, simply clone the repository and run it on your iOS device using Xcode.

Usage

Launch the App: Open DailyGYM on your iOS device.

Explore and Customize: Browse through daily routines or create your own by selecting exercises that suit your needs.

Stay Active: Follow your chosen routine daily to maintain a healthy lifestyle.

Feedback

Your feedback is valuable! If you have any suggestions, issues, or feature requests, please submit an issue or contact us through alexmaxu12@gmail.com.

About

DailyGYM is a fitness app for iOS where users can find daily exercises tailored to their condition and skill level. The app generates daily routines and offers a wide variety of exercises, allowing users to create their own routines to suit their needs.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages