-
Notifications
You must be signed in to change notification settings - Fork 199
[SELF-698] scaffold mobile sdk demo app #993
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 3 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
39d5693
chore: scaffold mobile sdk demo app
transphorm f5eca1e
test: cover demo app menu
transphorm 5f1c638
prettier and types
transphorm 2d81c8c
sort
transphorm a129d8c
add android app foundation
transphorm 9307c61
fix android loading
transphorm 22b42e7
get ios app running
transphorm 63c7b43
Merge branch 'dev' into codex/remove-demo-app-and-setup-new-one
transphorm 292e1a2
update script
transphorm 34bc155
cr feedback
transphorm 941dfd6
disable fabric
transphorm a2c4151
fixes
transphorm a4b4b5a
fixes
transphorm 6ad8125
fix
transphorm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| name: Mobile SDK Demo CI | ||
|
|
||
| on: | ||
| pull_request: | ||
| paths: | ||
| - "packages/mobile-sdk-alpha/demo-app/**" | ||
| - ".github/workflows/mobile-sdk-demo-ci.yml" | ||
| - ".github/actions/**" | ||
|
|
||
| jobs: | ||
| test: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Install Dependencies | ||
| uses: ./.github/actions/yarn-install | ||
| - name: Run demo app tests | ||
| run: | | ||
| yarn workspace demo-app test | ||
| - name: Build demo app | ||
| run: | | ||
| yarn workspace demo-app build | ||
This file contains hidden or 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
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| demo-app/** |
This file contains hidden or 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
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| // SPDX-FileCopyrightText: 2025 Social Connect Labs, Inc. | ||
| // SPDX-License-Identifier: BUSL-1.1 | ||
| // NOTE: Converts to Apache-2.0 on 2029-06-11 per LICENSE. | ||
|
|
||
| import React from 'react'; | ||
| import { View, Text } from 'react-native'; | ||
|
|
||
| export default function App() { | ||
| return ( | ||
| <View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}> | ||
| <Text style={{ fontSize: 20, marginBottom: 12 }}>Self Demo App</Text> | ||
| <Text>Register Document</Text> | ||
| <Text>Generate Mock</Text> | ||
| <Text>Prove QR Code</Text> | ||
| </View> | ||
| ); | ||
| } |
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| // SPDX-FileCopyrightText: 2025 Social Connect Labs, Inc. | ||
| // SPDX-License-Identifier: BUSL-1.1 | ||
| // NOTE: Converts to Apache-2.0 on 2029-06-11 per LICENSE. | ||
|
|
||
| import React from 'react'; | ||
| import renderer from 'react-test-renderer'; | ||
| import { Text } from 'react-native'; | ||
| import App from '../App'; | ||
|
|
||
| test('renders menu items', () => { | ||
| const rendered = renderer.create(<App />); | ||
| const texts = rendered.root.findAllByType(Text).map(node => node.props.children); | ||
| expect(texts).toEqual(['Self Demo App', 'Register Document', 'Generate Mock', 'Prove QR Code']); | ||
| }); | ||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| { | ||
| "name": "SelfDemoApp", | ||
| "displayName": "Self Demo App" | ||
| } |
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| // SPDX-FileCopyrightText: 2025 Social Connect Labs, Inc. | ||
| // SPDX-License-Identifier: BUSL-1.1 | ||
| // NOTE: Converts to Apache-2.0 on 2029-06-11 per LICENSE. | ||
|
|
||
| module.exports = { | ||
| presets: ['module:metro-react-native-babel-preset'], | ||
| }; |
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| // SPDX-FileCopyrightText: 2025 Social Connect Labs, Inc. | ||
| // SPDX-License-Identifier: BUSL-1.1 | ||
| // NOTE: Converts to Apache-2.0 on 2029-06-11 per LICENSE. | ||
|
|
||
| import { AppRegistry } from 'react-native'; | ||
|
|
||
| import App from './App'; | ||
| import { name as appName } from './app.json'; | ||
|
|
||
| AppRegistry.registerComponent(appName, () => App); |
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| // SPDX-FileCopyrightText: 2025 Social Connect Labs, Inc. | ||
| // SPDX-License-Identifier: BUSL-1.1 | ||
| // NOTE: Converts to Apache-2.0 on 2029-06-11 per LICENSE. | ||
|
|
||
| module.exports = { | ||
| preset: 'react-native', | ||
| moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'], | ||
| transformIgnorePatterns: ['node_modules/(?!(react-native|@react-native|@selfxyz)/)'], | ||
| }; |
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| // SPDX-FileCopyrightText: 2025 Social Connect Labs, Inc. | ||
| // SPDX-License-Identifier: BUSL-1.1 | ||
| // NOTE: Converts to Apache-2.0 on 2029-06-11 per LICENSE. | ||
|
|
||
| const path = require('path'); | ||
| const { getDefaultConfig, mergeConfig } = require('@react-native/metro-config'); | ||
|
|
||
| const projectRoot = __dirname; | ||
| const sdkRoot = path.resolve(projectRoot, '..'); | ||
| const monorepoRoot = path.resolve(projectRoot, '../../..'); | ||
|
|
||
| const config = { | ||
| projectRoot, | ||
| watchFolders: [sdkRoot], | ||
| resolver: { | ||
| nodeModulesPaths: [path.resolve(projectRoot, 'node_modules'), path.resolve(monorepoRoot, 'node_modules')], | ||
| extraNodeModules: { | ||
| '@babel/runtime': path.resolve(monorepoRoot, 'node_modules', '@babel/runtime'), | ||
| }, | ||
| unstable_enableSymlinks: true, | ||
| unstable_enablePackageExports: true, | ||
| }, | ||
| }; | ||
|
|
||
| module.exports = mergeConfig(getDefaultConfig(projectRoot), config); |
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| { | ||
| "name": "demo-app", | ||
| "version": "0.0.1", | ||
| "private": true, | ||
| "main": "index.js", | ||
| "scripts": { | ||
| "start": "react-native start", | ||
| "build": "tsc -p tsconfig.json --noEmit --pretty false", | ||
| "test": "jest" | ||
| }, | ||
| "dependencies": { | ||
| "@babel/runtime": "^7.25.0", | ||
| "react": "18.3.1", | ||
| "react-native": "0.76.9" | ||
| }, | ||
| "devDependencies": { | ||
| "@tsconfig/react-native": "3.0.0", | ||
| "@types/jest": "29.5.11", | ||
| "@types/react": "18.3.4", | ||
| "jest": "29.7.0", | ||
| "metro-react-native-babel-preset": "0.76.9", | ||
| "react-test-renderer": "18.3.1", | ||
| "typescript": "5.9.2" | ||
| } | ||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } | ||
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| // SPDX-FileCopyrightText: 2025 Social Connect Labs, Inc. | ||
| // SPDX-License-Identifier: BUSL-1.1 | ||
| // NOTE: Converts to Apache-2.0 on 2029-06-11 per LICENSE. | ||
|
|
||
| export default function GenerateMock() { | ||
| // TODO: implement mock generation | ||
| return null; | ||
| } |
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| // SPDX-FileCopyrightText: 2025 Social Connect Labs, Inc. | ||
| // SPDX-License-Identifier: BUSL-1.1 | ||
| // NOTE: Converts to Apache-2.0 on 2029-06-11 per LICENSE. | ||
|
|
||
| export default function ProveQRCode() { | ||
| // TODO: implement QR code proof | ||
| return null; | ||
| } |
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| // SPDX-FileCopyrightText: 2025 Social Connect Labs, Inc. | ||
| // SPDX-License-Identifier: BUSL-1.1 | ||
| // NOTE: Converts to Apache-2.0 on 2029-06-11 per LICENSE. | ||
|
|
||
| export default function RegisterDocument() { | ||
| // TODO: implement register document flow | ||
| return null; | ||
| } |
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "extends": "@tsconfig/react-native/tsconfig.json", | ||
| "compilerOptions": { | ||
| "strict": true | ||
| }, | ||
| "include": ["src", "App.tsx", "index.js"] | ||
| } | ||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.