Skip to content

Commit

Permalink
feat: new app setup (#44)
Browse files Browse the repository at this point in the history
* refactor: delete old app architecture

Signed-off-by: Sai Ranjit Tummalapalli <[email protected]>

* refactor: delete old app architecture

Signed-off-by: Sai Ranjit Tummalapalli <[email protected]>

* feat: new app setup

Signed-off-by: Sai Ranjit Tummalapalli <[email protected]>

---------

Signed-off-by: Sai Ranjit Tummalapalli <[email protected]>
  • Loading branch information
sairanjit authored Aug 8, 2023
1 parent 428e1a4 commit 24cb476
Show file tree
Hide file tree
Showing 554 changed files with 34,220 additions and 94,168 deletions.
2 changes: 2 additions & 0 deletions .bundle/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
BUNDLE_PATH: "vendor/bundle"
BUNDLE_FORCE_RUBY_PLATFORM: 1
3 changes: 0 additions & 3 deletions .commitlintrc.json

This file was deleted.

1 change: 1 addition & 0 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
MEDIATOR_URL=
6 changes: 6 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node_modules
__tests__
__mocks__
ios
android
build
30 changes: 3 additions & 27 deletions app/.eslintrc.js → .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ module.exports = {
sourceType: 'module', // Allows for the use of imports
},
extends: [
'airbnb',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:import/typescript',
Expand All @@ -25,6 +24,9 @@ module.exports = {
},
plugins: ['@typescript-eslint', 'import'],
rules: {
// The below 2 rules are set for now will remove them once solved
'@typescript-eslint/no-explicit-any': 'warn',
'no-unsafe-optional-chaining': 'warn',
'no-console': 'error',
// Because of early development, we only warn on ts-ignore. In future we want to move to error
'@typescript-eslint/ban-ts-comment': 'warn',
Expand Down Expand Up @@ -53,26 +55,6 @@ module.exports = {
devDependencies: false,
},
],
'react/function-component-definition': [
2,
{
namedComponents: 'arrow-function',
unnamedComponents: 'arrow-function',
},
],
'import/extensions': 'off',
'no-shadow': 'off',
'no-use-before-define': 'off',
'react/jsx-filename-extension': 'off',
'global-require': 0,
'react/jsx-one-expression-per-line': 'off',
'no-plusplus': 'off',
'no-param-reassign': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'function-paren-newline': 'off',
'import/prefer-default-export': 'off',
'no-restricted-syntax': 'off',
'react/destructuring-assignment': 'off',
},
globals: {
require: true,
Expand All @@ -85,12 +67,6 @@ module.exports = {
'import/no-extraneous-dependencies': 'off',
},
},
{
files: ['aries-components/**/*.ts'],
rules: {
'@typescript-eslint/no-namespace': 'off',
},
},
{
files: ['.eslintrc.js', '*.config.js'],
env: {
Expand Down
84 changes: 55 additions & 29 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,66 @@
#
.DS_Store

# Merge artifacts
*.orig
# Xcode
#
build/
xbuild/

# Secrets
*.mobileprovision
*.p12
*.p8
pc-api*.json
api*.json
.env
.idea/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate
ios/.xcode.env.local

# Other
node_modules
# Android/IntelliJ
#
build/
.idea
.gradle
lib
yarn.lock
local.properties
.jest
*.iml
*.hprof
.cxx/
*.keystore
!debug.keystore

# node.js
#
node_modules/
npm-debug.log
yarn-error.log

# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/

# aries-bifold should be cloned separately
aries-bifold/
*.code-workspace
**/fastlane/report.xml
**/fastlane/Preview.html
**/fastlane/screenshots
**/fastlane/test_output

# 3rd-party
app/ios/Pods/*
!app/ios/Pods/Frameworks
# Bundle artifact
*.jsbundle

# This patch must be dynamically generated by something
# so its excluded.
app/patches/react-native-gifted-chat*.patch
# Ruby / CocoaPods
/ios/Pods/
/vendor/bundle/

# xcode
xcuserdata/
.npmrc
# Temporary files created by Metro to check the health of the file watcher
.metro-health-check*

# testing
/coverage
.env
4 changes: 0 additions & 4 deletions .gitmodules

This file was deleted.

5 changes: 0 additions & 5 deletions .husky/commit-msg

This file was deleted.

7 changes: 3 additions & 4 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npm run pre-commit-lint
npm run typecheck
npx lint-staged
4 changes: 0 additions & 4 deletions .husky/pre-push

This file was deleted.

3 changes: 3 additions & 0 deletions .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"**/*.{js,jsx,ts,tsx}": ["yarn lint -- --fix", "npx prettier --write"]
}
5 changes: 5 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package-lock.json
app.json
ios/
android/
node_modules/
9 changes: 9 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module.exports = {
arrowParens: 'avoid',
bracketSameLine: true,
bracketSpacing: true,
singleQuote: true,
trailingComma: 'all',
semi: false,
printWidth: 120,
}
19 changes: 0 additions & 19 deletions .sonarcloud.properties

This file was deleted.

1 change: 1 addition & 0 deletions .watchmanconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
71 changes: 71 additions & 0 deletions App.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
import AgentProvider from '@aries-framework/react-hooks'
import * as React from 'react'
import { useEffect, useMemo } from 'react'
import { StatusBar } from 'react-native'
import SplashScreen from 'react-native-splash-screen'
import Toast from 'react-native-toast-message'

import { animatedComponents } from './app/animated-components'
import ErrorModal from './app/components/modals/ErrorModal'
import NetInfo from './app/components/network/NetInfo'
import toastConfig from './app/components/toast/ToastConfig'
import { homeTourSteps } from './app/components/tour/HomeTourSteps'
import { AnimatedComponentsProvider } from './app/contexts/animated-components'
import { AuthProvider } from './app/contexts/auth'
import { CommonUtilProvider } from './app/contexts/commons'
import { ConfigurationProvider } from './app/contexts/configuration'
import { NetworkProvider } from './app/contexts/network'
import { StoreProvider } from './app/contexts/store'
import { ThemeProvider } from './app/contexts/theme'
import { TourProvider } from './app/contexts/tour/tour-provider'
import { defaultConfiguration } from './app/defaultConfiguration'
import { initLanguages, initStoredLanguage, translationResources } from './app/localization'
import RootStack from './app/navigators/RootStack'
import { theme } from './app/theme'

initLanguages(translationResources)

const App = () => {
useMemo(() => {
initStoredLanguage().then()
}, [])

useEffect(() => {
// Hide the native splash / loading screen so that our
// RN version can be displayed.
SplashScreen.hide()
}, [])

return (
<StoreProvider>
<AgentProvider>
<ThemeProvider value={theme}>
<AnimatedComponentsProvider value={animatedComponents}>
<ConfigurationProvider value={defaultConfiguration}>
<CommonUtilProvider>
<AuthProvider>
<NetworkProvider>
<StatusBar
hidden={false}
barStyle="light-content"
backgroundColor={theme.ColorPallet.brand.primary}
translucent={false}
/>
<NetInfo />
<ErrorModal />
<TourProvider steps={homeTourSteps} overlayColor={'gray'} overlayOpacity={0.7}>
<RootStack />
</TourProvider>
<Toast topOffset={15} config={toastConfig} />
</NetworkProvider>
</AuthProvider>
</CommonUtilProvider>
</ConfigurationProvider>
</AnimatedComponentsProvider>
</ThemeProvider>
</AgentProvider>
</StoreProvider>
)
}

export default App
11 changes: 0 additions & 11 deletions COMPLIANCE.yaml

This file was deleted.

9 changes: 0 additions & 9 deletions CONTRIBUTING.md

This file was deleted.

Loading

0 comments on commit 24cb476

Please sign in to comment.