mirror of
https://github.com/tappollo/booster.git
synced 2026-04-30 10:32:37 +08:00
docs: bootstrap documentation site (#12)
* chore: remove old README.md * chore: init with docsify * feat: add basic quick start * docs: wip - add firebase config * feat: add more docs * docs: add structure * feat: add back root read me
This commit is contained in:
0
docs/.nojekyll
Normal file
0
docs/.nojekyll
Normal file
26
docs/README.md
Normal file
26
docs/README.md
Normal file
@@ -0,0 +1,26 @@
|
||||
# Project Booster
|
||||
|
||||
> develop native apps for all platforms in half the time and half the manpower
|
||||
|
||||
## What it is
|
||||
|
||||
Scaffolding code, prebuilt UI components and integrated Cl/CD (continuous integration/continuous delivery) for rapid development in iOS, Android and web. Booster helps you develop native apps for all platforms in half the time and half the manpower.
|
||||
|
||||
See the [Quick start](quickstart.md) guide for more details.
|
||||
|
||||
## Features
|
||||
|
||||
- Fully functional app in minutes
|
||||
- The Power of Native Web
|
||||
- Over the air update
|
||||
- Prebuilt components
|
||||
- CI/CD integrations
|
||||
- Scalability, analytics, A/B testing, crash reporting from day one
|
||||
|
||||
## Examples
|
||||
|
||||
TBD
|
||||
|
||||
## Community
|
||||
|
||||
TBD
|
||||
BIN
docs/_images/edit-google-client-id-in-infoplist.png
Normal file
BIN
docs/_images/edit-google-client-id-in-infoplist.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 44 KiB |
27
docs/_sidebar.md
Normal file
27
docs/_sidebar.md
Normal file
@@ -0,0 +1,27 @@
|
||||
- Getting started
|
||||
|
||||
- [Quick start](quickstart.md)
|
||||
- [Create firebase project](firebase-configure.md)
|
||||
- [Run the app](run-the-app.md)
|
||||
|
||||
- Guides
|
||||
|
||||
- [Internal distribution](internal-distribution.md)
|
||||
- [AppStore release](wip.md)
|
||||
- [PlayStore release](wip.md)
|
||||
- [OTA update via CodePush](wip.md)
|
||||
- [CI/CD with Github Actions](wip.md)
|
||||
- [React Native Web](wip.md)
|
||||
|
||||
- Features
|
||||
|
||||
- [SignUp / Login w/ Social Media](wip.md)
|
||||
- [In app Chat](wip.md)
|
||||
- [Notification and DeepLink](wip.md)
|
||||
- [Build in Settings](wip.md)
|
||||
- [Image upload and download](wip.md)
|
||||
- [Video Player](wip.md)
|
||||
- [Live Streaming](wip.md)
|
||||
- [Payment Integration](wip.md)
|
||||
|
||||
- [Changelog](wip.md)
|
||||
78
docs/firebase-configure.md
Normal file
78
docs/firebase-configure.md
Normal file
@@ -0,0 +1,78 @@
|
||||
# Setup Firebase
|
||||
|
||||
## Create project
|
||||
|
||||
Go to firebase console: https://console.firebase.google.com/ and click on **Add Project**
|
||||
|
||||
Replace `PHARAH_FIREBASE_PROJECT` in `.firebaserc` with the **Project ID** from that new project.
|
||||
|
||||
```json
|
||||
{
|
||||
"projects": {
|
||||
"dev": "PHARAH_FIREBASE_PROJECT",
|
||||
"staging": "PHARAH_FIREBASE_PROJECT",
|
||||
"prod": "PHARAH_FIREBASE_PROJECT"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
For starter, you can only replace the `dev` one.
|
||||
|
||||
## Create iOS app
|
||||
|
||||
Go to your firebase project's Dashboard, can click on **Add App**, add an iOS app.
|
||||
|
||||
In iOS bundle ID, put in `com.goboost` with `goboost` replaced with your own project name.
|
||||
|
||||
All the setup has already been done for you, skip the last step.
|
||||
|
||||
Place the downloaded `GoogleService-Info.plist` under `scripts/configs/dev/`
|
||||
|
||||
Open `scripts/configs/dev/GoogleService-Info.plist` and copy the value of key `REVERSED_CLIENT_ID`
|
||||
|
||||
Open `scripts/configs/dev/Info.plist` and replace `PHARAH_GOOGLE_REVERSE_DOMAIN` in with the value your copied
|
||||
|
||||

|
||||
|
||||
!> Never edit the Info.plist in Xcode project directly, that’s just a temporary file
|
||||
|
||||
## Create android app
|
||||
|
||||
Go to your firebase project's Dashboard, can click on **Add App**, add an android app.
|
||||
|
||||
In Android package name, put in `com.goboost` with `goboost` replaced with your own project name.
|
||||
|
||||
Place the `google-service.json` under `scripts/configs/dev/`
|
||||
|
||||
## Create admin service account
|
||||
|
||||
Go to firebase project settings, under **Service Account**
|
||||
|
||||
Generate new private key for Node.js, download and rename it to `adminsdk.json`.
|
||||
|
||||
Place it in `scripts/configs/dev/`
|
||||
|
||||
!> Remember to NEVER push this file to a public repo
|
||||
|
||||
## Enable firebase services
|
||||
|
||||
On firebase console, go to **Authentication**
|
||||
|
||||
- Enable Email / Password
|
||||
- Enable Phone
|
||||
|
||||
Go to **Database**
|
||||
|
||||
- Enable firestore database in lock mode
|
||||
- Enable Realtime database in lock mode
|
||||
|
||||
Go to **Storage**, **Hosting** and **Functions**
|
||||
|
||||
- Click Get Started with default options
|
||||
|
||||
## Optional: Upgrade to pay as you go plan
|
||||
|
||||
With default free tier, you might run into some issues with when billing not enabled.
|
||||
It won't really cost anything, (unless you leaked your `adminsdk.json`).
|
||||
|
||||
> After all these, it's a good time to do another commit
|
||||
30
docs/index.html
Normal file
30
docs/index.html
Normal file
@@ -0,0 +1,30 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>Project Booster</title>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
||||
<meta name="description" content="Description" />
|
||||
<meta
|
||||
name="viewport"
|
||||
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"
|
||||
/>
|
||||
<link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/vue.css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script>
|
||||
window.$docsify = {
|
||||
search: 'auto',
|
||||
name: "Project Booster",
|
||||
repo: "",
|
||||
loadSidebar: true,
|
||||
subMaxLevel: 2
|
||||
};
|
||||
</script>
|
||||
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
|
||||
<script src="//unpkg.com/prismjs/components/prism-bash.min.js"></script>
|
||||
<script src="//unpkg.com/docsify/lib/plugins/emoji.min.js"></script>
|
||||
<script src="//unpkg.com/docsify/lib/plugins/search.min.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
106
docs/internal-distribution.md
Normal file
106
docs/internal-distribution.md
Normal file
@@ -0,0 +1,106 @@
|
||||
# Internal Distribution
|
||||
|
||||
When it comes distribute our builds to QAs, there are usually two options.
|
||||
|
||||
- Internal build distribution with AppCenter, Hockey apps
|
||||
- Official channels like Apple Test Flight and Google Play store's internal trackop
|
||||
|
||||
Where often the official channel takes longer
|
||||
whether it's because their is a review process or simply because they need to
|
||||
extra processing on the build you've uploaded.
|
||||
|
||||
So for faster feedback loop, we usually opt-in for options with internal distributions.
|
||||
|
||||
And since HockeyApp will be deprecated soon, we switched to uses AppCenter instead.
|
||||
|
||||
Beside, we can also use CodePush from AppCenter later in the project.
|
||||
|
||||
## AppCenter
|
||||
|
||||
Go to https://appcenter.ms/apps and create two apps, `goboost-ios` and `goboost-android`.
|
||||
|
||||
For both iOS and android project, go to distribution tab and create a Distribution groups called **Public**. Select `is_public`,
|
||||
This way we don't need our QAs to sign up in AppCenter just to access the builds. Since build provisioning is all done by ourselves.
|
||||
|
||||
Then replace
|
||||
|
||||
- PHARAH_APPCENTER_API_TOKEN obtained from https://appcenter.ms/settings/apitokens
|
||||
- PHARAH_APPCENTER_OWN_NAME
|
||||
- PHARAH_APPCENTER_APP_NAME
|
||||
|
||||
In
|
||||
|
||||
- app/ios/fastlane/Fastfile
|
||||
- app/android/fastlane/Fastfile
|
||||
|
||||
Which appropriate settings
|
||||
|
||||
## iOS signing
|
||||
|
||||
To distribute iOS app, you would need to apply for **Apple Developer Program** https://developer.apple.com/programs/
|
||||
|
||||
We use fastlane match to manage our dev certs, you need to first set it up following https://docs.fastlane.tools/actions/match/
|
||||
|
||||
After which, you can replace
|
||||
|
||||
- PHARAH_APPLE_DEV_ID e.g. `team@tappollo.com`
|
||||
- PHARAH_APPLE_DEV_ITC_TEAM e.g. `118131407` from AppStore Connect
|
||||
- PHARAH_APPLE_DEV_TEAM e.g. `835BXF96BF` from Apple Develop Portal
|
||||
- PHARAH_APPLE_MATCH_CERT_REPO e.g. The private repo you set in previous step
|
||||
|
||||
In
|
||||
|
||||
- app/ios/fastlane/Appfile
|
||||
- app/ios/fastlane/Matchfile
|
||||
|
||||
### Create app in develop portal
|
||||
|
||||
```bash
|
||||
bundle exec fastlane produce -u team@tappollo.com -a com.goboost --skip_itc
|
||||
bundle exec fastlane produce enable_services --push-notification
|
||||
```
|
||||
|
||||
### Enable Push Notifications
|
||||
|
||||
```bash
|
||||
bundle exec fastlane pem
|
||||
bundle exec fastlane pem --development
|
||||
```
|
||||
|
||||
Upload these two set of cert to firebase console under project settings, Cloud message
|
||||
|
||||
## android signing
|
||||
|
||||
In folder `app/android` run
|
||||
|
||||
```bash
|
||||
keytool -genkey -v -keystore ./keystores/release.keystore -alias key -keyalg RSA -keysize 2048 -validity 10000
|
||||
```
|
||||
|
||||
Then edit `app/android/app/build.gradle`
|
||||
|
||||
Replace the `PHARAH_ANDROID_STORE_PASSWORD` and `PHARAH_ANDROID_KEY_PASSWORD` with the ones you input in the step above
|
||||
|
||||
To get SHA1 from this newly generated keystore, run
|
||||
|
||||
```bash
|
||||
keytool -list -v -keystore ./keystores/release.keystore
|
||||
```
|
||||
|
||||
And copy the value after SHA1, go to firestore console,
|
||||
in project settings under **Your apps**, **Add fingerprint**
|
||||
and paste in the SHA1 value you just copied.
|
||||
|
||||
This step is required for accessing some firebase feature in the app like Phone Auth and Google SignIn.
|
||||
|
||||
## Release build
|
||||
|
||||
In `app/ios` or `app/android`
|
||||
|
||||
```bash
|
||||
bundle exec internal tag:0.0.1 changelog:"Initial Release"
|
||||
```
|
||||
|
||||
With `tag` being the build name and `changelog` for what's changed.
|
||||
|
||||
The number is always calculated by current [number_of_commits](https://docs.fastlane.tools/actions/number_of_commits/)
|
||||
24
docs/quickstart.md
Normal file
24
docs/quickstart.md
Normal file
@@ -0,0 +1,24 @@
|
||||
# Quick Start
|
||||
|
||||
You need have node and [yarn](https://yarnpkg.com/en/) install first, because we are use monorepo in our app.
|
||||
|
||||
```bash
|
||||
git clone git@github.com:tappollo/booster.git goboost
|
||||
yarn install
|
||||
```
|
||||
|
||||
!> `goboost` here is used as an example for project name, always replace `goboost` with your project name
|
||||
|
||||
## Initialize
|
||||
|
||||
To customize our project with our own project name,
|
||||
|
||||
```bash
|
||||
./scripts/Starting_over_from_the_beginning.ts goboost
|
||||
```
|
||||
|
||||
> It would be a good time to commit since there were a lot of changes.
|
||||
|
||||
## Next
|
||||
|
||||
Go to [Create new firebase project](firebase-configure.md).
|
||||
48
docs/run-the-app.md
Normal file
48
docs/run-the-app.md
Normal file
@@ -0,0 +1,48 @@
|
||||
# Run the app
|
||||
|
||||
Switch to dev env
|
||||
|
||||
```bash
|
||||
yarn deploy:dev
|
||||
```
|
||||
|
||||
## Run react-native packager
|
||||
|
||||
```bash
|
||||
cd app
|
||||
yarn start
|
||||
```
|
||||
|
||||
## Run iOS app
|
||||
|
||||
To run iOS app, you'd need ruby for both [CocoaPods](https://cocoapods.org/) and [fastlane](https://fastlane.tools/),
|
||||
we recommend setup [rbenv](https://github.com/rbenv/rbenv) since it respects our `.ruby-version` on project root.
|
||||
|
||||
After which you need to run
|
||||
|
||||
```bash
|
||||
cd app/ios
|
||||
gem install bundler
|
||||
bundle
|
||||
bundle exec pod install --repo-update
|
||||
```
|
||||
|
||||
Then `yarn xcode` to open up Xcode and Run the app in simulator.
|
||||
|
||||
## Run android app
|
||||
|
||||
To run android app, you need java 1.8.
|
||||
|
||||
You can install it with
|
||||
|
||||
```bash
|
||||
brew cask install java8
|
||||
```
|
||||
|
||||
Or manually from https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
|
||||
|
||||
After which, run `yarn studio` to open up Android Studio. and use all the default options to setup project.
|
||||
|
||||
Then it's best to [Configure signing for android](internal-distribution.md#android-signing)
|
||||
|
||||
Then start up the app in Android Studio.
|
||||
3
docs/wip.md
Normal file
3
docs/wip.md
Normal file
@@ -0,0 +1,3 @@
|
||||
### WIP
|
||||
|
||||
Coming soon...
|
||||
Reference in New Issue
Block a user