Skip to main content

App Architecture

Persistence

Difficulty: Medium

In this exercise, you will build a multi-step onboarding flow for a rideshare driver applying to drive. The app should guide users through completing a series of forms, and reviewing a final summary.

A key challenge in this exercise is persistence - ensuring that user data is saved so progress is retained even if the app is restarted or closed. Users should always be able to resume where they left off, and if all steps are completed, the app should return to the summary screen upon reopening.


Requirements

Overview

The onboarding consists of three sequential steps (Personal Info, Vehicle Info, Photo Upload), each requiring user input before proceeding. Once all steps are completed, the user is taken to a summary screen, displaying all entered information in a structured format.

Each of the three steps should have:

  • A Save button – Saves data and moves to the next step.
  • A Go Back button (if applicable) – Allows editing of previously entered data.

Steps

  1. Personal info: Collect name and email address.
  2. Vehicle Info: Collect make, model, year, and number of seats.
  3. Photo upload: Allow users to upload or take a photo for Driver’s License and Proof of Insurance

Summary Screen

  • Displays all collected information in three corresponding sections. Users can navigate back to edit any section.
  • Displays a Restart button at the bottom, which clears all saved data and resets the app to its initial state.

Data Validation

FieldValidation
NameRequired, non-empty
EmailMust be in valid email format (e.g., name@example.com)
Vehicle MakeRequired, non-empty
Vehicle ModelRequired, non-empty
Vehicle YearRequired, numeric, reasonable range (e.g., 2000-2025)
Number of SeatsRequired, numeric, reasonable range (e.g., 4-8)
Photos (License & Insurance)No validation required

Persistence

  • When a user completes a step and clicks “Save”, their input must be persisted to disk - this includes the uploaded photos.
  • If the app is restarted, the user should resume where they left off:
    • If onboarding was in progress, resume from the last uncompleted step.
    • If all steps were completed, go directly to the summary screen.
  • Users must be able to navigate back and modify previously entered data. Any changes should be saved and reflected upon pressing “Save”.