You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This repository contains the Stanford 360 application.
18
+
This repository contains the Stanford 360 application.
19
+
20
+
Stanford 360 is an app that helps children undergoing bariatric surgery follow the 60/60/60 rule to adopt new lifestyle habits. It helps the patients keep track of their physical activity, protein and hydration intake. It is gamified, helps children keep track of their streaks and look at weekly and monthly overviews. It also provides recommendations for activities and meals.
21
+
19
22
Stanford 360 is using the [Spezi](https://github.com/StanfordSpezi/Spezi) ecosystem and builds on top of the [Stanford Spezi Template Application](https://github.com/StanfordSpezi/SpeziTemplateApplication).
20
23
24
+
<!--
25
+
-->
26
+
27
+
## Overview
28
+
29
+
The application has 4 main views: a dashboard, activity tracking, hydration tracking, and meals tracking. It is fully integrated with Firebase and connected to HealthKit. It also sends reminders and notifications.
30
+
21
31
> [!TIP]
22
-
> Do you want to test the Stanford 360 application on your device? [You can downloard it on TestFlight](https://testflight.apple.com/join/s8p84whp).
32
+
> Want to test Stanford 360 on your device? [Download it on TestFlight](https://testflight.apple.com/join/s8p84whp).
33
+
34
+
## Modules Documentation
35
+
36
+
<detailsopen>
37
+
<summary><b>Activity Module</b></summary>
38
+
39
+
The Activity module in Stanford 360 provides comprehensive physical activity tracking with HealthKit integration. Here is how it works:
40
+
1. First tab: Activity Logging:
41
+
(a) The app first shows a ring with their current progress for the day. The goal is to reach 60 minutes of activity.
42
+
(b) It enables the user to input activities: Walking, Running, Dancing, Sports, PE, other. Then, the user needs to select a date and a number of active minutes. Then, the activity gets saved into the history and get stored on Firestore, HealthKit, and locally.
43
+
(c) The app also uses HealthKit step counter to update the activity on the app, converting steps into active minutes.
44
+
(d) The app ensures that the date is in the past.
45
+
(e) Every 20min of activity, the user gets a motivation message.
46
+
(f) Once the user reaches 60 min, a congratulatory message appears.
47
+
(g) The user receives a notification in the morning at 7am and in the afternoon (after class) at 5pm that reflects their progress and motivated them.
48
+
(h) If the user's app is not connected to HealthKit, we show a warning message to let them know that no activity from HealthKit will be imported.
49
+
(i) Whenever the user reached 60min, their streak is updated on the dashboard. The streak reflects the number of consecutive days they reached their goal of 60 min of activity, starting today and going backwards.
50
+
2. History:
51
+
(a) Here, we keep track of the history of logged activity, from latest to oldest. We show the activity type and number of minutes. We categorize them per date.
52
+
(b) We enable editing and deleting of activities with swiping right and left, respectively.
53
+
(c) If the activity is deleted, it gets deleted from Firestore.
54
+
(d) If the activity gets edited, an "editing" sheet pops up to edit the activity.
55
+
3. Recommendation:
56
+
(a) We provide a table with activity recommendations and a link to Youtube videos for other activities ideas.
- Uses Swift concurrency (async/await) for asynchronous operations
65
+
- HealthKit integration is optional; the app functions fully without it
66
+
- Activities use a consistent formula of 100 steps per minute for estimation
67
+
- User-facing dates use relative formatting for improved readability
68
+
- Uses environment objects for dependency injection
69
+
70
+
</details>
71
+
72
+
</details>
73
+
74
+
<details>
75
+
<summary><b>Hydration Module</b></summary>
76
+
77
+
> [!NOTE]
78
+
> Documentation for the Hydration module is under development and will be added in a future update.
79
+
80
+
</details>
81
+
82
+
<details>
83
+
<summary><b>Protein Module</b></summary>
84
+
85
+
> [!NOTE]
86
+
> Documentation for the Protein module is under development and will be added in a future update.
87
+
88
+
</details>
89
+
90
+
<details>
91
+
<summary><b>Dashboard</b></summary>
92
+
93
+
> [!NOTE]
94
+
> Documentation for the Dashboard module is under development and will be added in a future update.
95
+
96
+
</details>
97
+
98
+
<details>
99
+
<summary><b>Profile Management</b></summary>
23
100
101
+
> [!NOTE]
102
+
> Documentation for the Profile Management module is under development and will be added in a future update.
24
103
25
-
## Stanford 360 Features
104
+
</details>
26
105
27
-
*Provide a comprehensive description of your application, including figures showing the application. You can learn more on how to structure a README in the [Stanford Spezi Documentation Guide](https://swiftpackageindex.com/stanfordspezi/spezi/documentation/spezi/documentation-guide)*
106
+
## Common Components
28
107
29
-
> [!NOTE]
30
-
> Do you want to learn more about the Stanford Spezi Template Application and how to use, extend, and modify this application? Check out the [Stanford Spezi Template Application documentation](https://stanfordspezi.github.io/SpeziTemplateApplication)
108
+
<details>
109
+
<summary><b>UI Components</b></summary>
31
110
111
+
> [!NOTE]
112
+
> Documentation for UI Components is under development and will be added in a future update.
113
+
114
+
</details>
115
+
116
+
<details>
117
+
<summary><b>Notification System</b></summary>
118
+
119
+
> [!NOTE]
120
+
> Documentation for the Notification System is under development and will be added in a future update.
121
+
122
+
</details>
123
+
124
+
<details>
125
+
<summary><b>HealthKit Integration</b></summary>
126
+
127
+
> [!NOTE]
128
+
> Documentation for HealthKit Integration is under development and will be added in a future update.
129
+
130
+
</details>
131
+
132
+
<details>
133
+
<summary><b>Firebase Integration</b></summary>
134
+
135
+
> [!NOTE]
136
+
> Documentation for Firebase Integration is under development and will be added in a future update.
137
+
138
+
</details>
139
+
140
+
## Getting Started
141
+
142
+
<details>
143
+
<summary>Installation and Setup</summary>
144
+
145
+
### Prerequisites
146
+
147
+
- Xcode 15.0 or later
148
+
- iOS 17.0 or later
149
+
- macOS 14.0 or later (for development)
150
+
-[CocoaPods](https://cocoapods.org/) for dependency management
- Add your `GoogleService-Info.plist` to the project
172
+
- Update Firebase configuration in `Stanford360App.swift`
173
+
174
+
5. Build and run the application in Xcode
175
+
176
+
</details>
32
177
33
178
## Contributing
34
179
35
-
Contributions to this project are welcome. Please make sure to read the [contribution guidelines](https://github.com/StanfordSpezi/.github/blob/main/CONTRIBUTING.md) and the [contributor covenant code of conduct](https://github.com/StanfordSpezi/.github/blob/main/CODE_OF_CONDUCT.md) first.
180
+
We collaborated equitably throughout the 10 weeks, working closely together and supporting each other on our respective tasks. While each team member had their own responsibilities, most features resulted from our collective efforts, making it challenging to attribute any specific feature to a single individual. However, here is the breakdown of each of our tasks and responsibilities:
181
+
182
+
Elsa worked on the Activity module. She worked on connecting the app to HealthKit and Firestore. She also worked on weekly and monthly charts that were later integrated into the dashboard. She also wrote the onboarding page.
0 commit comments