@@ -0,0 +1,156 @@
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+**Milestone 1: Gall app backend**
41+*1 Star, Estimated delivery date:*
42+Pokes
43+- `%start-activity`: Starts an activity, making it available to receive location information.
44+- `%save-path`: Saves a list of locations to the currently active activity.
45+- `%stop-activity`: Stops an activity, but will allow activity to be continued at a later time.
46+- `%end-activity`: Ends an activity and will not allow further updates.
47+- `%delete-activity`: Deletes an activity.
48+- `%save-settings`: Saves settings, including whether distance should be measured in miles or km
49+Peeks
50+- View details of a previously completed activity
51+/sur
52+```
53+|%
54++$ id @
55++$ timestamp @
56++$ activity-type ?(%bike %walk %run)
57++$ distance-unit ?(%mile %km)
58++$ settings [unit=distance-unit]
59++$ location
60+ $: =timestamp
61+ lattitude=@rs
62+ longitude=@rs
63+ altitude=@rs
64+ heading=@rs
65+ ==
66++$ activity
67+ $: =id
68+ =activity-type
69+ segments=(list segment)
70+ total-distance=@rs
71+ total-elapsed-time=@rs
72+ ==
73++$ activity-summary [=id total-distance=@rs total-elapsed-time=@rs]
74++$ segment
75+ $: start-time=timestamp
76+ end-time=(unit timestamp)
77+ path=(list location)
78+ distance=@rs
79+ elapsed-time=@rs
80+ ==
81++$ activities ((mop id activity) gth)
82++$ action
83+ $% [%start-activity =id =activity-type]
84+ :: [%stop-activity =id path=(list location)]
85+ :: [%end-activity =id path=(list location)]
86+ :: [%delete-activity =id]
87+ [%save-settings unit=distance-unit]
88+ :: [%save-locations =id path=(list location)]
89+ ==
90++$ update
91+ $% [%activities list=(list activity-summary)]
92+ [%activity =activity]
93+ ==
94+--
95+```
96+**Milestone 2: Basic outdoor workout tracking on iPhone**
97+*1 Star, Estimated delivery date:*
98+- Choose between metric and imperial unit systems
99+- Live tracking of an outdoor workout
100+- Path on map updates as user moves
101+- Displays current pace, total distance, average speed
102+- View summary of previously completed workouts
103+- View details of a previously completed workout
104+**Milestone 3: Grid application developed in React**
105+*1 Star, Estimated delivery date:*
106+- View summary of previously completed workouts
107+- View details of a previously completed workout
108+- Edit workout
109+- Can modify the time of the workout to remove a time period at the end of a workout
110+**Milestone 4: Ingest data from various sources**
111+*1 Star, Estimated delivery date:*
112+- Ingest data from common activity file types
113+ - Create gall agent
114+ - Parse Strava data and save to %trail agent
115+ - Parse .gpx files
116+ - Parse .tcx files
117+ - Grid UI
118+ - Ability to enter Strava API access token
119+ - Ability to upload files to be parsed
120+- documentation of agents delivered via `%docs`
121+- App Ecosystem listing submitted via https://urbit.org/applications/submit
122+
123+## Future Integrations
124+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.
125+- A workout routine / training program. This app could also include weightlifting programs as well as cardio.
126+ - Integrates with
127+ - Calendar
128+ - Groups
129+ - Can be used by:
130+ - Users can develop their own routines
131+ - Personal trainers can provide users with custom routines
132+- Exercise challenges. Challenge your friends to see who can accumulate the most miles in a month
133+ - Integrates with
134+ - Calendar
135+ - Groups
136+ - Chat
137+ - %pals / %whom
138+ - Can be used by
139+ - Groups
140+- Spin class. Join a decentralized spin class
141+ - Integrates with
142+ - Web RTC
143+ - Exercise bike
144+ - Groups
145+ - Can be used by
146+ - Spin class instructors
147+- Calorie estimation
148+ - Integrates with
149+ - Heartrate
150+ - Weight
151+
152+## About Me
153+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.
154+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.
155+
156+