@@ -0,0 +1,168 @@
1++++
2+
3+title = "Trail"
4+date = "2022-10-27"
5+
6+[taxonomies]
7+grant_type = ["Proposal"]
8+grant_category = ["App Dev"]
9+
10+[extra]
11+image = ""
12+description = "An application for tracking and reviewing your outdoor workouts via a native mobile OS application, a webapp, and an Urbit backend for your sensitive location data"
13+reward = "4 stars"
14+assignee = ["~hanryc-tirpur"]
15+champion = ["~famhut-wolpyx"]
16+grant_id = "P0197"
17+completed = false
18+canceled = false
19+link = ""
20+
21++++
22+
23+# Trail - An Outdoor Activity Tracker for Urbit
24+Outdoor workout trackers, especially when including social features, generally require users to submit sensitive location data to their servers. With %trail, an Urbit user can keep control over their sensitive location data with their own secure, private server. In addition, social features, such as workout challenges, will not require revealing a user’s social graph to a third party.
25+## App UI
26+Due to the nature of location tracking and map displays in mobile, it would seem best to have two different UIs depending on the context.
27+When out in the world and recording a run/bike ride/hike, the user should be using a native mobile experience.
28+When on a laptop reviewing previous exercises, a user would be using grid (browser), and therefore, will not have the capability to record exercise.
29+## Gall app API
30+The Gall App API will be documented clearly using the `%docs` app, and will address the following considerations:
31+- The %trail gall agent should be kept as small as possible.
32+- There are many possible data sources, implying that the %trail gall agent should not include data source parsing knowledge
33+- Not all users will care about all data sources. This implies:
34+ - Data sources should be separate from the %trail gall agent
35+ - There should be a mechanism to register their existence with the main gall agent
36+ - There could be 3rd party data source parsers that can be install separately from the %trail desk
37+- Indoor and outdoor activities will need to be treated differently.
38+
39+### Milestones & Compensation
40+
41+**Milestone 1: Gall app backend**
42+
43+*1 Star, Estimated delivery date: November 30, 2022*
44+
45+Pokes
46+- `%start-activity`: Starts an activity, making it available to receive location information.
47+- `%save-path`: Saves a list of locations to the currently active activity.
48+- `%stop-activity`: Stops an activity, but will allow activity to be continued at a later time.
49+- `%end-activity`: Ends an activity and will not allow further updates.
50+- `%delete-activity`: Deletes an activity.
51+- `%save-settings`: Saves settings, including whether distance should be measured in miles or km
52+Peeks
53+- View details of a previously completed activity
54+/sur
55+```
56+|%
57++$ id @
58++$ timestamp @
59++$ activity-type ?(%bike %walk %run)
60++$ distance-unit ?(%mile %km)
61++$ settings [unit=distance-unit]
62++$ location
63+ $: =timestamp
64+ lattitude=@rs
65+ longitude=@rs
66+ altitude=@rs
67+ heading=@rs
68+ ==
69++$ activity
70+ $: =id
71+ =activity-type
72+ segments=(list segment)
73+ total-distance=@rs
74+ total-elapsed-time=@rs
75+ ==
76++$ activity-summary [=id total-distance=@rs total-elapsed-time=@rs]
77++$ segment
78+ $: start-time=timestamp
79+ end-time=(unit timestamp)
80+ path=(list location)
81+ distance=@rs
82+ elapsed-time=@rs
83+ ==
84++$ activities ((mop id activity) gth)
85++$ action
86+ $% [%start-activity =id =activity-type]
87+ :: [%stop-activity =id path=(list location)]
88+ :: [%end-activity =id path=(list location)]
89+ :: [%delete-activity =id]
90+ [%save-settings unit=distance-unit]
91+ :: [%save-locations =id path=(list location)]
92+ ==
93++$ update
94+ $% [%activities list=(list activity-summary)]
95+ [%activity =activity]
96+ ==
97+--
98+```
99+
100+**Milestone 2: Basic outdoor workout tracking on iPhone**
101+
102+*1 Star, Estimated delivery date: December 31, 2022*
103+
104+- Choose between metric and imperial unit systems
105+- Live tracking of an outdoor workout
106+- Path on map updates as user moves
107+- Displays current pace, total distance, average speed
108+- View summary of previously completed workouts
109+- View details of a previously completed workout
110+
111+**Milestone 3: Grid application developed in React**
112+
113+*1 Star, Estimated delivery date: January 15, 2023*
114+
115+- View summary of previously completed workouts
116+- View details of a previously completed workout
117+- Edit workout
118+- Can modify the time of the workout to remove a time period at the end of a workout
119+
120+**Milestone 4: Ingest data from various sources**
121+
122+*1 Star, Estimated delivery date: January 31, 2023*
123+
124+- Ingest data from common activity file types
125+ - Create gall agent
126+ - Parse Strava data and save to %trail agent
127+ - Parse .gpx files
128+ - Parse .tcx files
129+ - Grid UI
130+ - Ability to enter Strava API access token
131+ - Ability to upload files to be parsed
132+- documentation of agents delivered via `%docs`
133+- App Ecosystem listing submitted via https://urbit.org/applications/submit
134+
135+## Future Integrations
136+When more of the base layer of health applications get built out, there are some exciting features that can be created by combining data from other apps.
137+- A workout routine / training program. This app could also include weightlifting programs as well as cardio.
138+ - Integrates with
139+ - Calendar
140+ - Groups
141+ - Can be used by:
142+ - Users can develop their own routines
143+ - Personal trainers can provide users with custom routines
144+- Exercise challenges. Challenge your friends to see who can accumulate the most miles in a month
145+ - Integrates with
146+ - Calendar
147+ - Groups
148+ - Chat
149+ - %pals / %whom
150+ - Can be used by
151+ - Groups
152+- Spin class. Join a decentralized spin class
153+ - Integrates with
154+ - Web RTC
155+ - Exercise bike
156+ - Groups
157+ - Can be used by
158+ - Spin class instructors
159+- Calorie estimation
160+ - Integrates with
161+ - Heartrate
162+ - Weight
163+
164+## About Me
165+I am a recent Hoon School Live and App School Live graduate. I also have 18 years of experience developing web apps and APIs using various back-end technologies including .NET and node.js, as well as modern JavaScript front-end frameworks including React/Redux, Vue, and Svelte over the past 6 years.
166+As importantly, I am extremely passionate about having fitness tracking and biometric data integrated with Urbit. It was the first use case that came to mind while reading the initial blog post describing Urbit.
167+
168+