Portfolio Insights is a React app that graphs stock value vs. sentiment over time. It can also pull in news articles and twitter sentiment and generate fun bubble charts.
In its current form, the app can run on the web and natively on iOS and Android. All of the application logic is shared across the three platforms. The only platform-specific code is the actual rendering. This allows each platform to have a UI that's tailored towards it while still sharing code from platform to platform.
web
, ios
, and android
directories house the boilerplate project project
files necessary to run/compile in different forms (web vs native).
The application code can be found in the app
directory. Everything under the
app
directory except the native
and web
directories is shared across web
and native apps. This means when we fix a bug in one place, it'll get fixed on
all three platforms!
The rest of the app is structured using the client code from my react-redux-webpack-boilerplate. For more info on the technologies used read that!
Prerequisites:
- Have node!
npm install
To run in "development mode", simply:
npm run web-dev
Then all you need to do is hit localhost:3001
.
In development mode, react modules and redux reducers are hot-reloaded - whenever you hit save it pops them into the browser without you needing to refresh the page.
To create and run a production bundle, simply:
npm run web-bundle
This will create a bundle.js
file as a sibling to index.html
under
web/public
. You will then need to serve these two files using a static
resource server. That's it!
- Xcode 7.0 or higher is required
npm install -g react-native-cli
- Open
ios/PortfolioInsights.xcodeproj
- Hit ⌘-R in your iOS simulator to reload the app and see your change! (alternatively you can hit the play button). When you make changes to your application JS all you need to do is hit ⌘-R on the simulator and your changes will magically be there.
npm run ios-bundle
- Navigate to
ios/AppDelegate.m
- Comment out line 34:
jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle?platform=ios&dev=true"];
- Uncomment out line 42:
jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
- What this just did was point the xcode project to the bundle you built from
running
npm run ios-bundle
instead of from server kicked off by react packger when just hitting run. - Now either hit ⌘-R or hit the play button to run your codes
- Follow all the same steps as above.
- In Xcode, change the device from the simulator to your device
- Under
product > scheme
clickedit scheme
(⌘<) and change fromdebug
torelease
- Hit either ⌘-R or the play button to build the app and run it on your device
Not yet fully supported. Don't even try it!
- .editorconfig - maintain consistent coding styles across IDEs. official website
- .eslintrc - pluggable JS linter. config is based on AirBnbs rules, with a twist! offical website
- .flowconfig - static JS type checker. currently not using it, but this file was autogenerated. perhaps one day i'll use it! official website