-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
enhanced readme and made SUPABASE_URL const (#16)
- Loading branch information
Showing
2 changed files
with
38 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,22 @@ | |
|
||
To get started have Docker installed and then run `npx supabase start` from the root of the project. | ||
|
||
Go into each web app directory starting with `supabaseApi` and `npm install` them. Run `npm run build` for the CRM, Human Resources, Perks, and Time Tracking apps: | ||
|
||
```bash | ||
cd web/ | ||
cd supabaseApi && npm install && cd .. | ||
``` | ||
|
||
```bash | ||
cd crm && npm install && npm build && cd .. | ||
cd human-resources && npm install && npm build && cd .. | ||
cd perks && npm install && npm build && cd .. | ||
cd time-tracking && npm install && npm build && cd .. | ||
``` | ||
|
||
Once built, the mini apps will be pulled into the Android and iOS projects automatically when the native superapps are built. | ||
|
||
# Auth info | ||
|
||
The usernames and passwords are as follows. | ||
|
@@ -10,3 +26,22 @@ The usernames and passwords are as follows. | |
| [email protected] | il0vedogs | contractor | ||
| [email protected] | il0vedogs | manger | ||
| [email protected] | il0vedogs | sales | ||
|
||
# Android Supabase Configuration | ||
|
||
The Android superapp is configured to look for the Supabase instance at the default host IP address from the perspective of an emulator: `http://10.0.2.2:54321`. If you are testing this demo on a physical device you will need to change this URL to point to the host running the Supabase instance. The URL is located in the DataManager class: https://github.com/ionic-team/portals-super-app-demo/blob/e54c5617dfbe6525489426083a497f21efae4756/android/app/src/main/java/io/ionic/superapp/data/DataManager.kt#L22 | ||
|
||
# Temporary Android Workaround | ||
|
||
The web apps are currently hardcoded to `localhost` to look for the Supabase instance but when running the Android app it needs to point to the host machine IP (default `10.0.2.2` when testing on an Android emulator). Update this hardcoded URL in the following files: | ||
|
||
``` | ||
/web/perks/src/supabase-api/index.ts | ||
/web/supabaseApi/supabaseApi.ts | ||
``` | ||
|
||
Once changed, make sure to rebuild the web apps. This will be adjusted to work differently in a future update. | ||
|
||
# Running Database Migrations | ||
|
||
If the database has changed since your last cloning of the project, pull down updates and then run `npx supabase db reset`. Note that this will remove any data previously added to the DB. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters