# devwithseashore/time-scheduler architecture

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

- Interactive diagram: https://gitdiagram.com/devwithseashore/time-scheduler
- Repository: https://github.com/devwithseashore/time-scheduler

## Overview

ChronoPing is a local Windows desktop scheduler for WhatsApp messages and Status posts. The main workflow is to compose and review a scheduled job, persist it and register its preparation time with Windows Task Scheduler, then have the runner prepare and verify the WhatsApp action through visible desktop automation. The desktop UI also exposes job results, diagnostics, and wake testing. Several UI-to-controller details and controller internals are unsampled; those links are shown only where the entry point, README, or SOURCE INDEX supports them.

Main entry points: [`status_midnight/controller.py`](https://github.com/devwithseashore/time-scheduler/blob/main/status_midnight/controller.py) (App controller), [`status_midnight/automation.py`](https://github.com/devwithseashore/time-scheduler/blob/main/status_midnight/automation.py) (WhatsApp automation), [`desktop_app.py`](https://github.com/devwithseashore/time-scheduler/blob/main/desktop_app.py) (Desktop entry), [`status_midnight/runner.py`](https://github.com/devwithseashore/time-scheduler/blob/main/status_midnight/runner.py) (Scheduled runner)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Desktop interface"]
  node_desktop["Desktop entry<br/>[desktop_app.py]"]
  node_compose["Schedule composer"]
  node_review["Preview and review<br/>[DraftPreview.qml]"]
  node_job_views["Jobs and activity<br/>[TaskCenter.qml]"]
end

subgraph group_scheduling["Job scheduling"]
  node_controller["App controller<br/>[controller.py]"]
  node_job_model["Job model<br/>[models.py]"]
  node_job_store[("Job store<br/>[storage.py]")]
  node_task_scheduler["Task registration<br/>[task_scheduler.py]"]
end

subgraph group_execution["WhatsApp execution"]
  node_runner["Scheduled runner<br/>[runner.py]"]
  node_automation["WhatsApp automation<br/>[automation.py]"]
  node_legacy_engine["Visual setup engine<br/>[app.py]"]
  node_control_refs["Generic control references"]
end

subgraph group_operations["Local operations"]
  node_power["Power manager<br/>[power_manager.py]"]
  node_wake_evidence["Wake evidence<br/>[wake_evidence.py]"]
end

node_user(("User"))
node_windows_tasks["Windows Task Scheduler"]
node_whatsapp["WhatsApp Desktop"]
node_windows_power["Windows power services"]

node_user -->|"creates schedule"| node_compose
node_compose -.->|"previews content"| node_review
node_review -.->|"submits job"| node_controller
node_desktop -->|"creates controller"| node_controller
node_desktop -->|"loads interface"| node_compose
node_controller -->|"creates jobs"| node_job_model
node_controller -->|"persists schedules"| node_job_store
node_controller -->|"registers jobs"| node_task_scheduler
node_task_scheduler -->|"registers task"| node_windows_tasks
node_windows_tasks -.->|"launches job"| node_desktop
node_desktop -->|"dispatches job"| node_runner
node_runner -->|"reads and updates"| node_job_store
node_runner -->|"prepares and publishes"| node_automation
node_automation -->|"extends engine"| node_legacy_engine
node_automation -->|"drives interface"| node_whatsapp
node_legacy_engine -->|"opens desktop app"| node_whatsapp
node_automation -.->|"uses visual references"| node_control_refs
node_user -->|"inspects results"| node_job_views
node_controller -->|"checks power state"| node_power
node_power -->|"records wake test"| node_wake_evidence
node_power -->|"queries power settings"| node_windows_power
node_wake_evidence -->|"checks system events"| node_windows_power

click node_desktop "https://github.com/devwithseashore/time-scheduler/blob/main/desktop_app.py"
click node_compose "https://github.com/devwithseashore/time-scheduler/blob/main/qml/components/ComposeSchedule.qml"
click node_review "https://github.com/devwithseashore/time-scheduler/blob/main/qml/components/DraftPreview.qml"
click node_job_views "https://github.com/devwithseashore/time-scheduler/blob/main/qml/components/TaskCenter.qml"
click node_controller "https://github.com/devwithseashore/time-scheduler/blob/main/status_midnight/controller.py"
click node_job_model "https://github.com/devwithseashore/time-scheduler/blob/main/status_midnight/models.py"
click node_job_store "https://github.com/devwithseashore/time-scheduler/blob/main/status_midnight/storage.py"
click node_task_scheduler "https://github.com/devwithseashore/time-scheduler/blob/main/status_midnight/task_scheduler.py"
click node_runner "https://github.com/devwithseashore/time-scheduler/blob/main/status_midnight/runner.py"
click node_automation "https://github.com/devwithseashore/time-scheduler/blob/main/status_midnight/automation.py"
click node_legacy_engine "https://github.com/devwithseashore/time-scheduler/blob/main/app.py"
click node_control_refs "https://github.com/devwithseashore/time-scheduler/tree/main/qml/assets/whatsapp-targets"
click node_power "https://github.com/devwithseashore/time-scheduler/blob/main/status_midnight/power_manager.py"
click node_wake_evidence "https://github.com/devwithseashore/time-scheduler/blob/main/status_midnight/wake_evidence.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_desktop,node_compose,node_review,node_job_views,node_user toneBlue
class node_controller,node_job_model,node_job_store,node_task_scheduler toneAmber
class node_runner,node_automation,node_legacy_engine,node_control_refs toneMint
class node_power,node_wake_evidence,node_windows_tasks toneRose
class node_whatsapp,node_windows_power toneIndigo
```

## Components

### Desktop interface

- [Desktop entry](https://github.com/devwithseashore/time-scheduler/blob/main/desktop_app.py): `desktop_app.py`
- [Schedule composer](https://github.com/devwithseashore/time-scheduler/blob/main/qml/components/ComposeSchedule.qml): `qml/components/ComposeSchedule.qml`
- [Preview and review](https://github.com/devwithseashore/time-scheduler/blob/main/qml/components/DraftPreview.qml): `qml/components/DraftPreview.qml`
- [Jobs and activity](https://github.com/devwithseashore/time-scheduler/blob/main/qml/components/TaskCenter.qml): `qml/components/TaskCenter.qml`

### Job scheduling

- [App controller](https://github.com/devwithseashore/time-scheduler/blob/main/status_midnight/controller.py): `status_midnight/controller.py`
- [Job model](https://github.com/devwithseashore/time-scheduler/blob/main/status_midnight/models.py): `status_midnight/models.py`
- [Job store](https://github.com/devwithseashore/time-scheduler/blob/main/status_midnight/storage.py): `status_midnight/storage.py`
- [Task registration](https://github.com/devwithseashore/time-scheduler/blob/main/status_midnight/task_scheduler.py): `status_midnight/task_scheduler.py`

### WhatsApp execution

- [Scheduled runner](https://github.com/devwithseashore/time-scheduler/blob/main/status_midnight/runner.py): `status_midnight/runner.py`
- [WhatsApp automation](https://github.com/devwithseashore/time-scheduler/blob/main/status_midnight/automation.py): `status_midnight/automation.py`
- [Visual setup engine](https://github.com/devwithseashore/time-scheduler/blob/main/app.py): `app.py`
- [Generic control references](https://github.com/devwithseashore/time-scheduler/tree/main/qml/assets/whatsapp-targets): `qml/assets/whatsapp-targets`

### Local operations

- [Power manager](https://github.com/devwithseashore/time-scheduler/blob/main/status_midnight/power_manager.py): `status_midnight/power_manager.py`
- [Wake evidence](https://github.com/devwithseashore/time-scheduler/blob/main/status_midnight/wake_evidence.py): `status_midnight/wake_evidence.py`

### Other components

- **User**
- **Windows Task Scheduler**
- **WhatsApp Desktop**
- **Windows power services**

## Connections

- User → Schedule composer: creates schedule (evidence: `README.md`)
- Schedule composer → Preview and review: previews content
- Preview and review → App controller: submits job
- Desktop entry → App controller: creates controller (evidence: `desktop_app.py`)
- Desktop entry → Schedule composer: loads interface (evidence: `desktop_app.py`)
- App controller → Job model: creates jobs (evidence: `status_midnight/controller.py`)
- App controller → Job store: persists schedules (evidence: `status_midnight/controller.py`)
- App controller → Task registration: registers jobs (evidence: `status_midnight/controller.py`)
- Task registration → Windows Task Scheduler: registers task (evidence: `status_midnight/task_scheduler.py`)
- Windows Task Scheduler → Desktop entry: launches job
- Desktop entry → Scheduled runner: dispatches job (evidence: `desktop_app.py`)
- Scheduled runner → Job store: reads and updates (evidence: `status_midnight/runner.py`)
- Scheduled runner → WhatsApp automation: prepares and publishes (evidence: `status_midnight/runner.py`)
- WhatsApp automation → Visual setup engine: extends engine (evidence: `status_midnight/automation.py`)
- WhatsApp automation → WhatsApp Desktop: drives interface (evidence: `status_midnight/automation.py`)
- Visual setup engine → WhatsApp Desktop: opens desktop app (evidence: `app.py`)
- WhatsApp automation → Generic control references: uses visual references
- User → Jobs and activity: inspects results (evidence: `README.md`)
- App controller → Power manager: checks power state (evidence: `status_midnight/controller.py`)
- Power manager → Wake evidence: records wake test (evidence: `status_midnight/power_manager.py`)
- Power manager → Windows power services: queries power settings (evidence: `status_midnight/power_manager.py`)
- Wake evidence → Windows power services: checks system events (evidence: `status_midnight/wake_evidence.py`)
