Skip to content
Merged
Show file tree
Hide file tree
Changes from 45 commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
121cae4
feat: add mock document generator demo
transphorm Aug 31, 2025
64b6d74
feat: add mock document generator
transphorm Aug 31, 2025
e8a92b6
fixes
transphorm Aug 31, 2025
fd65a2c
chore: refresh workflow cache
transphorm Aug 31, 2025
373330b
update lock
transphorm Aug 31, 2025
9458b00
build
transphorm Aug 31, 2025
838467f
updates
transphorm Aug 31, 2025
53c7983
more fixes
transphorm Aug 31, 2025
b60f4ca
code rabbit feedback
transphorm Aug 31, 2025
a9b3869
compiles
transphorm Aug 31, 2025
b1f42db
save wip
transphorm Sep 1, 2025
9a05151
Merge branch 'dev' into codex/ideate-mock-document-screen-for-demo-app
transphorm Sep 3, 2025
3d50569
updates
transphorm Sep 3, 2025
13745d2
Merge branch 'dev' into codex/ideate-mock-document-screen-for-demo-app
transphorm Sep 4, 2025
583092c
Merge branch 'dev' into codex/ideate-mock-document-screen-for-demo-app
transphorm Sep 8, 2025
28cd19b
merge with dev and fixes
transphorm Sep 8, 2025
eb6c3c4
fix: align hoisting and demo Jest resolver (#1003)
transphorm Sep 8, 2025
f83f57b
fix pipeline issues
transphorm Sep 8, 2025
4ccd499
chore: decouple demo app build (#1013)
transphorm Sep 8, 2025
7d920b3
Merge branch 'dev' into codex/ideate-mock-document-screen-for-demo-app
transphorm Sep 11, 2025
435d7b4
Merge branch 'dev' into codex/ideate-mock-document-screen-for-demo-app
transphorm Sep 11, 2025
f1d727e
updates
transphorm Sep 11, 2025
ae9ccde
Merge branch 'dev' into codex/ideate-mock-document-screen-for-demo-app
transphorm Sep 11, 2025
d5fbc11
Merge branch 'dev' into codex/ideate-mock-document-screen-for-demo-app
transphorm Sep 11, 2025
2194aad
remove polyfills
transphorm Sep 11, 2025
05407e8
Merge branch 'dev' into codex/ideate-mock-document-screen-for-demo-app
transphorm Sep 12, 2025
4a63f55
update merge
transphorm Sep 12, 2025
a56067f
Merge branch 'dev' into codex/ideate-mock-document-screen-for-demo-app
transphorm Sep 18, 2025
bd14eb3
update resolutions
transphorm Sep 18, 2025
8a360d0
update resolutions
transphorm Sep 18, 2025
dd8be49
Merge branch 'dev' into codex/ideate-mock-document-screen-for-demo-app
transphorm Sep 19, 2025
2e3f6e7
fix merge
transphorm Sep 19, 2025
ddb5a1d
fix paths
transphorm Sep 19, 2025
c956036
save wip
transphorm Sep 19, 2025
9759064
save wip fixes rd2
transphorm Sep 19, 2025
c4a74bb
working android
transphorm Sep 19, 2025
0845890
update lock
transphorm Sep 19, 2025
7b53e42
save wip ios building
transphorm Sep 19, 2025
3d681e0
Merge branch 'dev' into codex/ideate-mock-document-screen-for-demo-app
transphorm Sep 19, 2025
2205c3f
Merge branch 'dev' into codex/ideate-mock-document-screen-for-demo-app
transphorm Sep 20, 2025
7235716
fix merge
transphorm Sep 20, 2025
777fa3c
Merge branch 'dev' into codex/ideate-mock-document-screen-for-demo-app
transphorm Sep 20, 2025
aeff621
Merge branch 'dev' into codex/ideate-mock-document-screen-for-demo-app
transphorm Sep 20, 2025
8c6ec95
readd public key
transphorm Sep 20, 2025
e634ca6
fixes
transphorm Sep 20, 2025
84adb83
Merge branch 'dev' into codex/ideate-mock-document-screen-for-demo-app
transphorm Sep 23, 2025
9fd0260
ci fixes
transphorm Sep 23, 2025
da2fa0a
fixes
transphorm Sep 23, 2025
7c48df6
fix web building
transphorm Sep 23, 2025
5b2e922
fix ci
transphorm Sep 23, 2025
7009db0
fix tests
transphorm Sep 23, 2025
19c541b
Merge branch 'dev' into codex/ideate-mock-document-screen-for-demo-app
transphorm Sep 23, 2025
2d1994b
update lock
transphorm Sep 23, 2025
583d48f
fix ci rd2
transphorm Sep 24, 2025
a9b3869
formatting and fix ci
transphorm Sep 24, 2025
4083909
fix
transphorm Sep 24, 2025
91b57b7
finalize ci fixes
transphorm Sep 24, 2025
b73b64d
fix tests and metro config paths for building
transphorm Sep 25, 2025
09220ed
save wip
transphorm Sep 25, 2025
76ef3a1
install missing package for pipeline
transphorm Sep 25, 2025
0205d59
Merge branch 'dev' into codex/ideate-mock-document-screen-for-demo-app
transphorm Sep 25, 2025
6d15c19
fix wip app building
transphorm Sep 25, 2025
51c657c
wip react config
transphorm Sep 25, 2025
a202cba
save working emulator compile
transphorm Sep 25, 2025
834e29c
Merge branch 'dev' into codex/ideate-mock-document-screen-for-demo-app
transphorm Sep 25, 2025
45871f8
first round of pr fixes and feedback
transphorm Sep 26, 2025
a12f62f
clean up demo app artifacts from sdk
transphorm Sep 26, 2025
9032caf
Add Gradle wrapper files for mobile-sdk-demo Android build
transphorm Sep 26, 2025
a36113d
codex feedback and fixes
transphorm Sep 26, 2025
cfc1d06
fix tests
transphorm Sep 26, 2025
f541535
file renames
transphorm Sep 26, 2025
77c7a42
revert back to dev
transphorm Sep 26, 2025
7063a33
add types
transphorm Sep 26, 2025
c2476cf
coderabbit fixes
transphorm Sep 26, 2025
4e24a56
fix tests
transphorm Sep 26, 2025
60e276b
fix tests
transphorm Sep 26, 2025
b97ea22
fix test
transphorm Sep 26, 2025
13c7b31
fixes
transphorm Sep 26, 2025
b68833c
fix wip coderabbit issues
transphorm Sep 26, 2025
259b5ac
coderabbit suggestions rd 2
transphorm Sep 26, 2025
af9ae80
Merge branch 'dev' into codex/ideate-mock-document-screen-for-demo-app
transphorm Sep 27, 2025
3832304
fix ci pipelines and addresss warnings
transphorm Sep 27, 2025
3225217
cr fixes
transphorm Sep 27, 2025
1550f1a
convert kebab to camelCase
transphorm Sep 27, 2025
3e336a3
save wip fixes
transphorm Sep 27, 2025
506fc03
update reinstall and lock files
transphorm Sep 27, 2025
9662f35
fixes
transphorm Sep 27, 2025
dc7232d
remove file
transphorm Sep 27, 2025
ee0e0f9
fix lint
transphorm Sep 27, 2025
083f741
fix polyfill fallback issues
transphorm Sep 27, 2025
1a90a75
ensure that mock document is not on ofac list
transphorm Sep 27, 2025
6797d47
prettier
transphorm Sep 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .cursorignore
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,6 @@ app/src/assets/animations/*.json
app/src/assets/fonts/

# Yarn configuration
.yarnrc.yml
**/.yarn/

# Certificate generation config
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/mobile-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ jobs:
- name: Build dependencies (outside emulator)
run: |
echo "Building dependencies..."
yarn workspace @selfxyz/mobile-app run build:deps --silent || { echo "❌ Dependency build failed"; exit 1; }
yarn workspace @selfxyz/mobile-app run build:deps || { echo "❌ Dependency build failed"; exit 1; }
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't silence errors

echo "✅ Dependencies built successfully"
- name: Clone android-passport-reader
uses: ./.github/actions/clone-android-passport-reader
Expand Down Expand Up @@ -293,7 +293,7 @@ jobs:
- name: Build dependencies (outside main flow)
run: |
echo "Building dependencies..."
yarn workspace @selfxyz/mobile-app run build:deps --silent || { echo "❌ Dependency build failed"; exit 1; }
yarn workspace @selfxyz/mobile-app run build:deps || { echo "❌ Dependency build failed"; exit 1; }
echo "✅ Dependencies built successfully"
- name: Install iOS dependencies
run: |
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/mobile-sdk-demo-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Mobile SDK Demo CI
on:
pull_request:
paths:
- "packages/mobile-sdk-alpha/demo-app/**"
- "packages/mobile-sdk-demo/**"
- ".github/workflows/mobile-sdk-demo-ci.yml"
- ".github/actions/**"

Expand All @@ -18,9 +18,14 @@ jobs:
node-version-file: .nvmrc
- name: Install Dependencies
uses: ./.github/actions/yarn-install
- name: Build dependencies (topological)
shell: bash
run: |
# Build demo app and all its transitive workspace deps in the correct order
yarn workspaces foreach -R -t --from mobile-sdk-demo run build
- name: Run demo app tests
run: |
yarn workspace demo-app test
yarn workspace mobile-sdk-demo test
- name: Build demo app
run: |
yarn workspace demo-app build
yarn build:demo
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ showcase
output/*
*.tsbuildinfo
.yarnrc.yml
.giga/tasks/*
package-lock.json

# CI-generated tarballs (don't commit these!)
Expand Down
1 change: 1 addition & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
nodeLinker: node-modules
nmHoistingLimits: workspaces
enableGlobalCache: true
enableScripts: true
checksumBehavior: "update"
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,5 @@ We are actively looking for contributors. Please check the [open issues](https:/
Thanks [Rémi](https://github.com/remicolin), [Florent](https://github.com/0xturboblitz), [Ayman](https://github.com/Nesopie), [Justin](https://github.com/transphorm), [Seshanth](https://github.com/seshanthS), [Nico](https://github.com/motemotech) and all other contributors for building Self.

Thanks [Aayush](https://twitter.com/yush_g), [Vivek](https://twitter.com/viv_boop), [Andy](https://twitter.com/AndyGuzmanEth) and [Vitalik](https://github.com/vbuterin) for contributing ideas and inspiring us to build this technology, and [PSE](https://pse.dev/) for supporting the initial work through grants!

# Cache refresh Sat Aug 30 22:47:05 PDT 2025
2 changes: 2 additions & 0 deletions app/declarations.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@ declare module '*.svg' {
const content: React.FC<SvgProps>;
export default content;
}

declare module 'react-native-svg-circle-country-flags';
2 changes: 1 addition & 1 deletion app/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ target "Self" do
pod "lottie-ios"
pod "SwiftQRScanner", :git => "https://github.com/vinodiOS/SwiftQRScanner"
pod "Mixpanel-swift", "~> 5.0.0"
pod "RNReactNativeHapticFeedback", :path => "../../node_modules/react-native-haptic-feedback", :modular_headers => true
pod "RNReactNativeHapticFeedback", :path => "../node_modules/react-native-haptic-feedback", :modular_headers => true

use_react_native!(
:path => config[:reactNativePath],
Expand Down
362 changes: 181 additions & 181 deletions app/ios/Podfile.lock

Large diffs are not rendered by default.

257 changes: 61 additions & 196 deletions app/metro.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,225 +4,91 @@

const { getDefaultConfig, mergeConfig } = require('@react-native/metro-config');
const path = require('node:path');
const findYarnWorkspaceRoot = require('find-yarn-workspace-root');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok wow nice


const defaultConfig = getDefaultConfig(__dirname);
const { assetExts, sourceExts } = defaultConfig.resolver;

const monorepoRoot = path.resolve(__dirname, '../');
const commonPath = path.join(__dirname, '/../common');
const sdkAlphaPath = path.join(__dirname, '/../packages/mobile-sdk-alpha');
const trueMonorepoNodeModules = path.resolve(__dirname, '../node_modules');
const extraNodeModules = {
stream: require.resolve('stream-browserify'),
buffer: require.resolve('buffer'),
util: require.resolve('util'),
assert: require.resolve('assert'),
'@babel/runtime': path.join(trueMonorepoNodeModules, '@babel/runtime'),
// Pin React and React Native to monorepo root
react: path.join(trueMonorepoNodeModules, 'react'),
'react-native': path.join(trueMonorepoNodeModules, 'react-native'),
'@': path.join(__dirname, 'src'),
'@selfxyz/common': path.resolve(commonPath, 'dist'),
'@selfxyz/mobile-sdk-alpha': path.resolve(sdkAlphaPath, 'dist'),
'@selfxyz/mobile-sdk-alpha/constants/analytics': path.resolve(
sdkAlphaPath,
'dist/esm/constants/analytics.js',
),
'@selfxyz/mobile-sdk-alpha/stores': path.resolve(
sdkAlphaPath,
'dist/esm/stores.js',
),
// Main exports
'@selfxyz/common/utils': path.resolve(
commonPath,
'dist/esm/src/utils/index.js',
),
'@selfxyz/common/types': path.resolve(
commonPath,
'dist/esm/src/types/index.js',
),
'@selfxyz/common/constants': path.resolve(
commonPath,
'dist/esm/src/constants/index.js',
),
// Constants subpaths
'@selfxyz/common/constants/countries': path.resolve(
commonPath,
'dist/esm/src/constants/countries.js',
),
'@selfxyz/common/constants/vkey': path.resolve(
commonPath,
'dist/esm/src/constants/vkey.js',
),
'@selfxyz/common/constants/skiPem': path.resolve(
commonPath,
'dist/esm/src/constants/skiPem.js',
),
'@selfxyz/common/constants/mockCerts': path.resolve(
commonPath,
'dist/esm/src/constants/mockCertificates.js',
),
'@selfxyz/common/constants/hashes': path.resolve(
commonPath,
'dist/esm/src/constants/sampleDataHashes.js',
),
// Utils subpaths
'@selfxyz/common/utils/hash': path.resolve(
commonPath,
'dist/esm/src/utils/hash.js',
),
'@selfxyz/common/utils/attest': path.resolve(
commonPath,
'dist/esm/src/utils/attest.js',
),
'@selfxyz/common/utils/bytes': path.resolve(
commonPath,
'dist/esm/src/utils/bytes.js',
),
'@selfxyz/common/utils/trees': path.resolve(
commonPath,
'dist/esm/src/utils/trees.js',
),
'@selfxyz/common/utils/scope': path.resolve(
commonPath,
'dist/esm/src/utils/scope.js',
),
'@selfxyz/common/utils/proving': path.resolve(
commonPath,
'dist/esm/src/utils/proving.js',
),
'@selfxyz/common/utils/appType': path.resolve(
commonPath,
'dist/esm/src/utils/appType.js',
),
'@selfxyz/common/utils/date': path.resolve(
commonPath,
'dist/esm/src/utils/date.js',
),
'@selfxyz/common/utils/arrays': path.resolve(
commonPath,
'dist/esm/src/utils/arrays.js',
),
'@selfxyz/common/utils/passports': path.resolve(
commonPath,
'dist/esm/src/utils/passports/index.js',
),
'@selfxyz/common/utils/passportFormat': path.resolve(
commonPath,
'dist/esm/src/utils/passports/format.js',
),
'@selfxyz/common/utils/passports/validate': path.resolve(
commonPath,
'dist/esm/src/utils/passports/validate.js',
),
'@selfxyz/common/utils/passportMock': path.resolve(
commonPath,
'dist/esm/src/utils/passports/mock.js',
),
'@selfxyz/common/utils/passportDg1': path.resolve(
commonPath,
'dist/esm/src/utils/passports/dg1.js',
),
'@selfxyz/common/utils/certificates': path.resolve(
commonPath,
'dist/esm/src/utils/certificate_parsing/index.js',
),
'@selfxyz/common/utils/elliptic': path.resolve(
commonPath,
'dist/esm/src/utils/certificate_parsing/elliptic.js',
),
'@selfxyz/common/utils/curves': path.resolve(
commonPath,
'dist/esm/src/utils/certificate_parsing/curves.js',
),
'@selfxyz/common/utils/oids': path.resolve(
commonPath,
'dist/esm/src/utils/certificate_parsing/oids.js',
),
'@selfxyz/common/utils/circuits': path.resolve(
commonPath,
'dist/esm/src/utils/circuits/index.js',
),
'@selfxyz/common/utils/circuitNames': path.resolve(
commonPath,
'dist/esm/src/utils/circuits/circuitsName.js',
),
'@selfxyz/common/utils/circuitFormat': path.resolve(
commonPath,
'dist/esm/src/utils/circuits/formatOutputs.js',
),
'@selfxyz/common/utils/uuid': path.resolve(
commonPath,
'dist/esm/src/utils/circuits/uuid.js',
),
'@selfxyz/common/utils/contracts': path.resolve(
commonPath,
'dist/esm/src/utils/contracts/index.js',
),
'@selfxyz/common/utils/sanctions': path.resolve(
commonPath,
'dist/esm/src/utils/contracts/forbiddenCountries.js',
),
'@selfxyz/common/utils/csca': path.resolve(
commonPath,
'dist/esm/src/utils/csca.js',
),
'@selfxyz/common/utils/ofac': path.resolve(
commonPath,
'dist/esm/src/utils/ofac.js',
),
// Types subpaths
'@selfxyz/common/types/passport': path.resolve(
commonPath,
'dist/esm/src/types/passport.js',
),
'@selfxyz/common/types/app': path.resolve(
commonPath,
'dist/esm/src/types/app.js',
),
'@selfxyz/common/types/certificates': path.resolve(
commonPath,
'dist/esm/src/types/certificates.js',
),
'@selfxyz/common/types/circuits': path.resolve(
commonPath,
'dist/esm/src/types/circuits.js',
),
};
const watchFolders = [
path.resolve(commonPath),
trueMonorepoNodeModules,
path.join(__dirname, 'src'),
path.resolve(sdkAlphaPath),
];
const projectRoot = __dirname;
const workspaceRoot =
findYarnWorkspaceRoot(__dirname) || path.resolve(__dirname, '..');

/**
* Metro configuration
* https://facebook.github.io/metro/docs/configuration
* Modern Metro configuration using native workspace capabilities
* Eliminates need for manual symlink management through:
* - enableGlobalPackages: Automatic workspace package discovery
* - unstable_enablePackageExports: Native subpath import support
* - unstable_enableSymlinks: Optional symlink resolution
*
* @type {import('metro-config').MetroConfig}
*/
const config = {
projectRoot,

watchFolders: [
workspaceRoot, // Watch entire workspace root for changes
path.resolve(workspaceRoot, 'common'),
path.resolve(workspaceRoot, 'packages/mobile-sdk-alpha'),
],

transformer: {
babelTransformerPath: require.resolve(
'react-native-svg-transformer/react-native',
),
disableImportExportTransform: true,
inlineRequires: true,
},

resolver: {
extraNodeModules,
// Prevent Haste module naming collisions from duplicate package.json files
blockList: [
// Ignore built package.json files to prevent Haste collisions
/.*\/dist\/package\.json$/,
/.*\/build\/package\.json$/,
],
// Enable automatic workspace package resolution
enableGlobalPackages: true,

// Handle subpath exports (@selfxyz/common/constants)
unstable_enablePackageExports: true,

// Enable native symlink support (optional, for compatibility)
unstable_enableSymlinks: true,

// Define search order for node modules
nodeModulesPaths: [
path.resolve(__dirname, 'node_modules'), // App's own node_modules
path.resolve(monorepoRoot, 'node_modules'), // Monorepo root node_modules
trueMonorepoNodeModules,
// Add paths to other package workspaces if needed
path.resolve(projectRoot, 'node_modules'), // App's own node_modules
path.resolve(workspaceRoot, 'node_modules'), // Workspace root node_modules
],

// Essential polyfills for React Native
extraNodeModules: {
stream: require.resolve('stream-browserify'),
buffer: require.resolve('buffer'),
util: require.resolve('util'),
assert: require.resolve('assert'),
// App-specific alias
'@': path.join(__dirname, 'src'),
},

// Support package exports with conditions
unstable_conditionNames: ['require', 'react-native'],

// SVG support
assetExts: assetExts.filter(ext => ext !== 'svg'),
sourceExts: [...sourceExts, 'svg'],

// Custom resolver to handle Node.js modules elegantly
// Custom resolver to handle both .js imports in TypeScript and Node.js modules
resolveRequest: (context, moduleName, platform) => {
// For relative imports in common source files that end with .js
if (
context.originModulePath?.includes('/common/src/') &&
moduleName.endsWith('.js')
) {
const tsModuleName = moduleName.replace(/\.js$/, '.ts');
return context.resolveRequest(context, tsModuleName, platform);
}

// Handle problematic Node.js modules that don't work in React Native
const nodeModuleRedirects = {
crypto: require.resolve('crypto-browserify'),
Expand Down Expand Up @@ -251,7 +117,6 @@ const config = {
return context.resolveRequest(context, moduleName, platform);
},
},
watchFolders,
};

module.exports = mergeConfig(defaultConfig, config);
Loading
Loading