# Project plan — indawo

Evidence date: 2026-10-12.

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

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

The scan-host path named on the onboarding issue (`~/projects/sonar_scan/repos/indawo`) was not on this machine. The tree below was read from a clone of `master`. That revision is the same commit the issue records (`ed7defd`, 2020-06-03 08:05:12 +0200, heinrichoverdrive, "Updated PHPExcel and mpdf"). `git ls-remote` HEAD on 2026-10-12 returned the same hash. `origin/HEAD` is `master`.

There is no prior Silicon Ark set for `indawo`. Silicon Ark already has sets for `indawo_65`, `indawo_84`, `indawo_docker`, and `indawo_online_docker`. Those are other repositories. They are not a description of this tree.

## Product

The Git remote and the onboarding issue name the repository `indawo`. The login audit label in `login.php` is **Indawo Online**.

| Identity | Where | Provenance |
|---|---|---|
| Repository `indawo` | Git remote | **Implemented** |
| Login audit label "Indawo Online" | `login.php` (`tblLoginInsert` messages) | **Implemented** |
| README title "Indawo / Code Deploy with AWS and FTP Deploy" | `README.md` | **Documented**. The paths and AWS steps in that file are not in this tree. See Current status |
| Composer require `mpdf/mpdf` `^8.0` only. No package name | `composer.json` | **Implemented** |
| MySQL database name `indawo_online` on the lamp, onsite, and live-named hosts; `sil27_indawo_online` on `silicon-overdrive.co.za` | `system.HTTP.php`, `system.HTTPS.php` | **Implemented** in those files. Runtime bootstrap does not include them. See technical documentation |
| Host key commented "LIVE LIVE": `online.indawo.local` | `system.HTTP.php`, `system.HTTPS.php` | **Implemented** in those files |
| Crontab comment path `/var/www/html/REPO_Indawo` | `cron.daily.ordercancel.php` | **Documented** as a comment. Whether that path was the install is **Unknown / Requires Confirmation** |

Indawo Online is a PHP web application for construction-company operations: clients and contacts, jobs and enquiries (Foreman), purchase orders and authorisation, invoices, pre-start agreements, budget adjustments, job suggestions, assets, cash-flow and management dashboards, and users. MySQL holds the online copy. Microsoft SQL Server is the Foreman / back-office system reached over FreeTDS ODBC. Provenance: **Implemented** in the page scripts, cron headers, and `_sync.cls.php`. A written architecture document is not in this repository.

`indawo_65` and `indawo_84` (Silicon Ark, evidence date 2026-10-12) are later repositories that also call the product Indawo Online and share page and class names with this tree (`login.php`, `order.php`, `job.suggestion.php`, the Nemo classes, the six daily sync crons). Whether this 2020 `master` is an ancestor of those repositories, and whether it is still deployed, was not proven by a file-level diff. **Inferred** from names and dates. **Unknown / Requires Confirmation** whether this line is superseded.

## Branch reality

`git ls-remote` was checked for HEAD. Local `git branch -a` after clone, evidence date 2026-10-12. No tags.

| Ref | Tip | Date and subject | Relation to `master` |
|---|---|---|---|
| `master` | `ed7defd` | 2020-06-03, "Updated PHPExcel and mpdf" | Branch that was read. `origin/HEAD` |
| `dev` | `ed7defd` | Same object as `master` | Identical to `master` |
| `Jacques` | `53997b4` | 2020-06-17, JacquesOverdrive, "PHP 7.2 upgrade changes" | 14 days after `master`. Not merged. 21 files differ. Not read line by line |
| `development` | `dfe637c` | 2019-09-20, "Merge branch 'development'" | Behind `master`. Contains the September 2019 PDF fix and extra pipeline edits. Not the tree that was read |

`master` history is eight commits, 2019-07-26 to 2020-06-03:

| Commit | Date | Author | Subject |
|---|---|---|---|
| `7c8edd8` | 2019-07-26 | Gael Musikingala | Initial commit |
| `5481fc5` | 2019-07-30 | Jaco Brits | Pipeline config file and readme added |
| `a46acac` | 2019-07-30 | Jaco Brits | README.md edited online with Bitbucket |
| `94fa8e6` | 2019-07-30 | Jaco Brits | README.md edited online with Bitbucket |
| `e26adba` | 2019-07-31 | heinrichoverdrive | Initial upload to repository |
| `7692ad1` | 2019-08-06 | DESKTOP-KB0GG2T\User | Fix repo & and Upgrade project to PHP7 |
| `a92ad17` | 2019-08-07 | Gael Musikingala | bitbucket-pipelines.yml edited online with Bitbucket |
| `ed7defd` | 2020-06-03 | heinrichoverdrive | Updated PHPExcel and mpdf |

The "Upgrade project to PHP7" commit does not replace the `mysql_*` calls in `_nemo.database.cls.php`. See technical documentation.

`origin/Jacques` changes these PHP files relative to `ed7defd`: `_nemo.list.cls.php`, `ajax.functions.php`, `includes/budget.adjustment.cls.php`, `includes/dashboard.users.cls.php`, `includes/foreman.cls.php`, `includes/order.cls.php`, `includes/prestart.agreement.cls.php`, `includes/raiseInvoice.cls.php`, three report files, `prestart.agreement.php`, `system.HTTP.php`, and three files under `mpdf/`. It also replaces several binary report files. The subject says PHP 7.2. The diff was not read as product behaviour. Whether anyone deployed `Jacques` is **Unknown / Requires Confirmation**.

## Scope on `master`

In the committed application (libraries under `PHPExcel/`, `mpdf/`, `mpdf_PHP5.6_version/`, `html2pdf/`, `plugins/`, `vendor/`, `rf/`, and `images/` excluded from this list):

- Page scripts for login, home, clients, contacts, contact log, jobs, enquiries, orders, order authorisation, invoices (`raiseInvoice.php`), pre-start agreements, budget adjustments, job suggestions, job types, assets, companies, sales people, users, security groups, settings, email, messages, my tasks, KPI, dashboards, search, archived, and reports.
- A Nemo page framework (`_nemo*.cls.php`) for lists, details, menus, email, reports, passwords, and MySQL.
- ODBC access to SQL Server (`_nemo.database.SQL_SERVER.cls.php`, `_sync.cls.php`).
- Six numbered daily sync crons (lookups, clients, Foreman, data dumps), cash-flow PDF generation, order-authorisation email, and a monthly order-cancel script limited to company id 1.
- Per-record SQL Server update when a job suggestion is accepted (`SyncRecord` in `includes/job.suggestion.cls.php`).
- Composer lock for `mpdf/mpdf` v8.0.4. Page code includes the older `mpdf/mpdf.php`, not `vendor/autoload.php`.
- A Bitbucket Pipelines file that FTP-deploys `master` and `development`.
- Generated cash-flow PDFs under `Cash Flow Report/` for eight company folders.
- Many `*Copy*` duplicates of pages and classes, committed beside the files the pages include.

Out of the committed tree, though named by code or docs:

- `system.php` and `_system.php` (`.gitignore`). `index.php` and the Nemo bootstrap include one of those. They are not in git.
- `SESSION/` (`.gitignore`).
- A live MySQL schema dump. No `CREATE TABLE` script was found. Table names below are taken from SQL strings.
- `/db/backup.sql` and `application/config/database.php`, which `README.md` tells a developer to use. Neither path is in git.
- AWS CodeDeploy files (`appspec.yml`, deployment scripts). The README describes them. The pipeline file does not.
- Application unit tests. PHPUnit files exist only inside `vendor/mpdf` and other third-party packages.

`client.type.php` is named as a URL in `Cron.daily.1.Lookups.php`. No `client.type.php` is committed. The client page that is committed is `client.php`.

## Architecture (summary)

Browser pages are PHP scripts. Each script builds a Nemo page object and prints HTML. There is no router and no framework front controller beyond `index.php`, which sends a signed-in session to `home.php` and everyone else to `login.php`.

MySQL is the online store, accessed with the old `mysql_*` extension through `NemoDatabase`. SQL Server is the Foreman system. Nightly crons copy SQL Server rows into MySQL staging tables. Accepting a job suggestion writes back with `SyncRecord::Save()`, which runs the built SQL through `Sync::doQuery()`.

