Skip to content

Commit

Permalink
Quest Update, Health UI & Home Page redesign (#218)
Browse files Browse the repository at this point in the history
* feat: add quest page

* feat: allow people fund via the profile page

* feat: display quest list if already subscribed

* feat: update to the quest details page

* fix: one less click to manual edits

* feat: save quests locally, add health card, new api util

* feat: logic to save quest prompt

* fix: make sure questId is added when saving quest prompt

* fix: switch to using async storage

* feat: redesign home ui

* feat: switch to using async storage

* misc: build updates
  • Loading branch information
oreHGA committed May 23, 2024
1 parent b791545 commit 2f3ecac
Show file tree
Hide file tree
Showing 27 changed files with 1,070 additions and 388 deletions.
8 changes: 8 additions & 0 deletions mobile/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,3 +191,11 @@ Expo handles environment variables a little different than regular web app. We s
and then use constants. See appInsights.js for an example. More docs - https://docs.expo.dev/build-reference/variables/

- Follow this doc for neurosity bluetooth integration: https://docs.neurosity.co/docs/api/bluetooth-react-native

### Custom Notifications

Currently used to nudge users on Sundays & at the start of every month to view their Fusion Copilot insights page

- Right now, this notification doesn't present the summaries but it should contain dynamic content movine forward.

- This is dependent on the taskmanager.service.ts
2 changes: 1 addition & 1 deletion mobile/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ missingDimensionStrategy "store", "play"
applicationId 'com.neurofusion.fusion'
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 84
versionCode 86
versionName "2.0.0"
missingDimensionStrategy 'store', 'play'
}
Expand Down
7 changes: 4 additions & 3 deletions mobile/app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,23 @@ export default ({ config }: ConfigContext): ExpoConfig => ({
ios: {
supportsTablet: true,
bundleIdentifier: "com.neurofusion.fusion",
buildNumber: "84",
buildNumber: "86",
backgroundColor: "#0B0816",
config: {
usesNonExemptEncryption: false,
},
infoPlist: {
UIBackgroundModes: ["remote-notification", "fetch"],
},
associatedDomains: ["applinks:usefusion.ai", "applinks:usefusion.app"],
},
android: {
adaptiveIcon: {
foregroundImage: "./assets/icon.png",
backgroundColor: "#0B0816",
},
package: "com.neurofusion.fusion",
versionCode: 84,
versionCode: 86,
softwareKeyboardLayoutMode: "pan",
},
web: {
Expand All @@ -51,7 +52,7 @@ export default ({ config }: ConfigContext): ExpoConfig => ({
process.env.APP_INSIGHTS_CONNECTION_STRING ??
"InstrumentationKey=5a52ca8a-bd71-4c4c-84f6-d51429acbe03;IngestionEndpoint=https://eastus-8.in.applicationinsights.azure.com/;LiveEndpoint=https://eastus.livediagnostics.monitor.azure.com/",
fusionBackendUrl:
process.env.FUSION_BACKEND_API_URL ?? "http://localhost:4000", //"https://neurofusion-backend.azurewebsites.net",
process.env.FUSION_BACKEND_API_URL ?? "https://upset-bugs-look.loca.lt", //"https://neurofusion-backend.azurewebsites.net",
fusionRelayUrl: "wss://relay.usefusion.ai",
fusionNostrPublicKey:
"5f3a52d8027cdde03a41857e98224dafd69495204d93071199aa86921aa02674",
Expand Down
9 changes: 6 additions & 3 deletions mobile/eas.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"developmentClient": true,
"distribution": "internal",
"ios": {
"resourceClass": "m-medium"
"resourceClass": "m-medium",
"image": "macos-sonoma-14.4-xcode-15.3"
},
"env": {
"APP_INSIGHTS_CONNECTION_STRING": "InstrumentationKey=5a52ca8a-bd71-4c4c-84f6-d51429acbe03;IngestionEndpoint=https://eastus-8.in.applicationinsights.azure.com/;LiveEndpoint=https://eastus.livediagnostics.monitor.azure.com/",
Expand All @@ -17,7 +18,8 @@
"preview": {
"distribution": "internal",
"ios": {
"resourceClass": "m-medium"
"resourceClass": "m-medium",
"image": "macos-sonoma-14.4-xcode-15.3"
},
"env": {
"APP_INSIGHTS_CONNECTION_STRING": "InstrumentationKey=5a52ca8a-bd71-4c4c-84f6-d51429acbe03;IngestionEndpoint=https://eastus-8.in.applicationinsights.azure.com/;LiveEndpoint=https://eastus.livediagnostics.monitor.azure.com/",
Expand All @@ -26,7 +28,8 @@
},
"production": {
"ios": {
"resourceClass": "m-medium"
"resourceClass": "m-medium",
"image": "macos-sonoma-14.4-xcode-15.3"
},
"env": {
"APP_INSIGHTS_CONNECTION_STRING": "InstrumentationKey=e9a047e3-efc6-4339-acef-1ef135fd15ea;IngestionEndpoint=https://eastus-8.in.applicationinsights.azure.com/;LiveEndpoint=https://eastus.livediagnostics.monitor.azure.com/",
Expand Down
5 changes: 5 additions & 0 deletions mobile/ios/Fusion/Fusion.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
<dict>
<key>aps-environment</key>
<string>development</string>
<key>com.apple.developer.associated-domains</key>
<array>
<string>applinks:usefusion.ai</string>
<string>applinks:usefusion.app</string>
</array>
<key>com.apple.developer.healthkit</key>
<true/>
<key>com.apple.developer.healthkit.access</key>
Expand Down
4 changes: 3 additions & 1 deletion mobile/ios/Fusion/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>84</string>
<string>86</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSRequiresIPhoneOS</key>
Expand Down Expand Up @@ -93,5 +93,7 @@
<string>Automatic</string>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>deploymentTarget</key>
<string>12.0</string>
</dict>
</plist>
33 changes: 32 additions & 1 deletion mobile/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions mobile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@
"expo-status-bar": "~1.4.4",
"expo-system-ui": "~2.2.1",
"expo-task-manager": "~11.1.1",
"expo-web-browser": "~12.1.1",
"muse-js": "^3.3.0",
"nativewind": "^2.0.11",
"nostr-tools": "1.11.1",
"papaparse": "^5.4.1",
Expand Down Expand Up @@ -85,10 +87,10 @@
"react-native-webview": "^13.8.1",
"react-native-webview-crypto": "^0.0.25",
"react-native-zip-archive": "^6.0.9",
"rxjs": "^7.8.1",
"text-encoding": "^0.7.0",
"uuid": "^9.0.0",
"wrn-echarts": "^0.1.5",
"expo-web-browser": "~12.1.1"
"wrn-echarts": "^0.1.5"
},
"reactNativePermissionsIOS": [
"Notifications",
Expand Down
19 changes: 16 additions & 3 deletions mobile/src/@types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export type PromptAdditionalMeta = {
category?: string;
isNotificationActive?: boolean;
customOptionText?: string; // ; separated list of options
questId?: string;
};

export type CreatePrompt = Omit<Prompt, "notificationConfig_days" | "uuid"> & {
Expand Down Expand Up @@ -88,10 +89,22 @@ export interface Quest {
title: string;
description: string;
guid: string;
startDate?: number;
endDate?: number;
organizerName: string;
startTimestamp?: number;
endTimestamp?: number;
prompts?: Prompt[];
additionalMeta?: object;
config?: string;
organizerName?: string;
}

export interface QuestDataset {
questGuid: string;
type: "prompt_response" | "health";
value: string;
timestamp: number;
}

export interface QuestPrompt {
questId: string;
promptId: string;
}
Loading

0 comments on commit 2f3ecac

Please sign in to comment.