# 1305abhi/recurpost-staging-automation architecture

> Architecture diagram of the GitHub repository 1305abhi/recurpost-staging-automation, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-08-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/1305abhi/recurpost-staging-automation
- Repository: https://github.com/1305abhi/recurpost-staging-automation

## Overview

#### Purpose and Entry Points
This is a Python/Playwright QA automation repository for the external RecurPost staging service (`https://staging.recurpost.com`), not the product itself. The primary execution entry point is `run_tests.py`, which dispatches regression, E2E, security, fuzzing, and inspection scripts. Core runtime settings and target-environment behavior are centralized in `core/config.py`.

#### Browser Automation Foundation
The shared framework owns Playwright browser/context lifecycle, authenticated storage-state reuse, and evidence capture through `core/browser.py`. Tests interact through common navigation, actions, waits, and snapshot facilities in `core/pages/base_page.py`. Authentication is a boundary with the remote staging service: persisted sessions in `data/auth_state.json` and `auth_state.json` bypass repeated login and make suites stateful against a preconfigured account.

#### UI Contract Layer
Selectors are treated as a maintained contract with the target application in `core/locators.py`; page objects isolate test scripts from direct DOM interaction. The primary domain abstractions are:
- Onboarding: `core/pages/onboarding_page.py`
- Kanban/calendar publishing: `core/pages/kanban_page.py`
- Workflow construction: `core/pages/workflow_page.py`
- Workspace and roles: `core/pages/workspace_page.py`

This layer is the main boundary between reusable automation mechanics and scenario-specific test orchestration.

#### Core Product Flows Under Test
Onboarding starts with signup/login and progresses through multi-step setup into the operational Kanban experience; scenarios reside in `tests/e2e/onboarding/` and use `core/pages/onboarding_page.py`. Workspace setup creates agency/workspace context, manages invites, members, roles, and permissions, then configures workflows through `tests/e2e/workspace_roles/`, `core/pages/workspace_page.py`, and `core/pages/workflow_page.py`.

#### Content Workflow and Publishing Pipeline
The dominant E2E flow exercises a content item from idea creation through Kanban stages, editing/composer actions, legal/SEO/design-like transitions, scheduling, and immediate publishing. This is modeled principally through `core/pages/kanban_page.py` and exercised by `tests/e2e/kanban_calendar/`. Drag/drop, modal overlays, social-profile selection, schedule setting, and “Post Now” are browser-visible interactions whose final effects occur in the external staging application.

#### Verification, Resilience, and Security
A master cross-module validation orchestrator lives at `tests/regression/run_exhaustive_regression_suite.py`. Stateful chaos/endurance behavior, especially Kanban transitions and broad module sweeps, is implemented in `tests/fuzzing/continuous_kanban_fuzzer.py` and adjacent fuzz scripts. Input-sanitization/XSS coverage is a focused security boundary at `tests/e2e/security/verify_xss_sanitization.py`.

#### Discovery and Evidence Pipeline
Inspection scripts discover routes and DOM contracts against staging, including `scripts/inspection/explore_full_application_sitemap.py`; the resulting application map is stored in `data/full_application_sitemap.json`. Test evidence is retained as HTML state captures under `artifacts/dom_snapshots/` and screenshots under `artifacts/screenshots/`. QA findings and planning are durable outputs in `reports/`, especially `reports/00_master_testing_plan.md` and `reports/03_bug_and_issue_report.md`.

#### Runtime and Dependencies
The repository requires Python 3.10+, Playwright, and Chromium, declared through `requirements.txt`. It runs locally against a network-accessible staging SaaS environment; no application server, database, or deployment infrastructure is present in this repository.