Menus and rights come from MySQL tables `sysMenuLevel1`, `sysMenuLevel2`, `sysSecurity`, and `sysSecurityGroup`. Company context is `$_SESSION["ONLINE"]->OWCOMPANYID`, set at login from `sysUser.refCompanyID`.

Host connection settings in git live in `system.HTTP.php` and `system.HTTPS.php`. No PHP file in the tree includes those names. The files the bootstrap does include are gitignored. See technical documentation.

## Milestones visible in the repository

| When | What the history shows |
|---|---|
| 2019-07-26 | Empty initial commit |
| 2019-07-30 | README and the first pipeline file. README describes AWS CodeDeploy and FTP, a vhost `local.indawo`, and a database dump path that this tree does not contain |
| 2019-07-31 | Application upload |
| 2019-08-06 | Commit subject "Upgrade project to PHP7". Database layer still calls `mysql_*` |
| 2019-08-07 | Pipeline edited on Bitbucket. Current `bitbucket-pipelines.yml` matches the FTP shape described under technical documentation |
| 2019-09-20 | `development` tip: PDF generation fix. Not on `master` |
| 2020-06-03 | `master` tip: PHPExcel and mpdf update, including committed `vendor/` for mPDF 8 |
| 2020-06-17 | `Jacques` tip: "PHP 7.2 upgrade changes". Not merged to `master` |

Comments inside pages cite work from 2013 through 2018 (password policy 2016, order cancel 2017, cash-flow VAT 2018). That work arrived in the 2019-07-31 upload. It is not a separate commit series.

## Current status

- Last `master` commit is 2020-06-03. Nothing on `master` or `dev` is newer. `Jacques` is newer and unmerged.
- The README and the pipeline disagree. The README says master is live, development is QA, and AWS CodeDeploy is part of getting started. The pipeline FTP-inits live credentials on `master` and FTP-pushes QA on the branch named `development`. There is no CodeDeploy step in the YAML. `origin/dev` is the same commit as `master`, and the pipeline key is `development`, not `dev`.
- `index.php` comment (2019-08-01) says localhost includes `_system.php` because a file named `system.php` was refused locally. Both names are gitignored, so the running configuration is not in this clone.
- Later Silicon Ark sets for `indawo_65` and `indawo_84` describe MFA, password expiry, user deactivation, and a realtime sync queue. None of those symbols were found as features of this `master`. This tree uses a shared login PIN, `sysPassword` policy settings, and nightly sync plus per-record `SyncRecord` on suggestion accept.
- Whether this repository is still the production line is **Unknown / Requires Confirmation**.

## Known dependencies

- PHP with the `mysql` extension (`mysql_connect` in the committed host files, `mysql_query` in `_nemo.database.cls.php`). That extension is not part of PHP 7. The PHP 7 commit and the unmerged PHP 7.2 branch do not change that fact on `master`.
- MySQL database `indawo_online` or `sil27_indawo_online`, selected by host name.
- Microsoft SQL Server via FreeTDS. Connection strings are in the committed host files. Secret values are not copied into Silicon Ark.
- mPDF, twice: legacy `mpdf/mpdf.php` (what `project.functions.inc.php` includes) and Composer `mpdf/mpdf` v8.0.4 under `vendor/` (no application `require` of `vendor/autoload.php` was found).
- A second legacy tree `mpdf_PHP5.6_version/`.
- PHPExcel under `PHPExcel/`.
- html2pdf, Highcharts (including a Java export server under `plugins/Highcharts/exporting-server/`), and other files under `plugins/` and `rf/`.
- SMTP settings from `sysSettings` (`SMTP Send As`, `SMTP BCC`), used by email and crons. The server host is not hardcoded in the files read.
- Bitbucket pipeline variables `FTP_USERNAME_LIVE`, `FTP_PASSWORD_LIVE`, `FTP_HOST_LIVE`, and the matching `*_QA` names. Values are not in git.

## Implementation plan (as evidenced, not proposed)

No roadmap, issue tracker, or TODO file in this repository states future work. The unmerged `Jacques` branch is the only later change on the remote. What should happen to it is **Unknown / Requires Confirmation**.
