# Project plan — wow_turf (WowTurf)

Evidence date: 2026-09-28.

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

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

## Product

WowTurf is an educational platform that funds bursaries from advertising revenue. People sign up, complete a profile, and interact with ads. Interactions earn points. Points convert to entry tokens for a bursary draw. Advertisers create targeted campaigns and pay by card through Stripe.

Provenance: **Documented** in `README.md` and `docs/index.php`, `docs/users.php`, `docs/pointstokens.php`, `docs/campaigns.php`, and `docs/payments.php`.

Developers named in the in-repo docs: Ninjas for Hire. Staging host named in those docs: `https://staging.wowturf.org`. Staging infrastructure is described as AWS, managed by overdrive.co.za. A commented invite template in `ninjas-users` refers to `https://www.wowturf.org`. Whether that production host is still the live site is **Unknown / Requires Confirmation**.

## Branch reality

Default branch is `master`. `origin/HEAD` points at `master`.

| Line | Tip | Date | What it is |
|---|---|---|---|
| `master` | `00137305` | 2019-06-12 | "docs complete." 304 commits from `e317211d` (2018-05-07, "init.") |
| `origin/staging` | `c1d3e064` | 2020-02-26 | 215 commits not in `master`. Tip subject: "wow win pagination". Includes merges of `tyrone-api` (pull requests #4, #5, #6 recorded in commit subjects) |
| `origin/tyrone-api` | `f6d3ea6d` | 2020-01-23 | 189 commits not in `master`. Merged into `staging` before the later staging commits |
| `origin/stripe_integration` | — | 2018-09-17 | Tip subject: "contact btn bug fix." Not merged into `master` in the history inspected |
| `origin/pieter_code` | — | 2018-05-23 | Tip subject: "Modal Page 2 Bug fixes on checkboxes." Not merged into `master` in the history inspected |

This documentation set is based on `master` at `00137305`. Behaviour that exists only on `staging` or `tyrone-api` was not fully read. Which branch, if any, is deployed is **Unknown / Requires Confirmation**.

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

## Scope in the repository

In scope of what is implemented on `master`:

- A WordPress 4.9.6 site vendored under `public_html/` (core, one theme, custom plugins).
- Subscriber and advertiser accounts, dashboards, profiles, invites, and notifications.
- Campaign creation, admin review, targeting filters, and four interaction types.
- Stripe billing for advertisers, including threshold billing and outstanding-balance settlement.
- Points, tokens, and a super-admin competition draw.
- A static HTML prototype under `html/` used with Gulp.
- In-repo technical docs under `docs/` (PHP pages styled with Material Design Lite).

Out of scope of the code that was found, or not present as a committed application:

- A native mobile app. A commit message (2019-04-04) says avatar upload worked in mobile browsers and not in "the app". No app project is in this repository.
- Automated product tests. `html/package.json` sets `"test"` to a script that exits 1. No PHPUnit suite for the product was found.
- Formidable Forms, Advanced Custom Fields, Post SMTP, and Mailchimp as plugin source. The theme and plugins call `get_field()` and the docs name those products, but their plugin directories are not in `wp-content/plugins`.

## System architecture

```text
Browser
  → WordPress 4.9.6 (public_html/)
      → Theme wowturf (page templates, ad iframes, dashboards)
      → Custom plugins (users, campaigns, points, payments, notifications, geo, frontend)
      → MySQL (WordPress tables + nfh_* + geo_records)
  → Stripe (advertiser charges)
  → Mandrill via Post SMTP (transactional mail) — plugin not in the repo
  → Mailchimp (newsletter and offers) — plugin not in the repo
  → Facebook login endpoint (fbloginreg)
  → Cloudflare plugin (present in wp-content/plugins/cloudflare)
```

Frontend assets for the theme are compiled with Gulp from `public_html/wp-content/themes/wowturf/dev/` into `dist/`. A second Gulp project lives in `html/` and is a clickable prototype (`html/index.php` lists static screens). Provenance: **Implemented**.

## Major components

| Component | Location | Role |
|---|---|---|
| WordPress core | `public_html/` | CMS, users, posts, REST, cron file `wp-cron.php` |
| Theme WowTurf | `public_html/wp-content/themes/wowturf/` | Public pages, dashboards, ad templates, previews |
| Ninja Frontend | `public_html/wp-content/plugins/ninja-frontend/` | Search, campaign listing endpoint, contributed-article points |
| Ninja Users | `.../ninjas-users/` | Profile, registration REST, invites, bookmarks |
| Ninja Campaigns | `.../ninjas-campaigns/` | Targeting, spend, campaign lifecycle |
| Ninja Payments STRIPE | `.../ninja-payments-STRIPE/` | Cards and charges |
| Ninja Payments ZOTAPAY | `.../ninja-payments-ZOTAPAY/` | Marked redundant in the README. Still in the tree |
| Ninja Points Tokens | `.../ninjas-pointstokens/` | Points, tokens, competition |
| Ninja Notifications | `.../ninjas-notifications/` | Notification custom post type |
| Ninja Geo Manager | `.../ninja-geo-manager/` | Country, region, city against `geo_records` |
| Location API | `public_html/locationapi/` | Standalone geo scripts plus an ezSQL library |
| Database dump | `public_html/db/wowturf.sql` | Install dump named in the README |
| In-repo docs | `docs/*.php` | Author-written technical spec |

## Milestones visible in git

These are history, not a forward plan. No future milestone document was found.

| When | Evidence |
|---|---|
| 2018-05-07 | Initial commit |
| 2018-05 to 2018-09 | Early UI, `pieter_code`, `stripe_integration` |
| 2019-02 | Mails, periodic invoicing, time slider, geo database |
| 2019-03 to 2019-05 | Delete account, previews, click-through fixes, location lock, competition query refactor |
| 2019-06-06 to 2019-06-12 | README, plugin split out of `functions.php`, `docs/` completed on `master` |
| 2019-06-12 to 2020-02-26 | Further UI, ads-not-displaying fixes, and WowWin pagination on `staging` only |

## Implementation plan

There is no written plan for work after June 2019 on `master`. The README install steps are the only setup plan:

1. Import `public_html/db/wowturf.sql`.
2. Find-and-replace the dump for the local install.
3. Point `wp-config.php` at that database.
4. Sign in as the super admin named in the README and update permalinks.
5. In the theme folder, run `npm install` and `gulp`.

The active `wp-config.php` on `master` points at local database `testdb` on `localhost`. A commented block above it names an older host. Credentials from that file are not copied here.

## Known dependencies

- PHP and MySQL (WordPress 4.9.6). Exact PHP version is **Unknown / Requires Confirmation**.
- Node tooling for the theme: Gulp 3.9, `gulp-sass` 2, `gulp-uglify`, `gulp-clean-css` (`html/package.json` is the same stack; the theme has its own `package.json` beside the Gulpfile).
- Advanced Custom Fields (`get_field` / `update_field` / `have_rows`). Not vendored.
- Formidable Forms, including a Registration / Login addon. Not vendored. Docs say login and the two registration forms live there.
- Stripe API, called from Ninja Payments STRIPE.
- Post SMTP and Mandrill for transactional mail. Documented. Plugin not vendored.
- Mailchimp lists for newsletter and special offers. Documented. Plugin not vendored.
- jQuery 3.3.1 loaded from the Google CDN in `single-campaign.php`.
- OpenVPN, MySQL Workbench, and FTP for the staging environment. Documented. Access secrets are "in a supplied text file" that is not in the repository.

## Current project status

`master` has had no commit since 2019-06-12. `staging` stopped on 2020-02-26. The repository reads as a completed 2019 build plus a later unmerged staging line, not as an active codebase.

Silicon Ark had no `wow_turf/` directory before this onboarding.

## Human confirmation

- Which branch and which host are production.
- Whether `staging` (2020) replaced `master` (2019) in deployment.
- Whether Formidable, ACF, Post SMTP, and Mailchimp are installed only on the server.
- Whether the bursary product, Stripe account, and draws are still operating.
- Whether the local super-admin password published in `README.md`, and the commented database password in `wp-config.php`, were rotated. Values are not repeated in this plan.
