[Setup an Android emulator from Android Studio](https://developer.android.com/studio/run/managing-avds) if you haven't already and then run the following command to start the app in the Emulator:
> This project is in a transition state between Javascript & Typescript. We are gradually porting everything over to Typescript so if you can help with that, it'd be great!
-`native/`: Includes `android/` and `ios/` folders and everything related to react native core functionality like bundling, development and packaging. Any react-native dependency that has native code i.e android & ios folders, is installed here.
-`app/`: Includes all the app code other than the native part. All JS only dependencies are installed here.
-`components/`: Each component serves a specific purpose in the app UI, for example the `Paragraph` component is used to render paragraphs in the app and a `Header` component is used to render a `header` on all screens.
-`common/`: Features that have integral role in app functionality, for example, notesnook core is initialized here.
-`hooks/`: Hooks for different app logic
-`navigation/`: Includes app navigation specific code. Here the app navigation, editor & side menu are rendered side by side in fluid tabs.
-`screens`: Navigator screens.
-`services`: Parts of code that do a specific function, for example, the `sync` service is responsibe for running Sync from anywhere in the app.
-`stores`: We use `zustand` for global state management in the app. There are multiple stores that provide the state for different parts of the app.
-`utils`: General purpose stuff such as constant values, utility functions etc.
-`share/`: Code for the iOS Share Extension and Android widget.
-`e2e/`: Detox End to end tests
-`patches/`: Patches for various react native dependencies.
### Running the tests
When you are done making the required changes, you will need to run the tests to make sure you didn't break anything. We use Detox as the testing framework & the tests can be started as follows:
If you face problems, follow the detailed guide in [Detox documentation](https://wix.github.io/Detox/docs/introduction/android-dev-env). Keep the emulator name set to `Pixel_5_API_31`.
Once you have created an emulator device, build the android apks
```
npm run build:android
```
Finally run the tests
```
npm run test:android
```
### iOS
To run e2e tests on iOS simulator, you must be on a Mac with XCode installed.
First install [AppleSimulatorUtils](https://github.com/wix/AppleSimulatorUtils)
```
brew tap wix/brew
brew install applesimutils
```
Now build the iOS app for testing:
```
npm run build:ios
```
Finally run the tests:
```
npm run test:ios
```
All tests on iOS are configured to run on `iPhone 8` simulator.