# Project plan — convergence

Evidence date: 2026-10-18.

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

Inspected revision: `master` at `6b66438` (2021-03-15, rachelmogano, "PHP 7.4 Changes"). `origin/HEAD` points at `master`. The scan-host path `~/projects/sonar_scan/repos/convergence` was not on this machine. The tree was read from that git revision. OVER-73's recorded tip matches this commit.

Git history on `master` is three commits:

| Commit | Date | Author | Message |
|---|---|---|---|
| `8a858af` | 2019-04-04 | Jaco Brits | Initial commit (README only) |
| `b9d3417` | 2019-04-04 | jacobrits | Master commit (application tree) |
| `6b66438` | 2021-03-15 | rachelmogano | PHP 7.4 Changes |

Dated comments inside the PHP files run from 2010 (SMS helper, login log) through February 2021 (PHP 7.4 string-offset change in `project.functions.inc.php`). Provenance: the application behaviour was written before this repository's first application commit. This git history records a 2019 import plus a 2021 PHP 7.4 pass, not the original development timeline.

`README.md` is the Bitbucket "edit a file" tutorial plus two product lines: "Convergence's is an Silicon override project" and "Always production on master". There is no prior Silicon Ark directory for this repository. A separate Silicon Ark set, `convergence_production/`, documents `git@bitbucket.org:overdrive/convergence_production.git` at `a91a555` (2021-06-15). That tree is later and contains modules this repository does not (HR, email scry, file-integrity monitoring, an under-construction page). This plan describes `convergence` only.

Credentials are hardcoded in `system.php` and `system2.php`. They are not copied into this document. A PHP session file is committed under `SESSION/`. Its contents were not read.

## Product

Convergence is Silicon Overdrive’s internal operations application. The shell title comes from the `Brand` value in `sysSettings`. Proposal supplier mail uses the subject "Price request from Silicon Overdrive". Ticket authorisation mail uses the subject prefix "SIL: Ticket Authorization Request".

The live host named in configuration is `convergence.overdrive.co.za`. `www.convergence.overdrive.co.za` and a null server name are rewritten to that host. The primary database name on the dev keys is `convergence_2017`. The live-host key uses database name `convergence`. An auxiliary database name, `convergence_2017_aux`, is declared for the `localhost` key in `system2.php` and is not read anywhere else in this tree.

Provenance: **Implemented** in `system2.php` (the file `_framework/_nemo.basic.cls.php` includes), `includes/proposal.cls.php`, and `includes/ticket.cls.php`. There is no product requirements document in the repository.

**Unknown / Requires Confirmation:** whether this repository was still what `convergence.overdrive.co.za` served after 15 March 2021, and whether `convergence_production` replaced it.

## Branch reality

| Line | Tip | Date | What it is |
|---|---|---|---|
| `master` (default; `origin/HEAD`) | `6b66438` | 2021-03-15 | Only branch. Three commits, 4 April 2019 to 15 March 2021 |

No `develop` branch, release tag, pipeline file, Composer manifest, or PHPUnit suite is in the tree. README line "Always production on master" is the only written branch rule. Provenance: **Documented** in `README.md`. Whether that rule was followed after 2021 is **Unknown**.

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

- Sign staff in and build a menu from security-group rows.
- Keep clients, contacts, and suppliers. A supplier is a client whose type is `Supplier`.
- Run a helpdesk: tickets, tasks, SLAs, a calendar, and time logged against tasks.
- Ask a client contact who can authorise jobs to approve or decline a ticket.
- Quote work: products, bundles, proposals, proposal templates, and payment terms.
- Email proposals and supplier price requests, and render a proposal PDF.
- Keep training courses, materials, bookings, and certificates.
- Record departments, department statuses, fault codes, and fix codes.
- Show a home page. The tiles and to-do lists in this tree are placeholder markup, not live totals.

## Scope

### In scope of `master`

1. The Nemo PHP framework under `_framework/`.
2. Page controllers at the repository root (`ticket.php`, `client.php`, `proposal.php`, and the other `*.php` pages).
3. Entity classes under `includes/`.
4. Layouts, CSS, JavaScript, images, and the `vendors/` admin-theme libraries.
5. One cron entry point: `cron.daily.createticket.php`.
6. PDF generation through mPDF (`includes/mpdf/`) for proposals.
7. PHPExcel under `PHPExcel/` and a second copy under `PHPExcel20210315/`. List export in `_framework/_nemo.list.cls.php` constructs a `PHPExcel` object.
8. Training-certificate storage under `edulab/training_certificates/`, uploads under `uploads/`, and profile pictures under `profilepictures/`.

### Out of scope of this repository

- The MySQL schema and the live rows. Tables are named in PHP. There is no `.sql` dump.
- The menu labels and security-group matrix. Those live in `sysMenuLevel1`, `sysMenuLevel2`, `sysSecurity`, and `sysSecurityGroup`.
- The web-server cron schedule. The PHP page exists. Crontab entries do not.
- A mobile app, public API, or automated test suite.
- HR, inbound-mail ticket creation, and file-integrity monitoring. Those appear in `convergence_production` and are absent here (`hr.leave.application.php`, `cron.hourly.php`, `cron.email.scry.php`, and `under.construction.php` are not in this tree).

