# Project plan — psl2020

Evidence date: 2026-10-06.

Source repository: `git@bitbucket.org:overdrive/psl2020.git`.

Default branch `master` at `007bc5a` (2020-08-04, "Merge branch 'qa' into prod"). Deploy branches `qa` (`65697aa`, 2020-08-05) and `prod` (`3c79d1d`, 2020-08-05) are described under Branch reality.

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

There is no README, project plan, or requirements document in the source repository, and there was no prior `silicon_ark/psl2020/` set. Statements below are recovered from code, views, deployment files, and Git history. Provenance is labelled.

## Product

**PSL Operations (2020) — Accreditation Portal.** The HTML title in `application/layouts/default.phtml` is "PSL Operations (2020) - Accreditation Portal". The footer is "© PSL Operations". The application is a public Zend Framework 1 site where a person applies for event accreditation, receives a reference number, and can later sign in with that reference and their email to view or edit the application.

Provenance: **Implemented** (layout title and footer, wizard in `application/modules/default/views/scripts/index/index.phtml`, login in `login.phtml`).

The homepage and the sign-in page do not take an event code from the URL. Both hard-code accreditation code `5F27014B26D5F` and load that row from the database view `Accreditations_view`. The event name, dates, banner, and terms shown on screen come from that row. Provenance: **Implemented** in `IndexController::indexAction` and `ApplicationController::loginAction`. Whether that code is the PSL 2020 record is **Unknown / Requires Confirmation** — the title is hard-coded, the event content is not.

Mail is sent as `accreditation@magus.events` with the display name "Accreditation - PSL Operations" and the subject "PSL Operations Notification". CodeDeploy copies the tree to `/mnt/data/www/html/magus.events/psl2020.magus.events/`. Provenance: **Implemented** in `ApplicationController::sendMail` and `appspec.yml`.

Commit `76d2dcc` (2020-08-04, author `heinrichoverdrive`) is titled "Added psl.magus.events. Changed ID and Names". That commit is the rebrand from the earlier Sun Met copy: title, footer, mail display name, terms text, and the hard-coded code. The hostname string `psl.magus.events` is in the commit message. The deploy path uses `psl2020.magus.events`. Which hostname is live is **Unknown / Requires Confirmation**.

## Lineage

Git history includes `5a58f33` ("Merge branch 'master' of https://bitbucket.org/overdrive/sunmet2020"). The first commit is `176220e` (2019-12-12, author `root`, "initial commit of full repository"), which is the same message and date style as the Sun Met repository's first commit. Behaviour in this tree matches that accreditation portal, with the 2020-08-04 PSL naming and code change on top.

Provenance: **Documented** in commit messages. Silicon Ark already has a separate set under `Sunmet2020/`. That set is not the source of truth for this repository.

## Branch reality

| Branch | Tip | Date | What differs from `master` |
|---|---|---|---|
| `master` (default, `origin/HEAD`) | `007bc5a` | 2020-08-04 | Inspected tree. Database host in `application.ini.bak` is `db.footprintapp.net` |
| `qa` | `65697aa` | 2020-08-05 | "Updated favicon". `application.ini.bak` host is `qadb.footprintapp.net`. Favicon binaries differ. Bitbucket Pipelines deploys this branch |
| `prod` | `3c79d1d` | 2020-08-05 | "Merge branch 'qa' into prod". Favicon matches `qa`. Database host matches `master` (`db.footprintapp.net`). Bitbucket Pipelines deploys this branch |

Product PHP and views are the same across the three tips aside from those config and favicon bytes. `git diff` of non-Zend paths was used for that comparison.

The pipeline in `bitbucket-pipelines.yml` runs only for branches `qa` and `prod`. It does not run for `master`.

**Discrepancy:** the default branch is one day behind the branches the pipeline deploys. Which tree is on the live host is **Unknown / Requires Confirmation**.

Authors across all history: `heinrichoverdrive` (29), `Heinrich du Plessis` (2), `root` (1).

The task-creation scan listed `sonar-project.properties` and `sonarqube_scan.bat` at the repository root. Neither file is tracked on `master`, `qa`, or `prod`. Provenance: **Unknown** — they may have been untracked files on the scan host.

## Objectives (inferred from the portal, not from a written plan)

No written objective exists in the repository. The following are **Inferred** from the screens and controllers:

