# Project plan — menu.mypass.zone

Evidence date: 2026-10-09.

Source repository: `git@bitbucket.org:overdrive/menu.mypass.zone.git`.

Inspected revision: `master` at `ca37151` (2022-07-21, "Update appspec.yml"). 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

**menu.mypass.zone** is a public browser for food-session menus at SA Rugby venues. The home page lists venues for one hardcoded tournament id (`284`). A visitor picks a venue, a date, then a session, and reads the session's dishes. Dish links open a nutrition and allergen popup.

Provenance: **Implemented** (`IndexController::indexAction`, `SessionController`, `application/layouts/default.phtml`).

The page title is "SA Rugby - Official Home of the Springboks". The footer is "Copyright {year} - SARU. All Rights Reserved." The header image is `/wp-content/SARugbyTopBannerWebsite.jpg`. A QR code on a session page points at `https://www.sarugby.online/menu/session/menu/id/{SID}/`.

There is no product name string "MyPass" in the layout or the menu views. The host name `menu.mypass.zone` comes from the repository and from the CodeDeploy destination set in `ca37151`.

## What this repository is

A Zend Framework 1.11.10 PHP application. Apache document root is `public/`. The root `.htaccess` rewrites requests into `public/`. CodeDeploy copies the tree to `/mnt/data/www/html/mypass.zone/menu.mypass.zone/`.

The database adapter is not in Git. `application/configs/application.ini` is listed in `.gitignore`, and the `application/configs` directory is absent from `master`. Table and view names in the models match a larger SA Rugby / accreditation schema (food sessions, fixtures, companies, permits). Provenance: **Inferred** that this tree was cut from that larger application and pointed at a shared database. The database host, name, and whether those tables are still shared are **Unknown / Requires Confirmation**.

A committed `public/error_log` records PHP notices from 2018-10-03 under `/home/sarugby/public_html/`, in `TournamentsController`, which is not a controller in this repository. The previous CodeDeploy destination, before `ca37151`, was `/mnt/data/www/html/footprintapp.net/bluecard.footprintapp.net/`. Provenance: **Inferred** lineage from the SA Rugby public site and from a bluecard host. Those products are not implemented by the three controllers here.

## History

Three commits, 2022-07-19 to 2022-07-21. Authors: Heinrich du Plessis, then `heinrichoverdrive`.

| Commit | Date | What changed |
|---|---|---|
| `051af10` | 2022-07-19 | `.gitignore` only. Ignores `application/configs/application.ini` |
| `e1a466e` | 2022-07-20 | The application: Zend library, controllers, models, Sportsline theme assets, CodeDeploy scripts. About 10,769 files |
| `ca37151` | 2022-07-21 | `appspec.yml` destination and permission path changed from `bluecard.footprintapp.net` to `menu.mypass.zone` |

No commits after 2022-07-21. No open feature branches on the remote.

## Scope that is in this repository

- Public venue list for tournament id `284`, ordered by venue name.
- Date list for one venue, then the food sessions on the chosen date.
- Session menu: item title and description, ordered by `Position`.
- Nutrition popup: title, description, allergen images, portion, energy (kcal and kJ), protein, carbohydrate, and fat.
- QR image that encodes a `www.sarugby.online` URL for the same session id.
- Zend error controller for missing routes (404) and other exceptions (500).
- Deploy description for AWS CodeDeploy via Bitbucket Pipelines on branches `qa` and `prod`.

## Scope that is not established

- Which real-world event tournament id `284` is, and whether that id is still the one the site should show.
- Whether the live site is `menu.mypass.zone`, a path under `www.sarugby.online`, or both.
- Where menus, nutrition rows, and allergens are created or edited. This repository only reads them.
- The database host, schema owner, and credentials. They live in the gitignored `application.ini`, which is not in the clone.
- 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 `ca37151`. They may have been untracked on the scan host. Provenance: **Unknown**.

## Architecture (as implemented)

```text
Browser
  → Apache (root .htaccess → public/)
  → public/index.php (Zend_Application, env default production)
  → application/configs/application.ini   [not in Git]
  → IndexController or SessionController
  → Zend_Db_Table models
  → MySQL views/tables (adapter unknown)
  → default layout (Sportsline theme assets under public/wp-content)
```

No session gate, no `Zend_Auth` check, and no plugin stack are registered in `Bootstrap`. `Bootstrap::_initDbAdapter` is empty. Database setup is expected to come from `application.ini` resources, which are not in this tree.

## Major components

| Component | Role | Evidence |
|---|---|---|
| `IndexController` | Home: venues for tournament `284` | `indexAction` |
| `SessionController` | Dates, sessions, menu items, nutrition fragment | `datesAction`, `menusAction`, `menuAction`, `nutritionAction` |
| `ErrorController` | 404 and 500 | `errorAction` |
| `Model_MenuVenues` | Reads `FoodSessionVenues_view` | Used by the home page |
| `Model_TournamentFoodSession` | Reads `FoodSession_view` | Used by date and session screens |
| `Model_FoodSessionItems` | Reads `SessionFood_Items` | Used by the menu screen |
| `Model_Nutritions`, `Model_Allergens` | Nutrition row and allergen list | Used by the popup |
| Other models under `application/models` | Fixtures, squads, accreditation, companies, news, and similar | No controller in this repository instantiates them |
| `public/wp-content`, `public/wp-includes` | Static Sportsline / WordPress 4.4-era theme files | Linked from the layout. Not a WordPress application |
| CodeDeploy + Bitbucket Pipelines | Package the tree and deploy on `qa` or `prod` | `appspec.yml`, `bitbucket-pipelines.yml`, `codedeploy_deploy.py` |

## Milestones visible in Git

1. 2022-07-19 — repository created with a gitignore for the config file.
2. 2022-07-20 — application imported.
3. 2022-07-21 — deploy path pointed at `menu.mypass.zone`.

No later milestone is recorded in Git.

## Current status

The menu read path is implemented and has not changed since 2022-07-21. A fresh clone does not contain `application.ini`, so it cannot open a database until that file is supplied outside Git. Write methods exist on the food models and are not called by any controller. Deployment pipelines are written for branches that are not on the remote.

## Known dependencies

- PHP with the Zend Framework 1.11.10 library vendored in `library/Zend`. The PHP version required by the host is **Unknown**.
- Apache (`httpd`), installed and started by the CodeDeploy hooks.
- MySQL tables and views named in the models. Adapter settings are **Unknown**.
- Google Chart Image API for the session QR code (`chart.googleapis.com`).
- Google Fonts stylesheets (`fonts.googleapis.com`) referenced by the layout over `http://`.
- Bitbucket Pipeline variables for AWS (`QA_*` and `PROD_*` access key, region, CodeDeploy application, deployment group, S3 bucket). The values are not in the repository.
- Python 3.5.7 image and `boto3==1.3.0` for the deploy script.

## Human confirmation

1. Is tournament id `284` still the event this site should show?
2. What is the public URL: `menu.mypass.zone`, `https://www.sarugby.online/menu/...`, or another host?
3. Where is `application.ini` maintained, and which database does this host use?
4. Is anyone still deploying from `qa` or `prod`, or is `master` the only line of history?
5. Should the unused SARU models, theme dump, dompdf tree, and `public/error_log` stay in this repository?
