Skip to content

Commit

Permalink
Initialize
Browse files Browse the repository at this point in the history
  • Loading branch information
pierre275 committed Feb 9, 2022
0 parents commit 4a0f744
Show file tree
Hide file tree
Showing 97 changed files with 11,579 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .buckconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

[android]
target = Google Inc.:Google APIs:23

[maven_repositories]
central = https://repo1.maven.org/maven2
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
MODE=DEBUG
API_URL_BASE=link_heres
22 changes: 22 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
module.exports = {
root: true,
extends: '@react-native-community',
plugins: ['unused-imports'],
parser: '@typescript-eslint/parser',
globals: {},
rules: {
semi: 0,
'no-undef': 'off',
'no-shadow': 'off',
'arrow-body-style': 0,
'no-nested-ternary': 'error',
'@typescript-eslint/unbound-method': 0,
'@typescript-eslint/no-unused-vars': 1,
'@typescript-eslint/no-empty-interface': 1,
'unused-imports/no-unused-imports': 'warn',
'@typescript-eslint/no-use-before-define': 0,
'@typescript-eslint/explicit-module-boundary-types': 0,
'jest/no-disabled-tests': 0,
},
ignorePatterns: ['jest-setup.js'],
}
23 changes: 23 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Check

on: [push]

jobs:
eslint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 14
- uses: c-hive/gha-yarn-cache@v1
- name: install node modules
run: yarn install --ignore-scripts
- name: eslint check
run: yarn lint
- name: type-check
run: yarn type-check
- name: formating-check
run: yarn format:check
- name: test-check
run: yarn test
63 changes: 63 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# OSX
#
.DS_Store

# Xcode
#
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate

# Android/IntelliJ
#
build/
.idea
.gradle
local.properties
*.iml
*.hprof

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

# BUCK
buck-out/
\.buckd/
*.keystore
!debug.keystore

# 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/

*/fastlane/report.xml
*/fastlane/Preview.html
*/fastlane/screenshots

# Bundle artifact
*.jsbundle

# CocoaPods
/ios/Pods/

# Confidential
/.env
6 changes: 6 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
bracketSpacing: false,
singleQuote: true,
trailingComma: 'all',
arrowParens: 'avoid',
}
1 change: 1 addition & 0 deletions .watchmanconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
38 changes: 38 additions & 0 deletions App.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import React from 'react'
import { initialWindowMetrics, SafeAreaProvider } from 'react-native-safe-area-context'
import { GestureHandlerRootView } from 'react-native-gesture-handler'
import { StyleSheet } from 'react-native'
import { isIos } from 'Utils/device'
import { theme } from 'Theme/index'
import { GlobalProviders } from 'Providers/GlobalProviders'
import 'Locales/i18n'
import { queryClient } from 'ReactQuery/queryClient'
import { ThemeProvider } from 'styled-components'
import { QueryClientProvider } from 'react-query'
import { NavigationContainer } from '@react-navigation/native'
import { RootNavigator } from 'Navigation/RootNavigator'

const App = () => {
return (
<SafeAreaProvider initialMetrics={initialWindowMetrics} style={styles.container}>
<GestureHandlerRootView style={styles.gestureRoot}>
<NavigationContainer>
<QueryClientProvider client={queryClient}>
<ThemeProvider theme={theme}>
<GlobalProviders>
<RootNavigator />
</GlobalProviders>
</ThemeProvider>
</QueryClientProvider>
</NavigationContainer>
</GestureHandlerRootView>
</SafeAreaProvider>
)
}

const styles = StyleSheet.create({
gestureRoot: { flex: 1 },
container: { flex: 1, backgroundColor: isIos ? 'transparent' : theme.colors.black },
})

export default App
40 changes: 40 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# FAQ

1. Don't type things as `any`
2. Don't use default exports
3. We prefer `type` over `interface`
4. Don't use prefix **I** in type name
5. Destructure props only when its necessary
6. Please add <b>unit tests</b> for functions you wrote
7. Use naming convention `feature/my-awesome-feature` and `bugfix/some-bug` for <b>branches</b>
8. Use [this style guide](https://gist.github.com/robertpainsi/b632364184e70900af4ab688decf6f53) in commits
9. Commit only code that successfully passes 'yarn full'
10. Don't use hardcoded strings, use <b>i18n</b>
11. Use <b>meaningful names</b> for variables and components
12. Try to write <b>reusable</b> code

Please Don't use [FC](https://fettblog.eu/typescript-react-why-i-dont-use-react-fc) to type React Components without
children.
<br/>
instead do sth like this

```tsx
type ComponentProps = {
label: string
}

export const Component = (props: ComponentProps) => {
//...
}
```

# Links

[FIGMA](https://www.figma.com/file/eL0JsIEwtlNm7ozzFK3HOY/Akademia-vol.-2?node-id=0%3A1)

# BACKEND

- Docs:
`https://akademia.danielgrychtol.com/api/docs`
- Base URL:
`https://akademia.danielgrychtol.com/api`
55 changes: 55 additions & 0 deletions android/app/_BUCK
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# To learn about Buck see [Docs](https://buckbuild.com/).
# To run your application with Buck:
# - install Buck
# - `npm start` - to start the packager
# - `cd android`
# - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"`
# - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck
# - `buck install -r android/app` - compile, install and run application
#

load(":build_defs.bzl", "create_aar_targets", "create_jar_targets")

lib_deps = []

create_aar_targets(glob(["libs/*.aar"]))

create_jar_targets(glob(["libs/*.jar"]))

android_library(
name = "all-libs",
exported_deps = lib_deps,
)

android_library(
name = "app-code",
srcs = glob([
"src/main/java/**/*.java",
]),
deps = [
":all-libs",
":build_config",
":res",
],
)

android_build_config(
name = "build_config",
package = "com.veriapp",
)

android_resource(
name = "res",
package = "com.veriapp",
res = "src/main/res",
)

android_binary(
name = "app",
keystore = "//android/keystores:debug",
manifest = "src/main/AndroidManifest.xml",
package_type = "debug",
deps = [
":app-code",
],
)
Loading

0 comments on commit 4a0f744

Please sign in to comment.