# Project plan — gladafrica2020

Evidence date: 2026-10-13.

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

Default branch `master` at `d60d7aa` (2020-08-05, commit message "no message"). Deploy branches `qa` (`974541e`, 2020-08-05) and `prod` (`773548c`, 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/gladafrica2020/` set. Statements below are recovered from code, views, deployment files, and Git history. Provenance is labelled.

## Product

**PSL GladAfrica (2020) — Accreditation Portal.** The HTML title in `application/layouts/default.phtml` is "PSL GladAfrica (2020) - Accreditation Portal". The footer is "© PSL GladAfrica". 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 `5F28FF73F30AF` 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 GladAfrica 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 GladAfrica" and the subject "PSL GladAfrica Notification". CodeDeploy copies the tree to `/mnt/data/www/html/magus.events/gladafrica2020.magus.events/`. Provenance: **Implemented** in `ApplicationController::sendMail` and `appspec.yml`.

The public hostname is **Unknown / Requires Confirmation**. The deploy path uses `gladafrica2020.magus.events`. Earlier history (`76d2dcc`) mentions `psl.magus.events`; that string is not the current appspec destination.

## 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").

This repository shares history with `overdrive/psl2020` through `007bc5a` (2020-08-04, "Merge branch 'qa' into prod"). Silicon Ark documents that tip under `psl2020/`. After `007bc5a` this repository continues with three commits that rename the portal to PSL GladAfrica, point CodeDeploy at `gladafrica2020.magus.events`, change the hard-coded accreditation code, and set the tracked database host. `psl2020` is not the source of truth for this repository. `Sunmet2020/` and `premiership2020/` are further siblings of the same accreditation portal and are also not the source of truth here.

Provenance: **Documented** in commit messages and `git log`.

## Branch reality

| Branch | Tip | Date | What differs from `master` |
|---|---|---|---|
| `master` (default, `origin/HEAD`) | `d60d7aa` | 2020-08-05 | Inspected tree. Database host in `application.ini.bak` is `db.footprintapp.net` |
| `qa` | `974541e` | 2020-08-05 | "Update favicon". Does not contain `d60d7aa`, so the bak host stays `qadb.footprintapp.net`. Favicon binaries differ. Bitbucket Pipelines deploys this branch |
| `prod` | `773548c` | 2020-08-05 | "Merge branch 'qa' into prod". Contains `master` plus the favicon commit. Database host matches `master` (`db.footprintapp.net`). Bitbucket Pipelines deploys this branch |

`master` has no commits that `prod` lacks. Product PHP and views are the same on all three tips aside from favicon bytes and the `qa` database host. `git log` of each side 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 does not have the favicon that the pipeline branches deploy. `qa` still points at the QA database host. Which tree is on the live host is **Unknown / Requires Confirmation**.

Recent commits on this line are by `heinrichoverdrive`. The imported history also includes `Heinrich du Plessis` and `root`.

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 GladAfrica (2020) portal, and optionally to linked events still open.
- Collect identity, organisation, role, a reason, a headshot, and acceptance of terms that name PSL GladAfrica 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 `library/PG` and `library/Other` 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` | Earlier PSL Operations title and code `5F27014B26D5F` (still in history; replaced by the commits below) |
| 2020-08-04 | `007bc5a` | Shared tip with `psl2020` master: merge of `qa` into `prod` |
| 2020-08-05 | `2fc8b1b` | Appspec destination `gladafrica2020.magus.events`. Bak database host set to `qadb.footprintapp.net` |
| 2020-08-05 | `e1ec899` | Title, footer, terms, and mail identity become PSL GladAfrica. Hard-coded code becomes `5F28FF73F30AF` |
| 2020-08-05 | `d60d7aa` | `master` tip. Bak database host set back to `db.footprintapp.net`. Not on `qa` |
| 2020-08-05 | `974541e`, `773548c` | Favicon 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). A 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. 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**.
