Follow this link To preview the video demo of the app.
- Fork or Clone the repo, then set it up:
$ cd decagon-challenge
$ yarn install
$ npx react-native run-android
$ cd ios && pod install
$ cd .. && npx react-native run-ios
-
An excel file which contains the records of car owners in the United States over several years. You are to download this list and save it on your device in a folder called owners. Here is the link to download the file link.
-
A GET API which returns a list of users. Here is the link to the API endpoint here.
-
Mockup: PDF
- Use any of the following (Java, Kotlin, Objective C, Swift, React Native, Flutter)
- If any mobile platform you wish to use is not listed above, please email info@decagonhq
- Your app should have at least three pages.
- One to show cars and filter them using one or more criteria
- The second showing the list of users fetched from the API
- The third showing additional information about the user clicked
- Save the csv file locally on your device in a folder called owners. Please do not rename the file or change the format. Handle cases for when this file is missing
- Design a master-detail esque view for the users returned by api.
- Handle errors gracefully
- Write tests
- Find a good user interface online which you can use. You can search on Dribble or Pinterest for ideas.
- Got the file path using
ExternalDirectoryPath
inreact-native-fs
. - Read the data in chuncks from the file path using
RNFetchBlob.fs.readStream
which takes in the path and the configuration. - Used
papaparse
to convert the result to an array which will be saved to the state. - Whilst step 1, 2, 3 are executing, the header is always available with a button to navigate to the
users
screen. And the process in step 1,2,3 is not interruped (i.e. the process does not wait or stop). - Navigate to
users
screen using the button to view list of users populated from the given API. - Navigate to
UserDetail
by pressing a user to show more details about the user.
react-native-fs
: used to get the external storage path to the owners/car_ownsers_data.csv.react-native-fetch-blob
: used to read the file from the path provided in streams.papaparse
: is used to convert the result from react-native-fetch-blob to an array.react-native-vector-icons
: is used to render the UI icons.jest
andreact-test-renderer
: is used for the unit testing.- To mock native components and functions
- To render and check components and screens if they render correctly
- To create snapshots of screens and components. And to compare them to their snapshot respectively.
react-navigation
: is used to navigate between screens.