Main entry points: [`core/browser.py`](https://github.com/1305abhi/recurpost-staging-automation/blob/main/core/browser.py) (Browser lifecycle), [`core/pages/base_page.py`](https://github.com/1305abhi/recurpost-staging-automation/blob/main/core/pages/base_page.py) (Base page mechanics), [`run_tests.py`](https://github.com/1305abhi/recurpost-staging-automation/blob/main/run_tests.py) (Test dispatcher), [`scripts/inspection/explore_full_application_sitemap.py`](https://github.com/1305abhi/recurpost-staging-automation/blob/main/scripts/inspection/explore_full_application_sitemap.py) (Sitemap discovery)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Automation runtime"]
  node_runner["Test dispatcher<br/>Python entry point<br/>[run_tests.py]"]
  node_config["Runtime config<br/>settings<br/>[config.py]"]
  node_deps["Python + Playwright<br/>dependencies<br/>[requirements.txt]"]
  node_browser["Browser lifecycle<br/>Playwright framework<br/>[browser.py]"]
  node_sessions["Authenticated sessions<br/>storage state<br/>[auth_state.json]"]
end

subgraph group_contracts["UI contract layer"]
  node_basepage["Base page mechanics<br/>page framework<br/>[base_page.py]"]
  node_locators["Selector contracts<br/>UI locator catalog<br/>[locators.py]"]
  node_onboardingpage["Onboarding page<br/>page object<br/>[onboarding_page.py]"]
  node_kanbanpage["Kanban page<br/>page object<br/>[kanban_page.py]"]
  node_workspacepage["Workspace page<br/>page object<br/>[workspace_page.py]"]
  node_workflowpage["Workflow page<br/>page object<br/>[workflow_page.py]"]
end

subgraph group_suites["Test suites"]
  node_onboardingtests["Onboarding scenarios<br/>E2E suite"]
  node_workspacetests["Workspace and roles<br/>E2E suite"]
  node_kanbantests["Publishing pipeline<br/>E2E suite"]
  node_regression["Exhaustive regression<br/>validation orchestrator"]
  node_fuzzer["Continuous Kanban fuzzer<br/>stateful fuzzing"]
  node_xss["XSS sanitization<br/>security check"]
end

subgraph group_outputs["Discovery and evidence"]
  node_inspection["Sitemap discovery<br/>inspection script"]
  node_sitemap["Application map<br/>discovery data"]
  node_evidence["DOM snapshots<br/>test evidence"]
  node_screenshots["Screenshots<br/>test evidence"]
  node_reports["QA plans and findings<br/>reports"]
end

node_staging{{"RecurPost staging<br/>external SaaS"}}

node_runner -->|"loads"| node_config
node_runner -->|"dispatches"| node_regression
node_runner -->|"dispatches"| node_onboardingtests
node_runner -->|"dispatches"| node_kanbantests
node_runner -->|"dispatches"| node_fuzzer
node_runner -->|"dispatches"| node_inspection
node_deps -->|"provides Playwright"| node_browser
node_config -->|"configures"| node_browser
node_browser -->|"reuses"| node_sessions
node_browser -->|"automates"| node_staging
node_basepage -->|"uses"| node_browser
node_basepage -->|"resolves UI through"| node_locators
node_onboardingpage -->|"extends"| node_basepage
node_kanbanpage -->|"extends"| node_basepage
node_workspacepage -->|"extends"| node_basepage
node_workflowpage -->|"extends"| node_basepage
node_onboardingtests -->|"drives"| node_onboardingpage
node_workspacetests -->|"drives"| node_workspacepage
node_workspacetests -->|"configures"| node_workflowpage
node_kanbantests -->|"drives"| node_kanbanpage
node_fuzzer -->|"stresses"| node_kanbanpage
node_xss -->|"validates through"| node_basepage
node_inspection -->|"explores"| node_staging
node_inspection -->|"writes"| node_sitemap
node_browser -->|"captures HTML"| node_evidence
node_browser -->|"captures"| node_screenshots
node_regression -.->|"feeds findings"| node_reports

click node_runner "https://github.com/1305abhi/recurpost-staging-automation/blob/main/run_tests.py"
click node_config "https://github.com/1305abhi/recurpost-staging-automation/blob/main/core/config.py"
click node_deps "https://github.com/1305abhi/recurpost-staging-automation/blob/main/requirements.txt"
click node_browser "https://github.com/1305abhi/recurpost-staging-automation/blob/main/core/browser.py"
click node_sessions "https://github.com/1305abhi/recurpost-staging-automation/blob/main/data/auth_state.json"
click node_basepage "https://github.com/1305abhi/recurpost-staging-automation/blob/main/core/pages/base_page.py"
click node_locators "https://github.com/1305abhi/recurpost-staging-automation/blob/main/core/locators.py"
click node_onboardingpage "https://github.com/1305abhi/recurpost-staging-automation/blob/main/core/pages/onboarding_page.py"
click node_kanbanpage "https://github.com/1305abhi/recurpost-staging-automation/blob/main/core/pages/kanban_page.py"
click node_workspacepage "https://github.com/1305abhi/recurpost-staging-automation/blob/main/core/pages/workspace_page.py"
click node_workflowpage "https://github.com/1305abhi/recurpost-staging-automation/blob/main/core/pages/workflow_page.py"
click node_regression "https://github.com/1305abhi/recurpost-staging-automation/blob/main/tests/regression/run_exhaustive_regression_suite.py"
click node_fuzzer "https://github.com/1305abhi/recurpost-staging-automation/blob/main/tests/fuzzing/continuous_kanban_fuzzer.py"
click node_xss "https://github.com/1305abhi/recurpost-staging-automation/blob/main/tests/e2e/security/verify_xss_sanitization.py"
click node_inspection "https://github.com/1305abhi/recurpost-staging-automation/blob/main/scripts/inspection/explore_full_application_sitemap.py"
click node_sitemap "https://github.com/1305abhi/recurpost-staging-automation/blob/main/data/full_application_sitemap.json"

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_runner,node_config,node_deps,node_browser,node_sessions toneBlue
class node_basepage,node_locators,node_onboardingpage,node_kanbanpage,node_workspacepage,node_workflowpage toneAmber
class node_onboardingtests,node_workspacetests,node_kanbantests,node_regression,node_fuzzer,node_xss toneMint
class node_inspection,node_sitemap,node_evidence,node_screenshots,node_reports toneRose
class node_staging toneNeutral
```

## Components

### Automation runtime

- [Test dispatcher](https://github.com/1305abhi/recurpost-staging-automation/blob/main/run_tests.py): Python entry point · Dispatches regression, E2E, security, fuzzing, and inspection runs. · `run_tests.py`
- [Runtime config](https://github.com/1305abhi/recurpost-staging-automation/blob/main/core/config.py): settings · Centralizes target environment behavior. · `core/config.py`
- [Python + Playwright](https://github.com/1305abhi/recurpost-staging-automation/blob/main/requirements.txt): dependencies · `requirements.txt`
- [Browser lifecycle](https://github.com/1305abhi/recurpost-staging-automation/blob/main/core/browser.py): Playwright framework · Owns browser contexts, session reuse, and evidence capture. · `core/browser.py`
- [Authenticated sessions](https://github.com/1305abhi/recurpost-staging-automation/blob/main/data/auth_state.json): storage state · Preconfigured account sessions make suites stateful. · `data/auth_state.json`

### UI contract layer

- [Base page mechanics](https://github.com/1305abhi/recurpost-staging-automation/blob/main/core/pages/base_page.py): page framework · Provides navigation, actions, waits, and snapshots. · `core/pages/base_page.py`
- [Selector contracts](https://github.com/1305abhi/recurpost-staging-automation/blob/main/core/locators.py): UI locator catalog · Maintained DOM contract with the target application. · `core/locators.py`
- [Onboarding page](https://github.com/1305abhi/recurpost-staging-automation/blob/main/core/pages/onboarding_page.py): page object · `core/pages/onboarding_page.py`
- [Kanban page](https://github.com/1305abhi/recurpost-staging-automation/blob/main/core/pages/kanban_page.py): page object · Models content editing, transitions, scheduling, and publishing. · `core/pages/kanban_page.py`
- [Workspace page](https://github.com/1305abhi/recurpost-staging-automation/blob/main/core/pages/workspace_page.py): page object · `core/pages/workspace_page.py`
- [Workflow page](https://github.com/1305abhi/recurpost-staging-automation/blob/main/core/pages/workflow_page.py): page object · `core/pages/workflow_page.py`

### Test suites

- **Onboarding scenarios**: E2E suite
- **Workspace and roles**: E2E suite
- **Publishing pipeline**: E2E suite · Exercises idea-to-scheduled or immediate-post flows.
- [Exhaustive regression](https://github.com/1305abhi/recurpost-staging-automation/blob/main/tests/regression/run_exhaustive_regression_suite.py): validation orchestrator · Cross-module validation run. · `tests/regression/run_exhaustive_regression_suite.py`
- [Continuous Kanban fuzzer](https://github.com/1305abhi/recurpost-staging-automation/blob/main/tests/fuzzing/continuous_kanban_fuzzer.py): stateful fuzzing · Runs chaos and endurance coverage of Kanban transitions. · `tests/fuzzing/continuous_kanban_fuzzer.py`
- [XSS sanitization](https://github.com/1305abhi/recurpost-staging-automation/blob/main/tests/e2e/security/verify_xss_sanitization.py): security check · `tests/e2e/security/verify_xss_sanitization.py`

### Discovery and evidence

- [Sitemap discovery](https://github.com/1305abhi/recurpost-staging-automation/blob/main/scripts/inspection/explore_full_application_sitemap.py): inspection script · Discovers staging routes and DOM contracts. · `scripts/inspection/explore_full_application_sitemap.py`
- [Application map](https://github.com/1305abhi/recurpost-staging-automation/blob/main/data/full_application_sitemap.json): discovery data · `data/full_application_sitemap.json`
- **DOM snapshots**: test evidence
- **Screenshots**: test evidence
- **QA plans and findings**: reports

### Other components

- **RecurPost staging**: external SaaS · Network target; the product is not part of this repository.

## Connections

- Test dispatcher → Runtime config: loads
- Test dispatcher → Exhaustive regression: dispatches
- Test dispatcher → Onboarding scenarios: dispatches
- Test dispatcher → Publishing pipeline: dispatches
- Test dispatcher → Continuous Kanban fuzzer: dispatches
- Test dispatcher → Sitemap discovery: dispatches
- Python + Playwright → Browser lifecycle: provides Playwright
- Runtime config → Browser lifecycle: configures
- Browser lifecycle → Authenticated sessions: reuses
- Browser lifecycle → RecurPost staging: automates
- Base page mechanics → Browser lifecycle: uses
- Base page mechanics → Selector contracts: resolves UI through
- Onboarding page → Base page mechanics: extends
- Kanban page → Base page mechanics: extends
- Workspace page → Base page mechanics: extends
- Workflow page → Base page mechanics: extends
- Onboarding scenarios → Onboarding page: drives
- Workspace and roles → Workspace page: drives
- Workspace and roles → Workflow page: configures
- Publishing pipeline → Kanban page: drives
- Continuous Kanban fuzzer → Kanban page: stresses
- XSS sanitization → Base page mechanics: validates through
- Sitemap discovery → RecurPost staging: explores
- Sitemap discovery → Application map: writes
- Browser lifecycle → DOM snapshots: captures HTML
- Browser lifecycle → Screenshots: captures
- Exhaustive regression → QA plans and findings: feeds findings
