# PRD — sawis_reporting

Evidence date: 2026-10-04. Source: `git@bitbucket.org:overdrive/sawis_reporting.git`, `master` at `520145d` (2020-10-12, Selwin Matthyse, "first commit"). Parent commit `db8c5ca` is the Bitbucket `.gitignore` only.

There is no prior PRD in the repository or in Silicon Ark. Every requirement below was recovered from the files on `master`. Provenance is marked on each item. The repository name is not treated as a requirement.

## Product purpose

**Implemented:** a browser can be given a Material Design Lite dashboard page, and a PHP runtime can print `hello world`.

**Not implemented:** reporting. No query, dataset, chart data source, export, or SAWIS identifier appears in `index.html`, `index.php`, `assets/js/styles.css`, or `.gitignore`.

**Unknown / Requires Confirmation:** why the repository is named `sawis_reporting`, and who it is for. The author address `selwin@sawis.co.za` establishes who committed the files. It does not document a product goal.

## Users and roles

| Role | What they can do | Evidence | Provenance |
|---|---|---|---|
| Anonymous browser | Open `index.html` and see the template, if the server returns that file and the CDN responds | `index.html` | Implemented |
| Anonymous browser | Receive the text `hello world` when `index.php` is executed | `index.php` | Implemented |
| Signed-in user | None. The drawer shows `hello@example.com` and a menu of example addresses. Nothing checks an identity | `index.html` drawer | Implemented as static text. **Inferred** that it is not an account system |

No other role is named.

## Main workflows

### W1 — Open the dashboard

Trigger: a browser requests `index.html` (or a server maps `/` to that file).

What the file does:

1. Sets the document title to "Material Design Lite" and the meta description to the MDL template sentence.
2. Requests Roboto, Material Icons, `material.cyan-light_blue.min.css`, and `material.min.js` from third-party hosts.
3. Requests local `styles.css`, `images/android-desktop.png`, `images/ios-desktop.png`, `images/favicon.png`, `images/user.jpg`, and a Windows tile image at `images/touch/ms-touch-icon-144x144-precomposed.png`.
4. Renders a fixed drawer, a header titled "Home", four pie charts labelled 82%, two static area charts, an Updates card, and a View options card.
5. Shows a raised "View Source" control linking to `https://github.com/google/material-design-lite/blob/mdl-1.x/templates/dashboard/`.

Expected result when those local URLs are requested against this git tree: the stylesheet and images are missing. The files that exist are `assets/js/styles.css` and `assets/images/*`. The Windows tile image is not in the tree at all.

Provenance: **Implemented** markup. The broken local URLs are **Implemented** behaviour, not a guessed defect from outside the diff.

### W2 — Use the header and drawer controls

Trigger: the visitor uses a control on `index.html`.

| Control | Input | Behaviour in this repo |
|---|---|---|
| Search field `#search` | Text. Placeholder "Enter your query..." | No `<form>`, no `action`, and no script in the repository reads the field. MDL only expands the field |
| Header menu (`#hdrbtn`) | About, Contact, Legal information | Menu items are `<li>` elements. No `href` and no handler in this repo |
| Drawer links | Home, Inbox, Trash, Spam, Forums, Updates, Promos, Purchases, Social, Help | Every `href` is empty. An empty URL refers to the current document, so the control reloads this page |
| Account menu (`#accbtn`) | `hello@example.com`, `info@example.com`, "Add another account..." | Static menu items. No second page |
| Updates → Read More | Click | `href="#"` |
| View options checkboxes | Four labels: Click per object, Views per object, Objects selected, Objects viewed | No `name`, no `<form>`, no script. The browser holds the tick until the page reloads |
| Change location | Click | `href="#"` |
| View Source | Click | New tab, Google's template on GitHub |

Provenance: **Implemented**. None of these controls load a report.

### W3 — Execute `index.php`

Trigger: a PHP runtime runs `index.php`.

Inputs: none. The script does not read the query string, the body, cookies, or headers.

Behaviour: `echo "hello world";`. It does not set a status code, a `Content-Type`, or a redirect, and it does not include `index.html`.

Outputs: the response body contains the string `hello world`. Leading and trailing whitespace follow ordinary PHP tag handling; the file's only statement is that echo.

Error behaviour: there is no branch. A host without PHP cannot run the file. What that host returns instead is **Unknown**.

Provenance: **Implemented**.

### W4 — Choose which root file is the home page

Both `index.html` and `index.php` sit at the repository root. No server config, `.htaccess`, or nginx file says which one answers `/`.

