A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
docs: update mobile app README
Abdullah Attae42538c0b962
diff --git a/apps/mobile/README.md b/apps/mobile/README.mdindex 434cf5470..feea81bab 100644--- a/apps/mobile/README.md+++ b/apps/mobile/README.md@@ -1,103 +1,118 @@-# Notesnook for Android & iOS+<p align="center">+<img style="align:center; border-radius: 20px;" src="/resources/screenshots/mobile.jpg" alt="Notesnook mobile screenshot" width="250" />+</p>-The Notesnook mobile app is developed with React Native, helping us to keep a shared codebase for iOS and Android apps and provide great feature parity on both platforms.+<h1 align="center">Notesnook Mobile</h1>+<h3 align="center">The mobile app is built using React Native, Typescript & Javascript for both iOS & Android.</h3>+<p align="center">+<a href="#developer-guide">Developer guide</a> | <a href="#build-instructions">How to build?</a>+</p>-## Releases+<p align="center">+ <a href="https://play.google.com/store/apps/details?id=com.streetwriters.notesnook">+ <img alt="Download on Google Play" src="https://play.google.com/intl/en_us/badges/images/badge_new.png" height=43>+ </a>+ <a href="https://apps.apple.com/us/app/notesnook-take-private-notes/id1544027013">+ <img alt="Download on App Store" src="https://user-images.githubusercontent.com/7317008/43209852-4ca39622-904b-11e8-8ce1-cdc3aee76ae9.png" height=43>+ </a>+</p>-Android and iOS apps can be downloaded from their respective appstores.+## Build instructions-<a href="https://play.google.com/store/apps/details?id=chat.rocket.android">- <img alt="Download on Google Play" src="https://play.google.com/intl/en_us/badges/images/badge_new.png" height=43>-</a>-<a href="https://apps.apple.com/us/app/notesnook-take-private-notes/id1544027013">- <img alt="Download on App Store" src="https://user-images.githubusercontent.com/7317008/43209852-4ca39622-904b-11e8-8ce1-cdc3aee76ae9.png" height=43>-</a>-<a href="https://f-droid.org/packages/YOUR.APP.ID">- <img src="https://fdroid.gitlab.io/artwork/badge/get-it-on.png"- alt="Get it on F-Droid"- height="43">-</a>+> **Before you start it is recommended that you read [the contributing guidelines](/CONTRIBUTING.md).**-Alternatively on android releases are also available on [Github Releases](https://github.com/streetwriters/notesnook/releases).+### Setting up development environment-## Architecture overview+Requirements:-The app codebase is distributed over two primary directories. `native/` and `app/`.--- `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.+1. [Node.js](https://nodejs.org/en/download/)+2. [git](https://git-scm.com/downloads)+3. NPM (not yarn or pnpm)+4. [React Native](https://reactnative.dev/docs/environment-setup)-- `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.+To run the app locally, you will need to setup React Native on your system:-There are several other folders at the root:+1. Open the official [environment setup guide here](https://reactnative.dev/docs/environment-setup)+2. Select `React Native CLI Quickstart`+3. Select your OS & the platform to run the app on (iOS or Android)+4. Follow the steps listed.-- `share/`: Code for the iOS Share Extension and Android widget.-- `e2e/`: Detox End to end tests-- `patches/`: Patches for various react native dependencies.+> Please keep in mind that **Expo is not supported**.-## Setting up development environment+Once you have completed the setup, the first step is to `clone` the monorepo:-To run the app locally, you will first have to configure react native on your machine. Follow the [guide](https://reactnative.dev/docs/environment-setup) here and select React Native CLI Quickstart. Expo is not supported.+```bash+git clone https://github.com/streetwriters/notesnook.git-Once you have completed the configuration, follow the steps below to run the app locally.+# change directory+cd notesnook+```-Install yarn 2 in the project.+Once you are inside the `./notesnook` directory, run the preparation step:```bash-npm install -g yarn+# this might take a while to complete+npm install```-and then run:+### Running the app on Android++[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:```bash-yarn set version berry+npm run start:android```-Open `.yarnrc.yml` and add the following line at the top:+If you want to run the app on your phone, make sure to [enable USB debugging](https://developer.android.com/studio/debug/dev-options).-```yml-nodeLinker: node-modules-```+### Running the app on iOS-Install the dependencies+To run the app on iOS:```bash-yarn install+# this might take a while to complete+npm run prepare:ios++npm run start:ios```-## Running the app on Android+## Developer guide-[Setup an android emulator from Android studio](https://developer.android.com/studio/run/managing-avds) if you haven't already and run the following command from `native/` folder.+> 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!-```-cd native-```+### The tech stack-and+We try to keep the stack as lean as possible-```-yarn run-android-```+1. React Native+2. Typescript/Javascript+3. Zustand: State management+4. Detox: Runs all our e2e tests+5. React Native MMKV: Database & persistence+6. libsodium: Encryption-If you want to run the app on your phone, make sure to [enable USB debugging](https://developer.android.com/studio/debug/dev-options).+### Project structure-## Running the app on iOS+The app codebase is distributed over two primary directories. `native/` and `app/`.-To run the app on iOS, simply run the following command from `native/` folder.+- `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.-```-cd native-```+- `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.-and+There are several other folders at the root:-```-yarn run-ios-```+- `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:diff --git a/resources/screenshots/mobile.jpg b/resources/screenshots/mobile.jpgnew file mode 100644index 000000000..54fdb1ffbBinary files /dev/null and b/resources/screenshots/mobile.jpg differ