-
Notifications
You must be signed in to change notification settings - Fork 2
code architecture
Valentin Mourot edited this page Apr 29, 2019
·
4 revisions
-
.idea=> Android Studio configuration -
android=> Android native project -
app=> React Native code ("JS part") -
assets=> static assets (images, fonts, icons, translations, ...) -
ios=> iOS native project -
jsonapi=> [Obsolete] Fake JSON data -
svgs=> SVG files used to build the icon font in Icomoon - Some dotfiles => global configuration
-
README.md=> Read it first -
app.json=> [Obsolete] Seems to ba a app name -
docker-compose.yml=> [Obsolete] Docker configuration for old Jenkins build -
index.js=> Everything starts here (root JS source file) -
package.json=> JS part properties and node modules declaration -
rn-cli.config.js=> Configuration of React Native bundler, used to build directly from Typescript -
tsconfig.json=> Typescript configuration -
tslint.json=> TSLint configuration
(Only representative files and directories)
android
-
app=> Pocket project-
src=> Java source code -
build.gradle=> Build configuration for Pocket -
google-services=> Configuration for Google Firebase services
-
-
build.gradle=> Build configuration for Android -
gradlewandgradlew.bat=> Bridge to gradle -
settings.gradle=> Other Gradle settings
(Only representative files and directories)
ios
-
mobileapp.xcworkspace=> Xcode project workspace -
mobileapp.xcodeproj=> Xcode project file -
mobileapp=> Xcode project content and source code -
Podfile=> iOS native dependencies declaration
app
-
homework,mailbox,timelineanduser=> Pocket tabs source code -
infra=> Modules that are Pocket-wide -
navigation=> Global routing definition -
styles=> Styles definition -
tracking=> Tracking module -
ui=> Reusable UI components -
utils=> Reusable code tools -
AppModules.ts=> Definition of Pocket tabs -
AppScreen.ts=> Root Navigation wrapper -
AppStore.ts=> Application wrapper - (
Conf.ts) => Override platform configuration (generated) -
pushNotifications.ts=> push-notifs handler
- Remove unused projects on iOS
- Define styles in
styles/ - Move
pushNotifications.tsininfra/ - Distinguish between
infraandutils - What is
app.json?
The way you implement a tab is up to you, but there some key concepts you may use :
-
index.ts=> imports for this tab (root component, reducer, and route config) -
config.ts=> constants for displaying this tab (apart fromindex.tsto avoid circular deps) -
navigator.ts=> route definition -
actionsTypes/=> Redux action types declaration -
actions/=> Actions & thunks -
components/=> Dumb React components -
containers/=> React containers -
reducer/=> Redux reducer and sub-reducers for this tab
Each of these files and directories will be detailed in this wiki.