## System architecture

```text
Browser
  │
  ├─ login.php              (NemoBasic — no Nemo session gate)
  ├─ resetPassword.php
  ├─ ticket.ops.php         (NemoBasic — approve / decline)
  ├─ cron.daily.createticket.php
  │
  └─ *.php pages            (Nemo — redirects to login.php when $_SESSION[USER] is unset)
        ├─ layouts/layout.back.incl.php
        ├─ includes/*.cls.php
        └─ _framework/      (Nemo list, details, menu, email, audit)

MySQL via mysqli
  host key from $_SERVER[SERVER_NAME]
  database convergence_2017 (dev keys) or convergence (live host key)
```

`Nemo` (`_framework/_nemo.cls.php`) requires a session. `NemoBasic` does not. `ticket.ops.php` and the daily cron page construct `NemoBasic`.

Pages are classic PHP controllers: a root `*.php` file handles `Action`, and `includes/*.cls.php` holds the list, save, and query logic. The framework reads column metadata from MySQL `information_schema` when building detail forms.

## Major components

| Component | Role | Evidence |
|---|---|---|
| Nemo shell | Session, menu, filters, paging, toolbar | `_framework/_nemo.cls.php`, `layouts/layout.back.incl.php` |
| Security | Users, groups, per-URL flags `blnView`, `blnNew`, `blnSave`, `blnDelete`, `blnSpecial` | `login.php`, `_framework/_nemo.menu.cls.php` |
| CRM | Clients, contacts, suppliers | `client.php`, `contact.php`, `supplier.php` |
| Helpdesk | Tickets, tasks, time, schedule, SLA templates | `ticket.php`, `task.php`, `time.php`, `schedule.php`, `sla.*.php` |
| Quoting | Products, bundles, proposals, templates | `product.php`, `product.bundle.php`, `proposal.php`, `proposal.template.php` |
| Training | Courses, materials, certificates | `edu.training.*.php`, `edulab/` |
| Reference data | Departments, statuses, fault codes, fix codes, payment terms, settings | matching root `*.php` files |
| Mail | PHP `mail()`, templates, logged rows in `tblEmail` | `_framework/_nemo.email.cls.php`, `email.php` |
| Audit | Field-level log on save | `_framework/_nemo.audit.cls.php`, `sysAuditLog` |

## Milestones visible in the tree

These are comments and commits, not an approved plan.

| When | What | Evidence |
|---|---|---|
| 2010-11 / 2010-12 | Login log and SMS helper | `system.functions.inc.php` |
| 2016-09 | Salted password table `sysPassword` | `_framework/_nemo.password.cls.php` |
| 2017-01 | Login page, guest access removed (7 March) | `login.php`, `_nemo.cls.php` |
| 2017-02 to 2017-09 | Clients, products, proposals, tickets, schedule, Paint Your Day Green report | class file headers |
| 2017-06-22 | Daily SLA ticket creator | `cron.daily.createticket.php` |
| 2017-11-02 | Comment: Hetzner breach, FTP/DB details reset | `system.php`, `system2.php` |
| 2018-02-01 | Task screen realigned; fault table renamed in a comment to `crmTaskFault` | `sla.task.php`, `fault.codes.php` |
| 2019-04-04 | Repository created; application imported | git `8a858af`, `b9d3417` |
| 2021-02-25 | PHP 7.4 curly-brace offset replaced in `cleanColumnName` | `project.functions.inc.php` |
| 2021-03-15 | PHPExcel tree copied to `PHPExcel20210315/`; `system2.php` added; Nemo classes patched for PHP 7.4 | git `6b66438` |

## Implementation plan

No forward plan is in the repository. The last change is the PHP 7.4 pass. Status of the product after that date is **Unknown / Requires Confirmation**.

## Known dependencies

- PHP with the `mysqli` extension. The 2021 commit message says PHP 7.4. The runtime version on the host is **Unknown**.
- MySQL (or MariaDB) with `information_schema`. Engine named in the password-table bootstrap is InnoDB.
- PHP `mail()` and the settings keys `SMTP Send As` and `SMTP BCC`.
- mPDF for proposal PDFs.
- PHPExcel for list export.
- Front-end libraries under `vendors/` (Bootstrap, jQuery, Font Awesome, FullCalendar, Morris.js, PNotify, and others). jQuery 1.10.2 is also under `js/`.
- Optional SMS via `http://www.mymobileapi.com/api5/http5.aspx`. `SendSMS` has no caller in this tree.
- Lucidchart, embedded on the home page.

## Current project status

The repository's default branch stops on 15 March 2021. Home-page statistics are literal numbers, not queries against tickets or billing. The view-permission check in `Nemo::iniSecurity` assigns `blnView = 1` before the denial redirect, with a comment dated 2017-01-10 that this was added for testing. Authorisation emails link to `lamp/Convergence_2017/dev/ticket.ops.php`.

Whether any of that was corrected on the server, outside git, is **Unknown / Requires Confirmation**.
