# deepak4tuna-1/sfmob_auto architecture

> Architecture diagram of the GitHub repository deepak4tuna-1/sfmob_auto, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/deepak4tuna-1/sfmob_auto
- Repository: https://github.com/deepak4tuna-1/sfmob_auto

## Overview

This is a Python/Appium/pytest framework for validating Six Flags mobile behavior on Android and iOS. Its principal journey prepares the app state, launches the app, performs guest or logged-in setup, and exercises domain screens; API and API+UI validation are additional documented modes. Driver/device management, state-aware ordering, and reporting support execution around that journey. The tree omits tests and runners described in the README, so the graph focuses on present runtime modules and uses README evidence for documented but unsampled capabilities.

Main entry points: [`flows/session_flow.py`](https://github.com/deepak4tuna-1/sfmob_auto/blob/main/flows/session_flow.py) (Session setup), [`flows/auth_flow.py`](https://github.com/deepak4tuna-1/sfmob_auto/blob/main/flows/auth_flow.py) (Authentication flow), [`api/base_api_client.py`](https://github.com/deepak4tuna-1/sfmob_auto/blob/main/api/base_api_client.py) (Reusable API client), [`core/reporting/pytest_html_report.py`](https://github.com/deepak4tuna-1/sfmob_auto/blob/main/core/reporting/pytest_html_report.py) (HTML reporting)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_execution["Execution and state"]
  node_driver["Driver factory<br/>[driver_factory.py]"]
  node_ordering["State-aware ordering<br/>[state_ordering.py]"]
  node_stateplan["State plan metadata<br/>[state_plan.py]"]
end

subgraph group_journeys["Journeys and screens"]
  node_baseflow["Base flow<br/>[base_flow.py]"]
  node_session["Session setup<br/>[session_flow.py]"]
  node_launchflow["App launch flow<br/>[app_launch_flow.py]"]
  node_authflow["Authentication flow<br/>[auth_flow.py]"]
  node_launchscreen["Launch screen<br/>[launch_screen.py]"]
  node_loginscreen["Login screen<br/>[login_screen.py]"]
  node_homescreen["Home screen<br/>[home_screen.py]"]
  node_parkscreen["Park selection"]
  node_iwantto["I Want To screen"]
  node_morescreen["More screen<br/>[more_screen.py]"]
end

subgraph group_services["API and configuration"]
  node_settings["Environment settings<br/>[settings.py]"]
  node_api_client["Reusable API client<br/>[base_api_client.py]"]
  node_content_api["Content API<br/>[content_api.py]"]
  node_fims_api["FIMS API<br/>[fims_api.py]"]
  node_parkresolver["Park resolver<br/>[park_resolver.py]"]
end

subgraph group_observability["Reporting and artifacts"]
  node_report["HTML reporting"]
  node_artifacts["Artifact manager"]
  node_screenshots["Screenshot capture"]
  node_logger["Logging<br/>[logger.py]"]
end

node_pytest(("pytest run"))
node_devices["Android / iOS devices"]

node_pytest -->|"starts sessions"| node_driver
node_driver -->|"drives UI"| node_devices
node_pytest -->|"orders tests"| node_ordering
node_ordering -->|"reads plans"| node_stateplan
node_pytest -.->|"prepares state"| node_session
node_session -->|"launches app"| node_launchflow
node_session -->|"delegates sign-in"| node_authflow
node_session -->|"checks state"| node_homescreen
node_session -->|"uses screen"| node_loginscreen
node_authflow -->|"enters credentials"| node_loginscreen
node_authflow -->|"checks result"| node_homescreen
node_launchflow -->|"handles launch"| node_launchscreen
node_session -->|"uses sign-out UI"| node_morescreen
node_pytest -->|"runs API cases"| node_api_client
node_api_client -.->|"supports requests"| node_content_api
node_api_client -.->|"supports requests"| node_fims_api
node_pytest -.->|"resolves park data"| node_parkresolver
node_pytest -.->|"validates domain UI"| node_iwantto
node_pytest -.->|"validates park UI"| node_parkscreen
node_pytest -->|"produces report"| node_report
node_report -->|"collects device metadata"| node_driver
node_report -->|"attaches captures"| node_screenshots
node_screenshots -->|"gets run directory"| node_artifacts
node_artifacts -->|"uses paths"| node_settings
node_artifacts -->|"gets run ID"| node_logger
node_pytest -->|"configures execution"| node_settings

click node_driver "https://github.com/deepak4tuna-1/sfmob_auto/blob/main/core/driver_factory.py"
click node_settings "https://github.com/deepak4tuna-1/sfmob_auto/blob/main/config/settings.py"
click node_ordering "https://github.com/deepak4tuna-1/sfmob_auto/blob/main/core/execution/state_ordering.py"
click node_stateplan "https://github.com/deepak4tuna-1/sfmob_auto/blob/main/core/execution/state_plan.py"
click node_baseflow "https://github.com/deepak4tuna-1/sfmob_auto/blob/main/core/base_flow.py"
click node_session "https://github.com/deepak4tuna-1/sfmob_auto/blob/main/flows/session_flow.py"
click node_launchflow "https://github.com/deepak4tuna-1/sfmob_auto/blob/main/flows/app_launch_flow.py"
click node_authflow "https://github.com/deepak4tuna-1/sfmob_auto/blob/main/flows/auth_flow.py"
click node_launchscreen "https://github.com/deepak4tuna-1/sfmob_auto/blob/main/screens/app_launch/launch_screen.py"
click node_loginscreen "https://github.com/deepak4tuna-1/sfmob_auto/blob/main/screens/auth/login_screen.py"
click node_homescreen "https://github.com/deepak4tuna-1/sfmob_auto/blob/main/screens/home/home_screen.py"
click node_parkscreen "https://github.com/deepak4tuna-1/sfmob_auto/blob/main/screens/park/park_selection_screen.py"
click node_iwantto "https://github.com/deepak4tuna-1/sfmob_auto/blob/main/screens/i_want_to/i_want_to_screen.py"
click node_morescreen "https://github.com/deepak4tuna-1/sfmob_auto/blob/main/screens/more/more_screen.py"
click node_api_client "https://github.com/deepak4tuna-1/sfmob_auto/blob/main/api/base_api_client.py"
click node_content_api "https://github.com/deepak4tuna-1/sfmob_auto/blob/main/api/content_api.py"
click node_fims_api "https://github.com/deepak4tuna-1/sfmob_auto/blob/main/api/fims_api.py"
click node_parkresolver "https://github.com/deepak4tuna-1/sfmob_auto/blob/main/api/park_resolver.py"
click node_report "https://github.com/deepak4tuna-1/sfmob_auto/blob/main/core/reporting/pytest_html_report.py"
click node_artifacts "https://github.com/deepak4tuna-1/sfmob_auto/blob/main/core/artifact_manager.py"
click node_screenshots "https://github.com/deepak4tuna-1/sfmob_auto/blob/main/utils/screenshot_utils.py"
click node_logger "https://github.com/deepak4tuna-1/sfmob_auto/blob/main/utils/logger.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_driver,node_ordering,node_stateplan toneBlue
class node_baseflow,node_session,node_launchflow,node_authflow,node_launchscreen,node_loginscreen,node_homescreen,node_parkscreen,node_iwantto,node_morescreen toneAmber
class node_settings,node_api_client,node_content_api,node_fims_api,node_parkresolver toneMint
class node_report,node_artifacts,node_screenshots,node_logger toneRose
class node_pytest,node_devices toneIndigo
```

## Components

### Execution and state

- [Driver factory](https://github.com/deepak4tuna-1/sfmob_auto/blob/main/core/driver_factory.py): `core/driver_factory.py`
- [State-aware ordering](https://github.com/deepak4tuna-1/sfmob_auto/blob/main/core/execution/state_ordering.py): `core/execution/state_ordering.py`
- [State plan metadata](https://github.com/deepak4tuna-1/sfmob_auto/blob/main/core/execution/state_plan.py): `core/execution/state_plan.py`

### Journeys and screens

- [Base flow](https://github.com/deepak4tuna-1/sfmob_auto/blob/main/core/base_flow.py): `core/base_flow.py`
- [Session setup](https://github.com/deepak4tuna-1/sfmob_auto/blob/main/flows/session_flow.py): `flows/session_flow.py`
- [App launch flow](https://github.com/deepak4tuna-1/sfmob_auto/blob/main/flows/app_launch_flow.py): `flows/app_launch_flow.py`
- [Authentication flow](https://github.com/deepak4tuna-1/sfmob_auto/blob/main/flows/auth_flow.py): `flows/auth_flow.py`
- [Launch screen](https://github.com/deepak4tuna-1/sfmob_auto/blob/main/screens/app_launch/launch_screen.py): `screens/app_launch/launch_screen.py`
- [Login screen](https://github.com/deepak4tuna-1/sfmob_auto/blob/main/screens/auth/login_screen.py): `screens/auth/login_screen.py`
- [Home screen](https://github.com/deepak4tuna-1/sfmob_auto/blob/main/screens/home/home_screen.py): `screens/home/home_screen.py`
- [Park selection](https://github.com/deepak4tuna-1/sfmob_auto/blob/main/screens/park/park_selection_screen.py): `screens/park/park_selection_screen.py`
- [I Want To screen](https://github.com/deepak4tuna-1/sfmob_auto/blob/main/screens/i_want_to/i_want_to_screen.py): `screens/i_want_to/i_want_to_screen.py`
- [More screen](https://github.com/deepak4tuna-1/sfmob_auto/blob/main/screens/more/more_screen.py): `screens/more/more_screen.py`

### API and configuration

- [Environment settings](https://github.com/deepak4tuna-1/sfmob_auto/blob/main/config/settings.py): `config/settings.py`
- [Reusable API client](https://github.com/deepak4tuna-1/sfmob_auto/blob/main/api/base_api_client.py): `api/base_api_client.py`
- [Content API](https://github.com/deepak4tuna-1/sfmob_auto/blob/main/api/content_api.py): `api/content_api.py`
- [FIMS API](https://github.com/deepak4tuna-1/sfmob_auto/blob/main/api/fims_api.py): `api/fims_api.py`
- [Park resolver](https://github.com/deepak4tuna-1/sfmob_auto/blob/main/api/park_resolver.py): `api/park_resolver.py`

### Reporting and artifacts

- [HTML reporting](https://github.com/deepak4tuna-1/sfmob_auto/blob/main/core/reporting/pytest_html_report.py): `core/reporting/pytest_html_report.py`
- [Artifact manager](https://github.com/deepak4tuna-1/sfmob_auto/blob/main/core/artifact_manager.py): `core/artifact_manager.py`
- [Screenshot capture](https://github.com/deepak4tuna-1/sfmob_auto/blob/main/utils/screenshot_utils.py): `utils/screenshot_utils.py`
- [Logging](https://github.com/deepak4tuna-1/sfmob_auto/blob/main/utils/logger.py): `utils/logger.py`

### Other components

- **pytest run**
- **Android / iOS devices**

## Connections

- pytest run → Driver factory: starts sessions
- Driver factory → Android / iOS devices: drives UI
- pytest run → State-aware ordering: orders tests
- State-aware ordering → State plan metadata: reads plans (evidence: `core/execution/state_ordering.py`)
- pytest run → Session setup: prepares state
- Session setup → App launch flow: launches app (evidence: `flows/session_flow.py`)
- Session setup → Authentication flow: delegates sign-in (evidence: `flows/session_flow.py`)
- Session setup → Home screen: checks state (evidence: `flows/session_flow.py`)
- Session setup → Login screen: uses screen (evidence: `flows/session_flow.py`)
- Authentication flow → Login screen: enters credentials (evidence: `flows/auth_flow.py`)
- Authentication flow → Home screen: checks result (evidence: `flows/auth_flow.py`)
- App launch flow → Launch screen: handles launch
- Session setup → More screen: uses sign-out UI (evidence: `flows/session_flow.py`)
- pytest run → Reusable API client: runs API cases
- Reusable API client → Content API: supports requests
- Reusable API client → FIMS API: supports requests
- pytest run → Park resolver: resolves park data
- pytest run → I Want To screen: validates domain UI
- pytest run → Park selection: validates park UI
- pytest run → HTML reporting: produces report
- HTML reporting → Driver factory: collects device metadata (evidence: `core/reporting/pytest_html_report.py`)
- HTML reporting → Screenshot capture: attaches captures (evidence: `core/reporting/pytest_html_report.py`)
- Screenshot capture → Artifact manager: gets run directory (evidence: `utils/screenshot_utils.py`)
- Artifact manager → Environment settings: uses paths (evidence: `core/artifact_manager.py`)
- Artifact manager → Logging: gets run ID (evidence: `core/artifact_manager.py`)
- pytest run → Environment settings: configures execution
