# hanaryadn/cek-resi-spx architecture

> Architecture diagram of the GitHub repository hanaryadn/cek-resi-spx, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/hanaryadn/cek-resi-spx
- Repository: https://github.com/hanaryadn/cek-resi-spx

## Overview

This is a small Shopee Express tracking lookup application. A user submits a tracking number to the PHP page, which queries Shopee Express and renders shipment details and tracking events. A separate PHP endpoint exposes a JSON-style lookup. The source excerpts show both request paths; the small JavaScript file is not connected to the page (its script tag is commented out), so it is omitted.

Main entry points: [`index.php`](https://github.com/hanaryadn/cek-resi-spx/blob/main/index.php) (Page lookup), [`spx.php`](https://github.com/hanaryadn/cek-resi-spx/blob/main/spx.php) (JSON endpoint)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web lookup"]
  node_lookup_form["Tracking form<br/>[index.php]"]
  node_page_lookup["Page lookup<br/>[index.php]"]
  node_tracking_result["Tracking result<br/>[index.php]"]
end

subgraph group_api["Tracking access"]
  node_json_endpoint["JSON endpoint<br/>[spx.php]"]
  node_spx_service["Shopee Express API"]
end

node_user(("User"))

node_user -->|"enters number"| node_lookup_form
node_lookup_form -->|"submits POST"| node_page_lookup
node_page_lookup -->|"queries tracking"| node_spx_service
node_spx_service -->|"returns JSON"| node_page_lookup
node_page_lookup -->|"renders details"| node_tracking_result
node_user -->|"requests lookup"| node_json_endpoint
node_json_endpoint -->|"queries tracking"| node_spx_service
node_spx_service -->|"returns JSON"| node_json_endpoint

click node_lookup_form "https://github.com/hanaryadn/cek-resi-spx/blob/main/index.php"
click node_page_lookup "https://github.com/hanaryadn/cek-resi-spx/blob/main/index.php"
click node_tracking_result "https://github.com/hanaryadn/cek-resi-spx/blob/main/index.php"
click node_json_endpoint "https://github.com/hanaryadn/cek-resi-spx/blob/main/spx.php"

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_lookup_form,node_page_lookup,node_tracking_result,node_user toneBlue
class node_json_endpoint,node_spx_service toneAmber
```

## Components

### Web lookup

- [Tracking form](https://github.com/hanaryadn/cek-resi-spx/blob/main/index.php): `index.php`
- [Page lookup](https://github.com/hanaryadn/cek-resi-spx/blob/main/index.php): `index.php`
- [Tracking result](https://github.com/hanaryadn/cek-resi-spx/blob/main/index.php): `index.php`

### Tracking access

- [JSON endpoint](https://github.com/hanaryadn/cek-resi-spx/blob/main/spx.php): `spx.php`
- **Shopee Express API**

### Other components

- **User**

## Connections

- User → Tracking form: enters number (evidence: `index.php`)
- Tracking form → Page lookup: submits POST (evidence: `index.php`)
- Page lookup → Shopee Express API: queries tracking (evidence: `index.php`)
- Shopee Express API → Page lookup: returns JSON (evidence: `index.php`)
- Page lookup → Tracking result: renders details (evidence: `index.php`)
- User → JSON endpoint: requests lookup (evidence: `spx.php`)
- JSON endpoint → Shopee Express API: queries tracking (evidence: `spx.php`)
- Shopee Express API → JSON endpoint: returns JSON (evidence: `spx.php`)
