Skip to content

Commit

Permalink
Android app setup SNS-35 (#26)
Browse files Browse the repository at this point in the history
* chore: Minimal runable solution

* docs: Add simple readme to simplify env setup

* feat: Improve .gitignore

* chore: revert incorrect changes

* feat: Add fully workable solution

* chore: Fix small issues

* fix: UI issues accross the app

* fix: UI issues

* feat: Implement wallet connection

* fix: Runtime error

* feat: Add script to build mobile apk

* fix: StatusBar displaying

* fix: Styles issues

* fix: Sticky functionality on domain page

* chore: Small fixes

* fix: App crash if no wallets installed on the device

* fix: Broken domain tabs scroll on web

* fix: App crashing when calling `wallet.authorize` on android

* fix: SVG icons in the cart

* fix: Success page after purchasing

* feat: change RPC url and move it to .env

* chore: Optimize default-pic image size

* feat: Define correct icons for Android app

* chore: Improve Android app package name

* fix: APP_IDENTITY on mobile device

* chore: Add solana dapp init config

* feat: Add preparations for the first release

* chore: Update .nvmrc

* chore: Update solana dapp config

* add addresses to config file

* add address release

* Create .gitignore

* fix: application whitescreen

* new mobile app release

* fix: app performance

* chore: patch "versionCode"

* new mobile release

* new mobile release

* chore: code cleanup

* chore: Add play-store screenshots to assets

* chore: Update .gitignore

* chore: Switch from yarn to npm

* feat: Add CI to verify all entries can be built

* fix: dependencies list to fix mobile build

* fix: Broken mobile build

* feat: Add Privacy Policy link to Android app

* fix: Update Expo app config

* chore: Update translations

* feat: Add Android build to CI

---------

Co-authored-by: DR497 <47689875+dr497@users.noreply.github.com>
  • Loading branch information
letehaha and dr497 authored Nov 10, 2023
1 parent 3efcf2f commit dd86c65
Show file tree
Hide file tree
Showing 83 changed files with 34,804 additions and 15,005 deletions.
8 changes: 8 additions & 0 deletions .env.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
SOLANA_RPC_URL=https://rpc-public.hellomoon.io

# Solana dApp Store variables
# https://docs.solanamobile.com/dapp-publishing/setup

# Path to Android SDK build-tools. On MacOS it's usually looks like:
# /Users/<your_user>/Library/Android/sdk/build-tools/33.0.0
ANDROID_TOOLS_DIR=
31 changes: 31 additions & 0 deletions .github/actions/prepare-local-env/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Prepare local env
description: Prepare local environment by setup node, and cache dependencies
outputs:
cache-hit:
description: Whether the dependencies were cached
value: ${{ steps.npm-cache.outputs.cache-hit }}
runs:
using: composite
steps:
- name: Read .nvmrc
shell: bash
run: echo "##[set-output name=NVMRC;]$(cat .nvmrc)"
id: nvm
- name: Use Node.js (.nvmrc)
uses: actions/setup-node@v4
with:
node-version: "${{ steps.nvm.outputs.NVMRC }}"
- name: Get npm cache directory
shell: bash
id: npm-cache-dir
run: |
echo "::set-output name=dir::$(npm config get cache)"
- uses: actions/cache@v3
id: npm-cache
with:
path: |
**/node_modules
${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
58 changes: 58 additions & 0 deletions .github/workflows/build-entries.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Build apps

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
prepare-dependencies:
name: Prepare local deps
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- id: prepare-env
uses: ./.github/actions/prepare-local-env
- name: Use cache or install dependencies
if: steps.prepare-env.outputs.cache-hit != 'true'
run: npm ci

build-xnft:
name: Build xNFT
needs: prepare-dependencies
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- uses: ./.github/actions/prepare-local-env
- name: Build xNFT
run: npm run build:xnft

build-web:
name: Build web
needs: prepare-dependencies
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- uses: ./.github/actions/prepare-local-env
- name: Build web
run: npm run build:web

build-android:
name: Build Android
needs: prepare-dependencies
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- uses: ./.github/actions/prepare-local-env
- name: 🏗 Setup EAS
uses: expo/expo-github-action@v8
with:
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
- name: Build Android
run: npm run build:mobile:prod
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,8 @@ xnft-bundle.zip

# macOS
.DS_Store
.env
.env

# Android
*.apk
.idea
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v16.18.0
v18.15.0
35 changes: 35 additions & 0 deletions PRIVACY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Privacy Policy for SNS Manager

**Last Updated:** 07/09/2023

Welcome to SNS Manager. We prioritize your privacy and have established this Privacy Policy to explain how we handle user data. Given the nature of our mobile application, the Privacy Policy is notably straightforward: We don't collect or store any of your personal data.

### 1. Information We Do Not Collect

- **Personal Information:** We do not collect any personal information like your name, email address, phone number, or address.

- **Usage Data:** We do not collect data about how you use our app.

- **Location Data:** We do not collect information about your location.

- **Device Data:** We do not collect information about your mobile device, such as the device model, operating system, or other unique device identifiers.

### 2. Third-party services

Our app might use third-party services (APIs) that have their own privacy policies. We cannot guarantee that these services do not collect information about you. We recommend reviewing the privacy policies of these third-party services if you have concerns. We strive to work with third-party services that value user privacy, but the responsibility for data collection by these services is beyond our control.

### 3. Children's Privacy

Our service does not address anyone under the age of 13. Moreover, we do not knowingly collect personal data from anyone under the age of 13. If you are a parent or guardian and you are aware that your child has provided us with personal data, please contact us so that we can take necessary actions.

### 4. Changes to This Privacy Policy

From time to time, we may update our Privacy Policy. Thus, you are advised to review this page periodically for any changes. We will notify you of any changes by posting the new Privacy Policy on this page. These changes are effective immediately after they are posted.

### 5. Contact Us

If you have any questions about this Privacy Policy, please contact us:

- **By email:** contact@bonfida.com

Thank you for using SNS Manager. We value your trust and are committed to protecting your privacy.
18 changes: 17 additions & 1 deletion app.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,23 @@
{
"expo": {
"name": "SNS Manager",
"version": "1.0.0",
"slug": "sns-manager",
"entryPoint": "./src/App"
"orientation": "portrait",
"icon": "./assets/icon.png",
"extra": {
"eas": {
"projectId": "8f89b699-2f93-4ad0-b084-d943e0bb3eb0"
}
},
"android": {
"package": "org.bonfida.sns_manager",
"adaptiveIcon": {
"foregroundImage": "./assets/adaptive-icon.png",
"backgroundColor": "#000000"
},
"versionCode": 4
},
"owner": "sns-manager"
}
}
Binary file added assets/adaptive-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/dapp-store/fida-icon-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/default-pic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/play-store/mobile/cart-payment.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/play-store/mobile/domain-profile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/play-store/mobile/domains-cart.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/play-store/mobile/homescreen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/play-store/mobile/search-domains.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/play-store/tablet-10-inch/cart-payment.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/play-store/tablet-10-inch/domains-cart.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/play-store/tablet-10-inch/homescreen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/play-store/tablet-7-inch/cart-payment.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/play-store/tablet-7-inch/domains-cart.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/play-store/tablet-7-inch/homescreen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,18 @@ module.exports = function (api) {
extensions: [".js", ".jsx", ".ts", ".tsx"],
},
],
[
"module:react-native-dotenv",
{
moduleName: "@env",
path: ".env",
blacklist: null,
whitelist: null,
safe: false,
allowUndefined: true
},
],
"react-native-reanimated/plugin",
],
};
};
34 changes: 34 additions & 0 deletions eas.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"cli": {
"version": ">=4.1.0",
"appVersionSource": "local"
},
"build": {
"development": {
"node": "18.15.0",
"developmentClient": true,
"distribution": "internal"
},
"preview": {
"distribution": "internal",
"node": "18.15.0",
"android": {
"buildType": "apk"
},
"env": {
"SOLANA_RPC_URL": "https://helius-proxy.bonfida.com"
}
},
"production": {
"distribution": "store",
"node": "18.15.0",
"autoIncrement": true,
"android": {
"buildType": "apk"
},
"env": {
"SOLANA_RPC_URL": "https://helius-proxy.bonfida.com"
}
}
}
}
4 changes: 4 additions & 0 deletions metro.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// Learn more https://docs.expo.io/guides/customizing-metro
const { getDefaultConfig } = require('expo/metro-config');

module.exports = getDefaultConfig(__dirname);
Loading

0 comments on commit dd86c65

Please sign in to comment.