|
1 |
| -# Functionland Mobile Apps Monorepo |
| 1 | +# [Functionland's](https://fx.land/) Mobile Apps Monorepo |
2 | 2 |
|
3 |
| -This is the monorepo using [nx](https://nx.dev) that contains the source for the Box, File Manager, and Design System component library projects. |
| 3 | +This is the monorepo using [nx](https://nx.dev) that contains the source for the **Blox App**, **File Sync App**, and Design System **component library** projects. |
| 4 | + |
| 5 | +<table> |
| 6 | + <tr> |
| 7 | + <td width="35%"> |
| 8 | + <p>Blox<p> |
| 9 | + <img src="https://user-images.githubusercontent.com/17250443/189409007-ffa2cf49-98db-4f48-9ed2-899a56b44848.gif" /> |
| 10 | + </td> |
| 11 | + <td width="35%"> |
| 12 | + <p>File Sync<p> |
| 13 | + <img src="https://user-images.githubusercontent.com/17250443/189410320-8536a82e-7abf-4b53-bab2-1f6b8d79d65a.gif" /> |
| 14 | + </td> |
| 15 | + </tr> |
| 16 | +</table> |
| 17 | + |
| 18 | +## About the Apps |
| 19 | + |
| 20 | +Functionland's FxBlox hardware is managed and used by the `File Sync` and `Blox` apps. `Blox` and `File Sync` can be used independently of each other. The `Blox` app is responsible for managing, controlling and configuring the FxBlox hardware as well as the setup / linking of wallets for to receiving Fula (rewards) tokens. If you have FxBlox hardware, you will need the Blox app. The `File Sync` app is responsible for utilizing the FxBlox hardware as a decentralized storage solution for your data. |
| 21 | + |
| 22 | +> Note: The word "box" is used interchangeably for "blox" |
| 23 | +
|
| 24 | +<br> |
| 25 | + |
| 26 | +### Quick start |
| 27 | + |
| 28 | +In the root run `yarn` followed by `yarn ios` and see our [STYLEGUIDE](https://github.com/functionland/apps-monorepo/blob/main/STYLEGUIDE.md) when [contributing](#contributing-to-the-monorepo). |
| 29 | + |
| 30 | +<br> |
| 31 | + |
| 32 | +# Development |
4 | 33 |
|
5 | 34 | ## Getting started with development
|
6 | 35 |
|
7 |
| -In the project root run `yarn install`, this will install all the required dependencies across all the projects. You will need `cocoapods`, a valid JDK installation, CMake 3.10.2 (Android only, available through Android Studio), and Gradle 7 installed on your Mac. `nx` as a global dependency is optional. |
| 36 | +In the project root run `yarn install`, this will install all the required dependencies across all the projects. |
| 37 | + |
| 38 | +#### Requirements |
| 39 | + |
| 40 | +Setup your development environment according to [react native setup documentation](https://reactnative.dev/docs/environment-setup) |
| 41 | + |
| 42 | +Additional requirements: |
| 43 | + |
| 44 | +- CMake 3.10.2 (Android only, available through Android Studio) |
| 45 | +- `nx` as a global dependency (optional). |
| 46 | + |
| 47 | +It is easiest to develop in a Unix based environment as there is currently an [issue](https://github.com/functionland/apps-monorepo/issues/224) open for Windows in relation to CMake. |
8 | 48 |
|
9 | 49 | #### To run the iOS apps in development
|
10 | 50 |
|
11 |
| -- `yarn ios file-manager` |
12 |
| -- `yarn ios box` |
| 51 | +```sh |
| 52 | +yarn ios file-manager |
| 53 | +``` |
| 54 | + |
| 55 | +```sh |
| 56 | +yarn ios box |
| 57 | +``` |
13 | 58 |
|
14 | 59 | #### To run the Android apps in development
|
15 | 60 |
|
16 |
| -- `yarn android file-manager` |
17 |
| -- `yarn android box` |
| 61 | +```sh |
| 62 | +yarn android file-manager |
| 63 | +``` |
| 64 | + |
| 65 | +```sh |
| 66 | +yarn android box |
| 67 | +``` |
| 68 | + |
| 69 | +Running these commands will install the required native dependencies via Gradle or Cocoapods. |
| 70 | + |
| 71 | +These commands are shorthand for: `nx start [app]` followed by `nx run-ios [app]`. |
| 72 | + |
| 73 | +The default project is `box` |
| 74 | + |
| 75 | +## Project structure |
| 76 | + |
| 77 | +There are 3 core parts to the folder structure: |
| 78 | + |
| 79 | +- [Component Library](https://github.com/functionland/apps-monorepo/tree/main/libs/component-library) (Completed): |
| 80 | + - 📁 `libs/component-library` |
| 81 | + - 📄 `src/index.ts` exports all components from the component library in `src/lib` |
| 82 | +- [Blox](https://github.com/functionland/apps-monorepo/tree/main/apps/box) app (WIP): |
| 83 | + - 📁 `apps/box` |
| 84 | + - 📁 `src`: Contains the actual TypeScript + React-Native FB mobile for the Blox app. |
| 85 | + - 📁 `ios`: Contains the basic skeleton for a React Native iOS app, plus the native |
| 86 | + - 📁 `android`: Contains the basic skeleton for a React Native Android app, plus the native |
| 87 | +- [File Sync](https://github.com/functionland/apps-monorepo/tree/main/apps/file-manager) app (To Do): |
| 88 | + - 📁 `apps/file-manger` |
| 89 | + - 📁 `src`: Contains the actual TypeScript + React-Native FB mobile for the File Sync app. |
| 90 | + - 📁 `ios`: Contains the basic skeleton for a React Native iOS app, plus the native |
| 91 | + - 📁 `android`: Contains the basic skeleton |
| 92 | + |
| 93 | +The designs for the app can be found under the design files folder [`design-files`](https://github.com/functionland/apps-monorepo/tree/main/design-files) |
| 94 | + |
| 95 | +## Restyle |
| 96 | + |
| 97 | +A core library to this monorepo is [Shopify's restyle library](https://github.com/Shopify/restyle). This ensures a consistent design language when developing the apps and enables easy plug and play theming with light and dark themes (or any other). We have setup base light and dark themes in the component library [theme.ts file](https://github.com/functionland/apps-monorepo/blob/main/libs/component-library/src/lib/theme/theme.ts). The `Blox` and `File sync` apps can implement this theme directly or hydrate their own themes from these base themes. See our [style guide rules](https://github.com/functionland/apps-monorepo/blob/main/STYLEGUIDE.md) for more info. |
| 98 | + |
| 99 | +# Contributing to the Monorepo |
| 100 | + |
| 101 | +You can contribute by beta testing or by submitting code to either apps (File Sync and Blox) or submitting code to the component library. |
| 102 | +If you plan to make a contribution please do so through [our contribution steps](#contribution-steps). You can also join us on Discord to discuss ideas. |
| 103 | + |
| 104 | +When submitting code, please make every effort to follow existing [conventions and style](https://github.com/functionland/apps-monorepo/blob/main/STYLEGUIDE.md) in order to keep the code as readable as possible. |
| 105 | + |
| 106 | +Please always be respectful when contributing. |
| 107 | + |
| 108 | +<br> |
| 109 | + |
| 110 | +## How To Run locally? |
| 111 | + |
| 112 | +See [Getting started](#getting-started-with-development) |
| 113 | + |
| 114 | +## Submitting a PR |
| 115 | + |
| 116 | +- For every PR there should be an accompanying [issue](https://github.com/functionland/apps-monorepo/issues) which the PR solves. If there isn't one please create it. |
| 117 | + |
| 118 | +- The PR itself should only contain code which is the solution for the given issue |
| 119 | + |
| 120 | +- If you are a first time contributor check if there is a [good first issue](https://github.com/functionland/apps-monorepo/labels/good%20first%20issue) for you |
| 121 | + |
| 122 | +## Contribution steps |
| 123 | + |
| 124 | +1. Fork this repository to your own repositiry. |
| 125 | + |
| 126 | +2. Clone the forked repositiry to your local machine. |
| 127 | + |
| 128 | +3. Create your feature branch: `git checkout -b my-new-feature` |
| 129 | + |
| 130 | +4. Make changes to the project. |
| 131 | + |
| 132 | +5. Commit your changes: `git commit -m 'Add some feature'` |
| 133 | + |
| 134 | +6. Push to the branch: `git push origin my-new-feature` |
| 135 | + |
| 136 | +7. Submit a pull request :D |
| 137 | + |
| 138 | +## License |
| 139 | + |
| 140 | +By contributing your code, you agree to license your contribution under the terms of the [MIT License](https://github.com/functionland/apps-monorepo/blob/main/LICENSE) license. |
| 141 | + |
| 142 | +All files are released with the MIT License license. |
| 143 | + |
| 144 | +# Misc |
| 145 | + |
| 146 | +### Unresolved branches |
18 | 147 |
|
19 |
| -Running these commands will install the required the native dependencies via Gradle or Cocoapods. |
| 148 | +[Rewards Screen](https://github.com/functionland/apps-monorepo/tree/feat/rewards-screen) branch relating to the rewards screen is unresolved and in a [draft PR](https://github.com/functionland/apps-monorepo/pull/229). |
0 commit comments