- Let a person apply for accreditation under the PSL Operations (2020) portal, and optionally to linked events still open.
- Collect identity, organisation, role, a reason, a headshot, and acceptance of terms that name PSL Operations and the Safety of Sports and Recreational Events Act of 2009.
- Email the applicant when the accreditation record has an `EmailNotes` template, and email again when they confirm or cancel attendance.
- Let the applicant return with email plus reference number, see status, and edit the application until it is confirmed, declined, or approved.
- Hand the headshot to the Footprint accreditation service, which also holds the shared MySQL data.

## Scope

### In this repository

- Public application wizard, closed-applications page, attendance confirmation, login, profile edit, and photo update.
- Zend Framework 1.11.10 under `library/Zend`, plus a small `library/PG` and `library/Other` toolkit carried with the app.
- Zend table models for accreditation tables and views. Controllers in this repo use only a subset (see technical documentation).
- AWS CodeDeploy packaging (`appspec.yml`, `scripts/`, `codedeploy_deploy.py`) and a Bitbucket Pipelines file for `qa` and `prod`.
- Inspinia / Bootstrap / jQuery assets under `public/assets`.

### Not in this repository

- No admin, reviewer, or approver screens. Status values are displayed. Nothing in this repo sets Confirmed, Declined, or Approved except the applicant's own non-attendance path, which sets `Status` to 2.
- No schema migrations, seed data, or tests.
- No queue workers, cron jobs, or monitoring config.
- `application/configs/application.ini` is gitignored and is not in any branch. Zend loads that path from `public/index.php`. Only `application.ini.bak` is tracked. Whether the server has a real `application.ini` is **Unknown / Requires Confirmation**.

## Architecture (summary)

Browser → Apache (`public/.htaccess` rewrites to `public/index.php`) → Zend Framework 1 module `default` → MySQL database named `teamwizz_SARU` on a Footprint host → outbound HTTPS POST of the photo to `https://www.footprintapp.net/accreditations/application/updateimage`, and SMTP through `smtp.gmail.com`.

Full detail is in `technical-documentation.md`.

## Milestones visible in Git

| When | Commit | What it shows |
|---|---|---|
| 2019-12-12 | `176220e` | Full repository imported |
| 2020-01-06 to 2020-01-13 | several merges of `qa` into `prod` | Deploy scripts, favicon, removal of Openfield / Roth media from the Sun Met copy (`cf9251d`) |
| 2020-08-04 | `76d2dcc` | PSL title, code `5F27014B26D5F`, mail identity, terms |
| 2020-08-04 | `183b7fb`, `d63aec4` | Appspec and `application.ini` updates |
| 2020-08-04 | `007bc5a` | `master` tip: merge of `qa` into `prod` |
| 2020-08-05 | `65697aa`, `3c79d1d` | Favicon update on `qa`, then merge into `prod` |

There is no later commit. Provenance: **Documented** in `git log`. Whether the site was retired after the 2020 season is **Unknown / Requires Confirmation**.

## Dependencies

- PHP with the `mcrypt`, `curl`, and `gd` extensions (`random_id` uses `mcrypt_create_iv`; photos use `curl` and GD). `mcrypt` was removed from PHP core after PHP 7.1. The PHP version on the server is **Unknown / Requires Confirmation**.
- Apache (`httpd`) installed by `scripts/install_dependencies` via `yum`.
- MySQL database `teamwizz_SARU` (see technical documentation). Password is present in `application.ini.bak` and is not copied into Silicon Ark.
- AWS CodeDeploy, S3, and Bitbucket pipeline variables (`QA_*` and `PROD_*`). The variable values are not in the repo.
- Footprint (`footprintapp.net`) for the shared database and the photo endpoint.
- Gmail SMTP for applicant mail. The SMTP password is in `sendMail` and is not copied here.

## Current project status

**Implemented** as a finished public portal, last changed on 2020-08-05 on `qa`/`prod`. No in-progress feature branch exists. No planned work is written down in the repository.

## Known gaps (do not treat as a roadmap)

- Review and approval are not in this codebase.
- A checkout of any branch does not contain the `application.ini` file Zend requires.
- `apply.phtml` posts to `/accreditations/application/...`, while the homepage posts to `/application/...`.
- Credentials are stored in Git. Rotation status is **Unknown / Requires Confirmation**.
