fitness challenge
pursuing your fitness goals is fun together with friends. challenge your friends for daily activities and see who’s leading. you can use any fitness trackers such as apple watch, fitbit etc. sync the tracker with apple health / google fit. the app reads daily activities from apple health / google fit.
features
- user signs up and/or signs in
- see all challenges they are participating in and their current rank
- create new challenge and choose the measure type – #steps or calories burned.
- invite friends to the challenge using their email id
- sync their health data from apple health/google fit
- open a challenge and see the leaderboard of all users
fitness challenge is built on flutter and appwrite. it uses appwrite for:
- new user registration
- user login
- storing all documents (new challenges, user activities etc.) in the database
- calculate leaderboard using server side functions
screenshots
getting started
- install appwrite, open appwrite console (https://localhost) and create your project
- add flutter platorm in your appwrite project. update the deployment target as shown in the ios secion
- enable healthkit in capabilities tab in xcode as shown here
- append the following to info.plist
<key>nshealthshareusagedescription</key>
<string>we will sync your data with the apple health app to give you better insights</string>
<key>nshealthupdateusagedescription</key>
<string>we will sync your data with the apple health app to give you better insights</string>
- create the following collections in appwrite console
- users: user_id (text), user_name (text), email (text), health_last_sync (numeric)
- user_activities: user_id (text), measure_type (text), value (numeric)
- challenges: challenge_id (text), challenge_name (text), measure_type (text)
- leaderboard: challenge_id (text), challenge_name (text), user_id (text), user_name (text), email (text), rank (numeric), measure_type (text), value (numeric)
- create user profile creation server side function in appwrite console as described in here
- create leaderboard calculation function in appwrite console as described in here
ui design
welcome, login & sign up pages are taken from this github repo.
what’s next
- user authentication with other oauth providers (google, facebook, twitter etc.) using appwrite’s built-in oauth2 integration
- email verification using appwrite’e email verification feature
- password recovery using appwrite’s password recovery feature
- add a user to the challenge only after their confirmation (currently they are added by default when invited)
- better ui ��
- start date & end date for challenges and declaration of winners
- option to choose other health data types in challenge – currently only steps-count and active-energy-burned are considered for challenge
- integration with google fit (currently integrated with apple health only)
- sync health data incrementally and automatically (without specific button click)
Comments are closed.