DriverApp
Components:
- DriverStartupServices
 - RootView
 - BankDetails
 - CarDetails
 - Documents
 - DriverAcessMessage
 - DropOff
 - Earnings
 - History
 - License
 - Settings
 - SuggestLocation
 - Home
 - Request Ride
 - Pick Rider
 - Start Ride
 - Rate Rider
DriverStartupServices
 
- Location:
The UI can be found under 
js/components/driver/homeThe actions can be found underjs/actions/driver/homeThe reducer can be found underjs/reducer/driver/appStateandjs/reducer/driver/user - Working:
Starts socket client. Connects client to server. Can be found under 
socketRiderInitinservices/ridersocketTakes deviceId and sends it to backend. Used for push Notification Fetches initial location of driver. This is because map requires initial region to display. Renders Map component.(RootView)once initial location is fetched - Result: Initial services started. Map gets initial location to display Map loaded. Navigates to rootView.
 
RootView
- Location:
The UI can be found under 
js/components/driver/rootViewThe actions can be found underjs/actions/driver/homeThe reducer spans multiple files. - Working: Loads MapView component. Handle all map related activities. This component also is loaded during the entire application lifecycle. This is because rendering Map on each navigation is not good for performance. Whenever the screen has to change we use pageStatus to navigate load the component. All the components like requestRide and pickRider are loaded on top of rootView. If the user removes app from memory (swipes it from tasklist) the state of application is lost. To restore it we sync the data from backend. Based on that we reach the state of application which was there previously.
 Result: Home screen is mounted on top of map by default
Home
Location: The UI can be found under
js/components/driver/homeThe actions can be found underjs/actions/driver/homeThe reducer can be found underjs/reducer/driver/homeandjs/reducer/driver/appStateWorking: Shows only home screen . Waits for new ride request. Has logOut button.
Bank Details
Location: The UI can be found under
js/components/driver/bankDetailsWorking: Driver can enter the bank details which is then stored on server
Car Details
Location: The UI can be found under
js/components/driver/carDetailsWorking: Driver can enter the car details which is then stored on server
Documents
Location: The UI can be found under
js/components/driver/documentsWorking: Driver can view his bank and car details.
DriverAcessMessage
Location: The UI can be found under
js/components/driver/driverAcessMessageWorking: When the field isApproved is false a message is sent to driver to acess after Twenty Four hours when he opens the dashboard.
DropOff
Location: The UI can be found under
js/components/driver/dropOffThe actions can be found underjs/actions/driver/dropOffThe reducers can be found underjs/reducers/driver/tripWorking: Where drop location is for the user.
Earnings
Location: The UI can be found under
js/components/driver/earningsWorking: How much driver has earned in that trip.
History
Location: The UI can be found under
js/components/driver/historyThe actions can be found underjs/actions/driver/historyThe reducers can be found underjs/reducers/driver/historyWorking: Used to see the past rides history.
License
Location: The UI can be found under
js/components/driver/licenseWorking: Used to acess the license details of the driver.
Settings
Location: The UI can be found under
js/components/driver/settingsThe actions can be found underjs/actions/driver/settngsThe reducers can be found underjs/reducers/driver/userWorking Used to modify details of driver with the exception of profile photo.
SuggestLocation
Location: The UI can be found under
js/components/driver/suggestLocationWorking We are using google api to get autocomplete the location for driver.
Request Ride
Location: The UI can be found under
js/components/driver/rideRequestThe actions can be found underjs/actions/driver/rideRequestThe reducer spans multiple files.- Working: Receives new ride request Shows pickupRegion on map as well as pickup adress and rider rating. Driver has only limited time to respond If driver does not respond this component is unmounted If driver accepts driver sets himself to enRoute Sends this information to server so that particular rider is notified
 Result: Home screen is mounted on top of map by default
Pick Rider
Location: The UI can be found under
js/components/driver/pickRiderThe actions can be found underjs/actions/driver/pickRiderThe reducer spans multiple files- Working: Driver location is shown realtime Driver can see the pickupLocation on map Enroute, arriving and arrived status is shown based on driver location. Rider contact details are also shown Checks are in place to detect if the socket disconnects. In this case a message is shown that socket is disconected and user cannot perform any action.
 Result: Once arrived driver can start trip.
Start Ride
Location: The UI can be found under
js/components/driver/startRideThe actions can be found underjs/actions/driver/startRideThe reducer can be found underjs/reducer/driver/trip- Working: When rider arrives driver starts trip Destination is not integrated. Therefore as soon as he clicks the button dropOff page is mounted where driver can end trip.
 - Result: Driver starts trip ands ends trip
 
Rate Rider
- Location:
The UI can be found under 
js/components/driver/rateRiderThe actions can be found underjs/actions/driver/rateRiderThe reducer can be found underjs/reducer/driver/trip - Working: Give rating to rider Go back to home screen