---
# System prepended metadata

title: I. Software Requirements

---

# I. Software Requirements 
## A. **Software Specification for Ride Dispatch Service App**
### **i. Introduction**

- 1. Purpose:
    The purpose of this software specification is to define the requirements and functionality of a Ride Dispatch Service app. We hope the app can connect passengers with nearby drivers to provide a more convenient and efficient transportation service. 

- 2. Scope:
    The Ride Dispatch Service app will provide features such as user registration, login, taxi booking, driver information, driver rating, order details, order cancellation, and payment options. It will be available on mobile phones and can be installed on many operating systems.

- 3. Definitions, Acronyms, and Abbreviations:
    - App: Our Ride Dispatch Service application.
    - User: Passengers and drivers that uses the app.
    - API: Application Programming Interface.
    - GPS: Global Positioning System.
    - OTP: One Time Password.

- 4. References:
        This software specification mimics the design and functions of popular and good Ride Dispatch Service apps like Uber.

- 5. Overview:
        The software specification describes the overall description, product functions, user characteristics, constraints, assumptions, and specific requirements of the Ride Dispatch Service app.
        
### **ii. Overall Description**

- 1. Product Perspective:
    The Ride Dispatch Service app will be an application that interacts with external services and APIs for location tracking like GPS, payment processing, and driver verification. The APP will provide a very user-friendly interface for passengers and drivers to effectively interact with the system.

- 2. Product Functions:
    - a. User Registration:
        - Passengers and drivers can create an account by providing necessary details like name, contact information, and payment preferences.
    - b. Login:
        - Users can log into the app using their registered infos or Google or FB account in a safe way.
    - c. Taxi Booking:
        - Passengers can request a ride by specifying their pickup location and destination.
        - The app will display available nearby drivers and tell their estimated arriving time.
        - Passengers can choose a driver and confirm the calling request using the app.
    - d. Drivers' Information:
        - Passengers can view driver profiles, including ratings, reviews, and what the car is.
    - e. Rate Drivers:
        - After completing a ride, passengers can rate and provide feedback on the driver and how the car feels.
    - f. Order Details:
        - Passengers can track the riding route, including driver location, estimated time of arrival, and the total trip distance.
    - g. Cancel Order:
      - Passengers can cancel their own booking before the driver arrives, with appropriate cancellation policies.
    - h. Payment Options:
      - Passengers can choose to pay for the ride using a linked payment method like credit card, or with cash.

- 3. User Characteristics:
    - Passengers: people who need car services.
    - Drivers: people who are willing to provide car services.

- 4. Constraints:
   - The app must comply with relevant local laws and regulations in every country when related.
   - The app should ensure passenger's and driver's data security.
   
- 5. Assumptions and Dependencies:
   - The app requires a stable internet connection for real-time communication and connection with the server.
   - The app depends on GPS data to provide location information better.

### **iii. Specific Requirements**
- 1. User Registration:
    - Users must provide valid contact information and agree to the our app's terms and conditions.
    - The app should verify user email and phone numbers using OTP for authentication to get their password.

- 2. Login:
   - The app should securely store and handle user info and support password reset when needed.
   - Users can choose to log in using their email address, phone number, or Google accounts.

- 3. Taxi Booking:
   - The app should be able to calculate and show estimate price based on by calculating distance, and estimated duration.
   - Users should receive real-time updates on the driver's location and estimated arrival time.
   - The app should allow passengers to contact drivers using messaging function made in the app or by phone call.

- 4. Drivers' Information:
   - The app should provide driver profiles with details like name, photo, vehicle type and driver ratings.
   - Drivers' information should be updated once every few days to ensure.

- 5. Rate Drivers:
   - Passengers should be able to rate drivers from 1~5 stars or leave a comment after completing a ride.
   - The app should accumulate and display the average rating for each driver publicly for every user.

- 6. Order Details:
   - Passengers should have access to ride details, including driver location and the route driven.
   - The app should show the trip distance, duration, and final fare at the end of the ride.

- 7. Cancel Order:
   - Passengers should be able to cancel a booking without deducting money if they cancel in a ruled time.

- 8. Payment Options:
   - The app should integrate with payment companies to process online transactions securely.
   - Users should have the option to pay with linked credit cards or cash after the ride.
       

## B.
- 1. User Registration:
    - Manually fill out the user registration form with valid and invalid contact information to check the fill in boxes. **[Detailed Manual]**
    - Check if the form works as expected, be sure that  required fields and formats are correct. **[Detailed Manual]**
    - Verify that users are required to agree to the terms and conditions before completing the registrating. **[Detailed Manual]**
    - Test the email verification by using developer's own email and verify the success email letter is shown. **[Simple Automated]**
    - Test the phone number verification by providing a valid phone number and check the verification of the OTP. **[Simple Automated]**

- 2. Login:
    - Ensure that user credentials are securely stored and encrypted, examine the database storage and data protection. **[Detailed Manual]**
    - Test the password reset function using a verified email or phone, verifying that users can receive instructions to reset password. **[Detailed Manual]**

