# Project plan — media.accreditations.sarugby.online

Evidence date: 2026-10-09.

Source repository: `git@bitbucket.org:overdrive/media.accreditations.sarugby.online.git`.

Inspected revision: `master` at `773e00f` (2020-01-10, author `heinrichoverdrive`, commit message "no message"). That commit is `origin/HEAD`. The remote has no other branches.

This plan describes what the repository contains. It does not decide what the product should become.

## Product

**SA Rugby media accreditation collections** is a desk screen for collecting media accreditations at one fixed event. After a shared PIN is accepted, the browser shows companies and the people on their accreditation lists, and a desk user can mark a person whose service status is ready as collected.

The active layout title is "SA Rugby - Accreditions Collections" (spelling as in the template). The page header is "HSBC Cape Town Sevens - Media". The login form asks for a PIN. The HTML title on the login page is "SA Rugby - Load-in and Load-out".

Provenance: **Implemented** (`application/layouts/default.phtml`, `application/modules/default/views/scripts/login/index.phtml`, `LoginController::indexAction`, `IndexController`).

The same tree also contains a supplier registration and vehicle-permit application (company profiles, staff, B-BBEE fields, load-in and load-out permits, supplier FAQ). Those screens expect a company login (`Zend_Auth` against `CompaniesLogin`) or a company identity that the PIN login does not create. See FR-001 and FR-010 in `prd.md`.

## What this repository is

A Zend Framework 1.11.10 PHP application. Apache document root is `public/`. CodeDeploy copies the tree to `/mnt/data/www/html/sarugby.online/media.accreditations.sarugby.online/`.

The database name in configuration is `teamwizz_SARU` on host `db.footprintapp.net`. Many model classes (fixtures, squads, tournaments, food sessions, news, match reports) are present and are not called by the collection dashboard. Provenance: **Inferred** that this tree was cut from a larger SARU / Teamwizz application and pointed at the shared database. Whether those tables are still shared with other products is **Unknown / Requires Confirmation**.

## History

Four commits, 2019-12-18 to 2020-01-10. Authors: `root`, then `heinrichoverdrive`.

| Commit | Date | What changed |
|---|---|---|
| `194a3f3` | 2019-12-18 | Initial commit of the full application: controllers, views, Zend library, Limitless theme |
| `de25dba`, `3944d56`, `773e00f` | 2020-01-10 | CodeDeploy files (`appspec.yml`, `bitbucket-pipelines.yml`, `codedeploy_deploy.py`, `scripts/`), database host changed from `qadb.footprintapp.net` to `db.footprintapp.net`, HTTPS-to-www rewrite commented out, login heading changed from "Please enter you PIN Number" to "Please enter your PIN Number" |

No commits after 2020-01-10. No open feature branches on the remote. Commit messages on the three 2020-01-10 commits are "no message".

## Scope that is in this repository

- PIN gate that stores event id `63` in the `EVENT` session and opens the collections dashboard.
- Dashboard titled "Accreditations By Company": company rows with person counts and a collected count, expandable person rows, search, and a Collect action when service status is `7`.
- Collect action that writes status `8` and a `Collected` timestamp on `Accreditation_Applicants_Services`.
- Company registration, email confirmation, password reset, company profile, and staff profile screens carried over from the larger accreditation application.
- Supplier permit create, save, duplicate, cancel, and FAQ screens. Several of these read a company identity the PIN login never sets.
- Deploy description for AWS CodeDeploy via Bitbucket Pipelines on branches `qa` and `prod`.

## Scope that is not established

- Who uses the collection desk in production, and whether event `63` / "HSBC Cape Town Sevens - Media" is still the live event.
- Whether company registration, company login, and supplier permits are used on this host or only on other SARU hosts.
- Where service status `7` (Ready To Collect) is set. This repository only writes status `8` from the Collect button. Other status values are displayed as "Pending".
- Whether `qa` or `prod` deployment branches ever existed. They are not on the remote that was cloned.
- SonarQube files. The onboarding brief listed `sonar-project.properties` and `sonarqube_scan.bat` at the repository root. Neither file is in `master` at `773e00f`. They may have been untracked on the scan host. Provenance: **Unknown**.

## Architecture (as implemented)

```text
Browser
  -> Apache (.htaccess sends non-public URLs into public/, then public/.htaccess rewrites to public/index.php)
  -> Zend_Application (APPLICATION_ENV, default production)
  -> PG_Controller_Plugin_LayoutPicker (layout name = module name, which is "default")
  -> default module controllers
  -> Zend_Db (pdo_mysql, teamwizz_SARU)
  -> views (Limitless / Bootstrap theme in public/)
```

External calls that the code actually makes or prepares:

| System | Direction | Where |
|---|---|---|
| MySQL `teamwizz_SARU` | Read and write | `application/configs/application.ini` |
| SMTP `mail.sarugby.co.za` as `accreditation@sarugby.co.za` | Outbound mail | `LoginController`, `RegisterController`, `PermitsController` |
| `https://footprintapp.net/email/send` | Prepared POST; the call in `addpermitAction` is commented out | `PermitsController::postEmailToFp` |
| AWS S3 + CodeDeploy | Deploy artifact | `bitbucket-pipelines.yml`, `codedeploy_deploy.py`, `appspec.yml` |
| `http://www.sarugby.co.za/` | Login footer link labelled Terms & Conditions | `login/index.phtml` |

## Current status

Last source change is 2020-01-10. The collection dashboard and PIN gate are implemented. Supplier-portal screens are present and only partly wired to the PIN session. Deployment is described for `qa` and `prod` branches that are not on the remote. No automated test suite is in the repository.

## Known dependencies

- PHP with the `mcrypt`, `pdo_mysql`, and `curl` extensions (password reset and image helpers call `mcrypt_create_iv`; mail and the unused footprint mail helper use SMTP and curl).
- Zend Framework 1.11.10, vendored under `library/Zend`.
- Apache with `mod_rewrite`.
- MySQL database `teamwizz_SARU` on `db.footprintapp.net`.
- AWS CodeDeploy, S3, and Bitbucket Pipelines variables for `qa` and `prod`.
- Limitless theme assets under `public/limitless` and `public/global_assets`. Dompdf is vendored under `public/dompdf` and is not called by the collection dashboard.

## Milestones

No project plan, roadmap, or issue tracker is in the source repository. The only observable milestones are the initial import (2019-12-18) and the production-database plus CodeDeploy commit (2020-01-10).