**Unknown / Requires Confirmation:** the directory index order. If a host prefers `index.php`, visitors see `hello world` and never see the dashboard.

## Functional requirements

### FR-001 — Dashboard document

The system serves `index.html` as a Material Design Lite fixed-drawer layout whose visible title in the header is "Home" and whose document title is "Material Design Lite".

Provenance: **Implemented**. Evidence: `index.html`.

### FR-002 — Third-party presentation libraries

Loading the dashboard requests:

- `https://fonts.googleapis.com/css?family=Roboto:regular,bold,italic,thin,light,bolditalic,black,medium&lang=en`
- `https://fonts.googleapis.com/icon?family=Material+Icons`
- `https://code.getmdl.io/1.3.0/material.cyan-light_blue.min.css`
- `https://code.getmdl.io/1.3.0/material.min.js`

No subresource integrity attribute is set on those tags.

Provenance: **Implemented**. Whether those hosts are still acceptable is **Unknown / Requires Confirmation**.

### FR-003 — Local presentation files

The dashboard markup asks for `styles.css` and for images under `images/`. The committed files are `assets/js/styles.css` and `assets/images/`. `styles.css` itself points at `images/dog.png`, which would resolve next to the CSS file (`assets/js/images/dog.png`). That path is not in git. `assets/images/dog.png` is.

Provenance: **Implemented**. The page as committed does not apply its own stylesheet or images.

### FR-004 — Static charts

The dashboard shows four pie charts, each with the text `82%`, and two area charts that reuse one SVG definition. Axis labels on that definition are 500, 400, 300, 200, 100 and categories 1 through 7. No code computes these figures.

Provenance: **Implemented** sample graphic. Not a report.

### FR-005 — Static updates card

The Updates card title is "Updates". The supporting text is `Non dolore elit adipisicing ea reprehenderit consectetur culpa.` The stylesheet, if it were loaded from a path where `images/dog.png` resolved, would paint `dog.png` on that card. "Read More" does not open another document in this repo.

Provenance: **Implemented** template copy.

### FR-006 — PHP greeting

When `index.php` runs, the body includes `hello world` and nothing else is computed.

Provenance: **Implemented**. Evidence: `index.php`.

### FR-007 — No reporting function

A visitor cannot request, filter, export, or schedule a report. No requirement of that kind is written in the repository.

Provenance: absence on `master`. **Unknown / Requires Confirmation** whether reporting was the intent.

## Integrations

| System | Direction | Trigger | Data | Auth | Failure |
|---|---|---|---|---|---|
| `fonts.googleapis.com` | Outbound from the browser | `index.html` load | Font and icon CSS | None in the page | Dashboard still renders; type and icons fall back. Exact fallback is browser-dependent |
| `code.getmdl.io` | Outbound from the browser | `index.html` load | MDL 1.3.0 CSS and JS | None in the page | Without the JS, MDL components stay unupgraded. Without the CSS, layout classes have no MDL rules. The local stylesheet is also not linked correctly (FR-003) |
| GitHub | Outbound from the browser | View Source click | None sent by this app. Navigation only | None | The button opens a third-party page. No error handling in this repo |

No inbound API, webhook, database, mail, or SAWIS service is called.

The scan-host names `sonar-project.properties` and `sonarqube_scan.bat` are not in git. A SonarQube integration is **not** an implemented behaviour of `520145d`.

## Constraints

- English UI copy, `lang="en"` on the root element. Provenance: **Implemented**.
- Viewport meta requests `width=device-width, initial-scale=1.0, minimum-scale=1.0`. Provenance: **Implemented**.
- Mobile web-app and Apple web-app meta tags are present, with titles "Material Design Lite". The icon files they name are not at the URLs they use. Provenance: **Implemented**.
- No authentication gate. Provenance: **Implemented** absence.
- No server-side validation, because no input is accepted by `index.php` and no form is posted by `index.html`. Provenance: **Implemented**.

## Assumptions not promoted to requirements

| Statement | Why it is not a requirement |
|---|---|
| This product reports SAWIS data | Only the repository name and the committer's email domain say SAWIS. The files do not |
| The account drawer is a login | The addresses are `example.com` and nothing submits them |
| Charts show a real metric | Every pie is the literal text 82% inside a static SVG |
| `index.php` is the production home page | Both index files exist. Server preference is unknown |
| SonarQube is part of the product | Named only by a scan of a working copy that is not this git revision |