- 3. Taxi Booking:
    - Manually calculate fares based on distance and time comparing the results with the app's calculated fares to ensure accuracy. **[Detailed Manual]**
    - Use location tracking to verify that the driver's location and estimated arrival time are in real-time. **[Detailed Automated]**
    - Test the in-app messages or phone call functionality, checking successful communication between passengers and drivers. **[Detailed Manual]**

- 4. Drivers' Information:
    - Verify that driver profiles contain accurate and up-to-date information, including name, photo, vehicle type and ratings. **[Detailed Manual]**
    - Simulate changes in driver availability to verify that the app works in real-time and is stable. **[Detailed Automated]**
    - Verify the calculation of average driver ratings by providing ratings by counting multiple ratings by hand. **[Detailed Automated]**

- 5. Rate Drivers:
    - Allow passengers to rate drivers from 1~5 stars or provide feedback after completing a ride, ensuring that the ratings and feedback are correctly captured and stored in our database. **[Detailed Manual]**
    - Enter ratings for drivers and verify if the average rating for each driver is updated accurately. **[Detailed Automated]**

- 6. Order Details:
    - Use real-time ride data to verify that passengers can access accurate information about the driver's location and orute. **[Detailed Automated]**
    - Confirm that trip distance, duration, and money are correctly displayed and match the actual values. **[Detailed Automated]**

- 7. Cancel Order:
    - Attempt to cancel a booking within the specified time frame and ensure that the cancellation is processed without penalties. **[Detailed Manual]**
    - Test canceling a book outside the allowed time frame and verify if the cancellation incurs penalties. **[Detailed Manual]**

- 8. Payment Options:
    - Integrate with payment companies in a test environment and do online transactions to secure payment. **[Detailed Manual]**
    - Test the option to pay with linked credit cards, adding valid card information, and completing a payment transaction. **[Detailed Manual]**

# II. Software Analysis and Design
## A. EntityRelationDiagram(ERD)

- i. Entities:

    - User
        - Attributes: UserID, Name, Email, Phone Number, Payment Method
        
    - Driver
        - Attributes: DriverID, Name, License Number, Car Model, Rating
        
    - Ride
        - Attributes: RideID, Pickup Location, Destination, Fare, Status
        
    - Payment
        - Attributes: PaymentID, RideID, Amount, Payment Method, Timestamp
        
- ii. Relations:
    - User books a Ride (One-to-Many)
        - User (1) -----> Ride (Many)
        
    - Driver accepts a Ride (One-to-Many)
        - Driver (1) -----> Ride (Many)
        
    - Ride has a Payment (One-to-One)
        - Ride (1) <-----> Payment (1)
    
- iii. Cardinality and Modality:
    - User books a Ride: One User can have Many Rides (1 to Many)
        - Cardinality: 1 --(1 to Many)-- Ride
        - Modality: Optional (User can choose not to book a ride)
        
    - Driver accepts a Ride: One Driver can have Many Rides (1 to Many)
        - Cardinality: 1 --(1 to Many)-- Ride
        - Modality: Mandatory (A driver must accept a ride)
        
    - Ride has a Payment: One Ride has One Payment (1 to 1)
        - Cardinality: Ride --(1 to 1)-- Payment
        - Modality: Mandatory (Every ride must have a corresponding payment)
        
    ![](https://hackmd.io/_uploads/rJmhmU9Sn.png)

## B. Data Flow Diagram (DFD)
- i. Data Context Diagram (Level 0 DFD):
![](https://hackmd.io/_uploads/HkvPOIcSn.png)
    
- ii. Data Flow Diagram (Level 1 DFD):
    ![](https://hackmd.io/_uploads/H1-PbohHh.png)


- iii. A Process Specification describes the details of a specific process within the DFD. Here's an example of structured English for the "Booking" process:
    ![](https://hackmd.io/_uploads/S11RtwqSh.png)


- Process: Booking

- Inputs:
    - Passenger Information (Name, Contact Details, Payment Method)
    - Pickup Location
    - Destination

- Outputs:
    - Booking Request
    - Driver Assignment
- Actions:
    - a. Verify Passenger Information:
        - Validate the provided passenger information.
        - Ensure the payment method is valid and authorized.
        
    - b. Determine Availability of Drivers:
        - Check the availability of nearby drivers based on their location and current status.
        
    - c. Assign a Driver:
        - Select an available driver who is closest to the passenger's pickup location.
        
    - d. Generate Booking Request:
        - Create a booking request with the passenger details, pickup location, and destination.
        - Include the assigned driver information in the booking request.
    - e. Notify Passenger and Driver:
        - Send a confirmation message to the passenger with the booking details and driver information.
        - Notify the assigned driver about the new booking request.
    
- Exceptions:
    - If no drivers are available, inform the passenger and suggest alternative options.
    - If the passenger information is invalid or incomplete, request the necessary details before proceeding.

## C.

![](https://hackmd.io/_uploads/r16DJWsH3.png)
