Skip to content

Commit 915cbd6

Browse files
authored
Task/readme update (#228)
* Added license * Added StyleGuide * Updated readme * minor grammar * Minor fixes * updated quick start * quickstart style * Fixing styleguide links
1 parent 9f2d333 commit 915cbd6

File tree

3 files changed

+202
-8
lines changed

3 files changed

+202
-8
lines changed

Diff for: LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) Facebook, Inc. and its affiliates.
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

Diff for: README.md

+137-8
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,148 @@
1-
# Functionland Mobile Apps Monorepo
1+
# [Functionland's](https://fx.land/) Mobile Apps Monorepo
22

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
433

534
## Getting started with development
635

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.
848

949
#### To run the iOS apps in development
1050

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+
```
1358

1459
#### To run the Android apps in development
1560

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
18147

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).

Diff for: STYLEGUIDE.md

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Style Guide
2+
3+
Please refer to our [design files](https://github.com/functionland/apps-monorepo/tree/main/design-files) when contributing to either the File Sync app, Blox app or component library.
4+
5+
Here are the style rules to follow:
6+
7+
### 1 - Be consistent with the rest of the codebase
8+
9+
This is the number one rule and should help determine what to do in most cases.
10+
11+
### 2 - Use Restyle Theming
12+
13+
All screens and components are built around [restyle](https://github.com/Shopify/restyle). The Restyle library provides a type-enforced system for building UI components in React Native with TypeScript. Please read through the restyle [documentation](https://github.com/Shopify/restyle/blob/master/README.md) before contributing
14+
15+
### 3 - Respect Prettier and Linter rules
16+
17+
We use a linter and prettier to automatically help you make style guide decisions easy.
18+
19+
### 4 - File Name
20+
21+
Generally file names are PascalCase if they are components or classes, and camelCase otherwise. This is with the exception of the component library (see [rule #1](#1---be-consistent-with-the-rest-of-the-codebase)). Filenames' extension must be .tsx for component files and .ts otherwise.
22+
23+
### 5 - Respect Google JavaScript style guide
24+
25+
The style guide accessible
26+
[here](https://google.github.io/styleguide/jsguide.html) should be
27+
respected. However, if a rule is not consistent with the rest of the codebase,
28+
[rule #1](#1---be-consistent-with-the-rest-of-the-codebase) takes precedence. Same thing goes with any of the above rules taking precedence over this rule.
29+
30+
### 6 - Follow these grammar rules
31+
32+
- Functions descriptions should start with a verb using the third person of the
33+
singular.
34+
- _Ex: `/\*\* Tests the validity of the input. _/`\*
35+
- Inline comments within procedures should always use the imperative.
36+
- _Ex: `// Check whether the value is true.`_
37+
- Acronyms should be uppercase in comments.
38+
- _Ex: `// IP, DOM, CORS, URL...`_
39+
- _Exception: Identity Provider = IdP_
40+
- Acronyms should be capitalized (but not uppercase) in variable names.
41+
- _Ex: `redirectUrl()`, `signInIdp()`_
42+
- Always start an inline comment with a capital (unless referring to the name of
43+
a variable/function), and end it with a period.
44+
- _Ex: `// This is a valid inline comment.`_

0 commit comments

Comments
 (0)