# abdikadirjerry/cron-schedule-analyzer architecture

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

- Interactive diagram: https://gitdiagram.com/abdikadirjerry/cron-schedule-analyzer
- Repository: https://github.com/abdikadirjerry/cron-schedule-analyzer

## Overview

CronPulse is a stateless PHP cron-expression simulator and multi-job collision auditor. A browser submits an expression or job manifest to the front controller, which parses and simulates schedules, then returns an HTML view or JSON API response. The UI has simulator, collision-auditor, and JSON-preview tabs. The parser and simulator are excerpted; the README documents the API and capabilities. The graph does not assume unshown details of the autoloader or stylesheet behavior beyond what the excerpts show.

Main entry points: [`public/index.php`](https://github.com/abdikadirjerry/cron-schedule-analyzer/blob/main/public/index.php) (HTTP front controller), [`src/ViewShell.php`](https://github.com/abdikadirjerry/cron-schedule-analyzer/blob/main/src/ViewShell.php) (HTML shell and escaping), [`src/ScheduleSimulator.php`](https://github.com/abdikadirjerry/cron-schedule-analyzer/blob/main/src/ScheduleSimulator.php) (Next-run simulator), [`src/ViewTabs.php`](https://github.com/abdikadirjerry/cron-schedule-analyzer/blob/main/src/ViewTabs.php) (Simulator view)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_request["Request handling"]
  node_front["HTTP front controller<br/>[index.php]"]
  node_loader["Class autoloader<br/>[autoload.php]"]
  node_api["Schedule JSON endpoint<br/>[index.php]"]
end

subgraph group_schedule["Schedule analysis"]
  node_parser["Cron field parser<br/>[CronParser.php]"]
  node_runs["Next-run simulator"]
  node_collisions["Collision auditor"]
end

subgraph group_presentation["User interface"]
  node_simview["Simulator view<br/>[ViewTabs.php]"]
  node_collisionview["Collision view<br/>[ViewTabs.php]"]
  node_jsonview["JSON preview view<br/>[ViewTabs.php]"]
  node_shell["HTML shell and escaping<br/>[ViewShell.php]"]
  node_styles["Scheduler styles<br/>[scheduler.css]"]
end

node_browser(("Browser user"))

node_browser -->|"submits requests"| node_front
node_front -->|"loads classes"| node_loader
node_front -->|"parses expression"| node_parser
node_front -->|"projects runs"| node_runs
node_front -->|"audits manifest"| node_collisions
node_runs -->|"parses expression"| node_parser
node_collisions -->|"projects job runs"| node_runs
node_front -->|"routes API requests"| node_api
node_api -->|"returns JSON"| node_browser
node_front -->|"renders simulator"| node_simview
node_front -->|"renders collisions"| node_collisionview
node_front -->|"renders JSON preview"| node_jsonview
node_simview -->|"escapes values"| node_shell
node_collisionview -->|"escapes values"| node_shell
node_jsonview -->|"escapes payload"| node_shell
node_front -->|"renders page"| node_shell
node_shell -->|"links stylesheet"| node_styles
node_front -->|"serves stylesheet"| node_styles

click node_front "https://github.com/abdikadirjerry/cron-schedule-analyzer/blob/main/public/index.php"
click node_loader "https://github.com/abdikadirjerry/cron-schedule-analyzer/blob/main/src/autoload.php"
click node_api "https://github.com/abdikadirjerry/cron-schedule-analyzer/blob/main/public/index.php"
click node_parser "https://github.com/abdikadirjerry/cron-schedule-analyzer/blob/main/src/CronParser.php"
click node_runs "https://github.com/abdikadirjerry/cron-schedule-analyzer/blob/main/src/ScheduleSimulator.php"
click node_collisions "https://github.com/abdikadirjerry/cron-schedule-analyzer/blob/main/src/ScheduleSimulator.php"
click node_simview "https://github.com/abdikadirjerry/cron-schedule-analyzer/blob/main/src/ViewTabs.php"
click node_collisionview "https://github.com/abdikadirjerry/cron-schedule-analyzer/blob/main/src/ViewTabs.php"
click node_jsonview "https://github.com/abdikadirjerry/cron-schedule-analyzer/blob/main/src/ViewTabs.php"
click node_shell "https://github.com/abdikadirjerry/cron-schedule-analyzer/blob/main/src/ViewShell.php"
click node_styles "https://github.com/abdikadirjerry/cron-schedule-analyzer/blob/main/public/assets/scheduler.css"

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_front,node_loader,node_api,node_browser toneBlue
class node_parser,node_runs,node_collisions toneAmber
class node_simview,node_collisionview,node_jsonview,node_shell,node_styles toneMint
```

## Components

### Request handling

- [HTTP front controller](https://github.com/abdikadirjerry/cron-schedule-analyzer/blob/main/public/index.php): `public/index.php`
- [Class autoloader](https://github.com/abdikadirjerry/cron-schedule-analyzer/blob/main/src/autoload.php): `src/autoload.php`
- [Schedule JSON endpoint](https://github.com/abdikadirjerry/cron-schedule-analyzer/blob/main/public/index.php): `public/index.php`

### Schedule analysis

- [Cron field parser](https://github.com/abdikadirjerry/cron-schedule-analyzer/blob/main/src/CronParser.php): `src/CronParser.php`
- [Next-run simulator](https://github.com/abdikadirjerry/cron-schedule-analyzer/blob/main/src/ScheduleSimulator.php): `src/ScheduleSimulator.php`
- [Collision auditor](https://github.com/abdikadirjerry/cron-schedule-analyzer/blob/main/src/ScheduleSimulator.php): `src/ScheduleSimulator.php`

### User interface

- [Simulator view](https://github.com/abdikadirjerry/cron-schedule-analyzer/blob/main/src/ViewTabs.php): `src/ViewTabs.php`
- [Collision view](https://github.com/abdikadirjerry/cron-schedule-analyzer/blob/main/src/ViewTabs.php): `src/ViewTabs.php`
- [JSON preview view](https://github.com/abdikadirjerry/cron-schedule-analyzer/blob/main/src/ViewTabs.php): `src/ViewTabs.php`
- [HTML shell and escaping](https://github.com/abdikadirjerry/cron-schedule-analyzer/blob/main/src/ViewShell.php): `src/ViewShell.php`
- [Scheduler styles](https://github.com/abdikadirjerry/cron-schedule-analyzer/blob/main/public/assets/scheduler.css): `public/assets/scheduler.css`

### Other components

- **Browser user**

## Connections

- Browser user → HTTP front controller: submits requests (evidence: `README.md`)
- HTTP front controller → Class autoloader: loads classes (evidence: `public/index.php`)
- HTTP front controller → Cron field parser: parses expression (evidence: `public/index.php`)
- HTTP front controller → Next-run simulator: projects runs (evidence: `public/index.php`)
- HTTP front controller → Collision auditor: audits manifest (evidence: `public/index.php`)
- Next-run simulator → Cron field parser: parses expression (evidence: `src/ScheduleSimulator.php`)
- Collision auditor → Next-run simulator: projects job runs (evidence: `src/ScheduleSimulator.php`)
- HTTP front controller → Schedule JSON endpoint: routes API requests (evidence: `public/index.php`)
- Schedule JSON endpoint → Browser user: returns JSON (evidence: `README.md`)
- HTTP front controller → Simulator view: renders simulator (evidence: `public/index.php`)
- HTTP front controller → Collision view: renders collisions (evidence: `public/index.php`)
- HTTP front controller → JSON preview view: renders JSON preview (evidence: `public/index.php`)
- Simulator view → HTML shell and escaping: escapes values (evidence: `src/ViewTabs.php`)
- Collision view → HTML shell and escaping: escapes values (evidence: `src/ViewTabs.php`)
- JSON preview view → HTML shell and escaping: escapes payload (evidence: `src/ViewTabs.php`)
- HTTP front controller → HTML shell and escaping: renders page (evidence: `public/index.php`)
- HTML shell and escaping → Scheduler styles: links stylesheet (evidence: `src/ViewShell.php`)
- HTTP front controller → Scheduler styles: serves stylesheet (evidence: `public/index.php`)
