Chai is an ambitious project with the aim to create a full-fledged news consumption app completely in Facebook's React Native for Android.
Warning: Chai is a work in progress; early-stage and experimental.
Follow the "Getting Started" guide from Facebook's React Native GitHub
npm install -g react-native-cli
npm install
react-native run-android
If you get an error, in another window run
adb reverse tcp:8081 tcp:8081
If watcher says it took too long to load re-run
react-native run-android
- We have an initial view that
- Loads json from http://chai.media/public_api/random/
- Renders it into a listview
- A Custom React Native Intent Module exists to play the news YouTube video by throwing an Intent when you click on a list item.
-
User Login and User Settings Syncing with Backend Server
- We need to allow a user to log in with Facebook and create an account for them on our chai.media backend
- We should be able to store user settings in a {key:value} with the backend and keep both of these in sync (updates can flow both ways)
- On the app side, it should be in a way that anywhere in the rest of the app we can query for these user settings (example: get list of all favorite categories of logged in user) this should not need a network query to the backend
- Settings screen for user to check and update settings
enable / disable push notifications choose favorite categories etc.
-
Main View of App
- Swipe toolbar with -> My News | Today's News | Trending
- Each section should be a good looking infinite scrolling cardview
- On click of an item we will open the items detail view; back should return to the user's position in the scroll
- Items must be cachable (1hr); i.e. you can expect new content only after an hour
- Pull to refresh to force refresh of the screen
-
Detail View
- This one view should behave differently depending on the type of content that is being requested to be shown in detail
- If it is an entity (eg: Trump / Google / India )
example: http://chai.media/channel/India/
- If it is a news article
- Video play button will throw an intent to open the YouTube video
Found a bug? Report it here!
Have an idea? Add it here!
chai-react-native is released under the MIT License.
The full license text is included in LICENSE.txt
.