-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* monorepo draft * Add @noble/hashes/utils as a dep in nr-app. * configure pnpm node-linker * add android and ios to gitignore so we stay in managed workflow * remove production config because we're not using it * don't add build files to repo * ignore android app bundles * add google maps api key * add api keys * ios build config answer about encryption use * use default provider in expo go bc google is not supported * only use google maps on android * ignore ios builds * update lock file * remove unused google config * remove superfluous comma * readme and config * update readme * change readme * update READMEs --------- Co-authored-by: Callum Macdonald <[email protected]>
- Loading branch information
Showing
69 changed files
with
14,155 additions
and
141 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
@jsr:registry=https://npm.jsr.io | ||
node-linker=hoisted |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,12 @@ | ||
# Welcome to your Expo app 👋 | ||
# Nostroots mobile app. | ||
|
||
This is an [Expo](https://expo.dev) project created with [`create-expo-app`](https://www.npmjs.com/package/create-expo-app). | ||
|
||
## Get started | ||
## Getting started | ||
First, run `pnpm i`. | ||
|
||
1. Install watchman (or equivalent on *nix) | ||
The fastest way to get started is using Expo go: | ||
In `nr-app`, run `pnpm run start` and choose Expo Go. You can try starting an emulator or simulator from here if you have it installed. Alternatively, install the Expo Go app on your mobile device and scan the QR code. | ||
|
||
```bash | ||
brew install watchman | ||
``` | ||
If you want to use a development build, you can switch to that by pressing `s`. Open an emulator or simulator with this build using the commands available. | ||
|
||
2. Use nvm to set the correct node version. Make sure you have the appropriate version of node installed (`nvm i`). | ||
|
||
```bash | ||
nvm use | ||
``` | ||
|
||
3. Enable pnpm | ||
|
||
```bash | ||
corepack enable pnpm | ||
``` | ||
|
||
4. Install dependencies | ||
|
||
```bash | ||
pnpm install | ||
``` | ||
|
||
5. Start the app | ||
|
||
```bash | ||
pnpm start | ||
``` | ||
|
||
(If you get a `too many open files` error, `rm -rf node_modules; npm install` will [fix](https://github.com/Trustroots/nostroots/issues/30) this, funny enough.) | ||
|
||
### View the app | ||
|
||
You cannot (currently) view the app in the web. The maps package is not supported on web. The easiest option is to install an app called Expo Go into your phone. Then you can scan the QR code that was output in the terminal from the `pnpm start` command and the app will load onto your phone. | ||
|
||
This requires that your phone and computer are on the same network, and that your phone can load the app from your computer. | ||
|
||
You can also install Android Studio or XCode and then load the app in a simulator. That is beyond the scope of this readme, but [the expo docs](https://docs.expo.dev/get-started/set-up-your-environment/) are a good place to start. | ||
|
||
## Learn more | ||
|
||
To learn more about developing your project with Expo, look at the following resources: | ||
|
||
- [Expo documentation](https://docs.expo.dev/): Learn fundamentals, or go into advanced topics with our [guides](https://docs.expo.dev/guides). | ||
- [Learn Expo tutorial](https://docs.expo.dev/tutorial/introduction/): Follow a step-by-step tutorial where you'll create a project that runs on Android, iOS, and the web. | ||
|
||
## Join the community | ||
|
||
Join our community of developers creating universal apps. | ||
|
||
- [Expo on GitHub](https://github.com/expo/expo): View our open source platform and contribute. | ||
- [Discord community](https://chat.expo.dev): Chat with Expo users and ask questions. | ||
If you want to run a development build on your phone, you'll have to download the latest app and scan the QR code with it. For Android, you can use an existing build from https://expo.dev/accounts/nostroots/projects/nr-app/builds/ . For iOS, you'd have to register your device first using `eas devices` and then make a build. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"cli": { | ||
"version": ">= 14.2.0", | ||
"appVersionSource": "remote" | ||
}, | ||
"build": { | ||
"development": { | ||
"developmentClient": true, | ||
"distribution": "internal" | ||
}, | ||
"preview": { | ||
"distribution": "internal" | ||
}, | ||
"production": {} | ||
}, | ||
"submit": { | ||
"production": {} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,19 @@ | ||
// Learn more https://docs.expo.io/guides/customizing-metro | ||
// Learn more https://docs.expo.dev/guides/monorepos | ||
const { getDefaultConfig } = require("expo/metro-config"); | ||
const path = require("path"); | ||
|
||
/** @type {import('expo/metro-config').MetroConfig} */ | ||
const config = getDefaultConfig(__dirname); | ||
const projectRoot = __dirname; | ||
const workspaceRoot = path.resolve(projectRoot, ".."); | ||
|
||
const extraConfig = { | ||
watchFolders: [path.resolve(`${__dirname}/../nr-common/`)], | ||
}; | ||
const config = getDefaultConfig(projectRoot); | ||
|
||
const mergedConfig = { ...config, ...extraConfig }; | ||
// Since we are using pnpm, we have to setup the monorepo manually for Metro | ||
// #1 - Watch all files in the monorepo | ||
config.watchFolders = [workspaceRoot]; | ||
// #2 - Try resolving with project modules first, then workspace modules | ||
config.resolver.nodeModulesPaths = [ | ||
path.resolve(projectRoot, "node_modules"), | ||
path.resolve(workspaceRoot, "node_modules"), | ||
]; | ||
|
||
module.exports = mergedConfig; | ||
module.exports = config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,8 +5,8 @@ | |
"scripts": { | ||
"start": "expo start", | ||
"reset-project": "node ./scripts/reset-project.js", | ||
"android": "expo start --android", | ||
"ios": "expo start --ios", | ||
"android": "expo run:android", | ||
"ios": "expo run:ios", | ||
"web": "expo start --web", | ||
"test": "jest --watchAll", | ||
"lint": "expo lint", | ||
|
@@ -23,9 +23,11 @@ | |
"@mobily/ts-belt": "^3.13.1", | ||
"@react-navigation/native": "^7.0.3", | ||
"@reduxjs/toolkit": "^2.2.7", | ||
"@trustroots/nr-common": "workspace:*", | ||
"expo": "~52.0.8", | ||
"expo-constants": "~17.0.3", | ||
"expo-crypto": "~14.0.1", | ||
"expo-dev-client": "~5.0.7", | ||
"expo-font": "~13.0.1", | ||
"expo-linking": "~7.0.3", | ||
"expo-router": "~4.0.7", | ||
|
@@ -42,14 +44,14 @@ | |
"open-location-code-typescript": "^1.5.0", | ||
"react": "18.3.1", | ||
"react-dom": "18.3.1", | ||
"react-native": "0.76.2", | ||
"react-native": "0.76.5", | ||
"react-native-gesture-handler": "~2.20.2", | ||
"react-native-get-random-values": "^1.11.0", | ||
"react-native-maps": "1.18.0", | ||
"react-native-reanimated": "~3.16.1", | ||
"react-native-root-toast": "^3.6.0", | ||
"react-native-safe-area-context": "4.12.0", | ||
"react-native-screens": "4.1.0", | ||
"react-native-screens": "4.4.0", | ||
"react-native-web": "~0.19.13", | ||
"react-redux": "^9.1.2", | ||
"reactotron-react-native": "^5.1.10", | ||
|
@@ -58,6 +60,7 @@ | |
"redux-saga-promise-actions": "^1.3.5", | ||
"reselect": "^5.1.1", | ||
"url-join": "^5.0.0", | ||
"utils": "link:@noble/hashes/utils", | ||
"zod": "^3.23.8" | ||
}, | ||
"devDependencies": { | ||
|
@@ -68,6 +71,7 @@ | |
"@types/react": "~18.3.12", | ||
"@types/react-test-renderer": "^18.0.7", | ||
"babel-plugin-module-resolver": "^5.0.2", | ||
"babel-plugin-root-import": "^6.6.0", | ||
"eslint": "^8.57.0", | ||
"eslint-config-expo": "^8.0.1", | ||
"eslint-config-prettier": "^9.1.0", | ||
|
@@ -79,11 +83,17 @@ | |
"react-test-renderer": "18.2.0", | ||
"typescript": "~5.3.3" | ||
}, | ||
"pnpm": { | ||
"overrides": { | ||
"redux": "^5.0.1" | ||
} | ||
}, | ||
"private": true, | ||
"packageManager": "[email protected]+sha512.e5a7e52a4183a02d5931057f7a0dbff9d5e9ce3161e33fa68ae392125b79282a8a8a470a51dfc8a0ed86221442eb2fb57019b0990ed24fab519bf0e1bc5ccfc4" | ||
} | ||
"packageManager": "[email protected]+sha512.e5a7e52a4183a02d5931057f7a0dbff9d5e9ce3161e33fa68ae392125b79282a8a8a470a51dfc8a0ed86221442eb2fb57019b0990ed24fab519bf0e1bc5ccfc4", | ||
"expo": { | ||
"doctor": { | ||
"reactNativeDirectoryCheck": { | ||
"listUnknownPackages": false, | ||
"exclude": [ | ||
"expo-split-pane", | ||
"react-native-maps" | ||
] | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.