# Project plan — quantivia

Evidence date: 2026-10-05.

Source repository: `git@bitbucket.org:overdrive/quantivia.git` (read via `https://bitbucket.org/overdrive/quantivia.git`).

Inspected revision: `master` at `c567977` (2019-05-21 16:51:01 +0200, author Jaco Brits, message **"#87 Lines to all dashboard tables"**). `HEAD` on the remote matches that commit. The scan-host path `~/projects/sonar_scan/repos/quantivia` was not on this machine. The tree was read from that git revision. A Windows checkout needed long-path support because of a cache image under `projectmanager/$SERVER_TEMP/jpgraph_cache/`. Credential values that appear in source are omitted.

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

Prior Silicon Ark set for this directory: none. Related sets exist for other repositories and were not used as a source of requirements:

- `silicon_ark/quantivia-clean/` — demo-site backup (`quantivia-clean`, tip `808df0f`, 2019-06-12)
- `silicon_ark/quantiviaLive/` — live/online-oriented tree (`quantivialive`, tip `0af11d2`, 2019-08-15)
- `silicon_ark/quantivia-svn/` — SVN-import tree (`quantivia-svn`, tip `ca64fae`, 2019-06-12)

Source product documentation incorporated: class headers on `quantivia/inc/class.quantivia_bo.inc.php` and `class.quantivia_so.inc.php`, the in-code changelog in `quantivia/inc/common_functions.inc.php`, the user guide at `quantivia/templates_procon8_01/user_guide.php`, eGroupWare app `setup/setup.inc.php` descriptions, and deployment files at the repository root. There is no product README at the repository root.

## Product

The repository is a **full eGroupWare 1.8.x PHP groupware tree** plus a commercial Procon8 application named **Quantivia**.

**Documented** in `quantivia/inc/class.quantivia_bo.inc.php`:

> quantivia - Deliverable Progress and Performance Reporting tool (eGroupware Friendly)

Author Jean Thirion / PROCON8. Copyright 2017 on that class header. License URL in the header: `http://www.procon8.com/licenses/quantivia-license.php`.

**Implemented.** Quantivia uses eGroupWare session cookies, stores project data through its own PDO connection, and presents a SmartAdmin shell at `quantivia/main.php`. `quantivia/index.php` states that the module is intended to run inside the eGroupWare folder tree but not as a registered eGroupWare application. No `quantivia/setup/setup.inc.php` is present.

The user guide (**Documented**) describes the purpose as a structured database for project progress and performance monitoring and reporting.

The same tree ships standard eGroupWare apps (calendar, addressbook, FelamiMail, filemanager, projectmanager, tracker, wiki, and others) and several ATE/custom trackers (`actions`, `ncr`, `permit`, `risk`, `smt`, `womt`) plus a Flash organogram.

## Branch reality

| Line | Tip | Date | What it is |
|---|---|---|---|
| `master` (remote `HEAD`) | `c567977` | 2019-05-21 | Nine commits, from `c94ffc68` "P8 First commit" (2019-05-09) through dashboard table styling and Bitbucket Pipelines experiments |
| `development` | `ba5f6c5` | 2019-08-07 | "Update from latest for version 2". Not checked out. Contents beyond the commit message were not read |

This documentation set is based on **`master` at `c567977`**. `development` is later than `master`. Whether either branch is still deployed is **Unknown / Requires Confirmation**.

Git history on `master` does not contain the pre-2019 product history. That history is only in the commented changelog block and the active `2.0.000`–`2.0.013` keys inside `common_functions.inc.php`.

**Discrepancy with the 2026-09-28 onboarding scan:** last-commit metadata matches (`c567977`, 2019-05-21, "#87 Lines to all dashboard tables"). The scan's truncated root matches this tree, including `appspec.yml`, `bitbucket-pipelines.yml`, `bitbucket-pipelinesOld.yml`, and the CodeDeploy Python scripts.

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

- Capture and report **deliverable progress and performance** (earned-value style metrics, RAMP and STEP reporting) for engineering or construction programmes.
- Structure work with deliverables, control-point chains, budgets, resources, and progress-update workflows.
- Brand the UI per client programme via `quantivia/templates_*` folders (17 packs in this tree).
- Gate features with a license file (MAC, domain, project count, quantity and extended-feature flags), with an explicit hostname exception list.
- Run import, download, and publish work through `quantivia/inc/worker.php`, offload, and the QFD Windows scripts.
- Optionally use the surrounding eGroupWare suite for mail, calendar, address book, and custom trackers.

## Scope

### In scope of `master`

1. eGroupWare API and core apps (`phpgwapi` version `1.8.004` from `phpgwapi/setup/setup.inc.php`).
2. Quantivia under `quantivia/`. After `common_functions.inc.php` loads, the version string is changelog tip `2.0.013` with `so_version` 216 and `bo_version` 276. The settings file also assigns `'version' => '1.2.000'` before that overwrite.
3. Client template packs under `quantivia/templates_*`.
4. Quantivia Framework Daemon scripts under `QFD/` (`union.bat`, `worker.vbs`).
5. Custom trackers: `actions`, `ncr`, `permit`, `risk`, `smt`, `womt`, plus `organogram/`.
6. Entry points: `login.php`, `loginextra.php`, `index.php`, GroupDAV/WebDAV, JSON/SOAP/XML-RPC, and `quantivia/main.php`.
7. Deployment definitions: `appspec.yml`, `scripts/install_dependencies`, `scripts/start_server`, `scripts/stop_server`, `codedeploy_deploy.py`, `codedeploy_deploy_develop.py`, and two pipeline files.
8. Background worker: `quantivia/inc/worker.php` (present; operational schedule **Unknown / Requires Confirmation**).

### Out of scope of this repository (as observed)

- A separate SPA or microservice for Quantivia. The UI is server-rendered SmartAdmin plus PHP form and JSON endpoints.
- A Quantivia eGroupWare setup registration file (`quantivia/setup/setup.inc.php` is absent).
- `auto_login.php` (present in the related `quantivia-clean` tree; **absent** here).
- `composer.json` and `phpunit.xml` (referenced by the active pipeline file; **absent** here).
- Database dumps or seed data for `demo` / `demoppr` (not in git).
- A Quantivia automated test suite (none found).

### Unrelated / orphaned content

- `custom/` contains an Untangle Captive Portal sample (`custom/README`). It is not Quantivia or eGroupWare product code. Whether those files were ever deployed with this site is **Unknown / Requires Confirmation**.

## System architecture

```text
Browser
  │
  ├─ login.php / loginextra.php
  │     └─ eGroupWare session (cookies sessionid, last_loginid)
  │
  ├─ index.php  (eGroupWare front controller)
  │     └─ standard EGW apps and custom trackers
  │
  ├─ quantivia/index.php → quantivia/main.php  (SmartAdmin shell)
  │     ├─ forms/*.php                 UI endpoints
  │     ├─ dashboard/*.php             dashboard widgets
  │     ├─ services/*.php              menu, filters, chart JSON
  │     ├─ view/                       DataTables editor views
  │     └─ templates_*/                per-client branding and user guide
  │
  ├─ quantivia/inc/worker.php          offloaded import / publish / download
  ├─ quantivia/inc/ofload.php          offload target named in settings
  └─ QFD/worker.vbs                    Windows loop calling worker.php

Data
  ├─ eGroupWare MySQL database `demo` (accounts, groups, sessions metadata)
  └─ Quantivia MySQL database `demoppr` (projects, deliverables, reports)

Deploy definitions (do not all agree — see discrepancies)
  ├─ appspec.yml → Linux /var/www/html, httpd hooks
  ├─ bitbucket-pipelines.yml → PHP 5.4 image, composer, phpunit
  ├─ bitbucket-pipelinesOld.yml → zip + AWS CodeDeploy
  └─ quantivia_setings.php → Windows WAMP paths and localhost MySQL
```

## Major components

| Component | Role | Evidence |
|---|---|---|
| eGroupWare 1.8.004 | Accounts, groups, sessions, standard apps | `phpgwapi/setup/setup.inc.php`, `login.php` |
| Quantivia BO/SO | Deliverable progress, budgets, publish, roles | `quantivia/inc/class.quantivia_*.inc.php` |
| SmartAdmin shell | Authenticated Quantivia UI | `quantivia/main.php` |
| Menu service | Role- and status-gated navigation | `quantivia/services/Menu.php` |
| Worker | Task types 0–15 for import, publish, download | `quantivia/inc/worker.php` |
| Notifier | SMTP mail via PHPMailer | `quantivia/inc/class.quantivia_notifier.inc.php` |
| License check | MAC, domain, hostname exceptions | `quantivia/inc/common_functions.inc.php` |
| Template packs | Client branding and user guide | `quantivia/templates_*` |
| Custom trackers | NCR, risk, permit, shipment, works order, actions | each app's `setup/setup.inc.php` |
| CodeDeploy hooks | Install and start Apache httpd | `appspec.yml`, `scripts/*` |

## Milestones visible in this repository

There is no written project plan in git. Observable milestones:

| When | Evidence | What it records |
|---|---|---|
| 2013–2017 class headers | `$Id` tags | Procon8 development of Quantivia against eGroupWare |
| Commented changelog through `1.5.000` | `common_functions.inc.php` block comment | Historical notes, including "Introduced the Licensing module" at `1.5.000`. Not active version keys |
| Active changelog `2.0.000`–`2.0.013` | same file, live array | Version 2.0 baseline through wider date selection on online status sheets |
| 2019-05-09 | `c94ffc68` "P8 First commit" | Git import of this tree |
| 2019-05-12 | pipeline commits | Bitbucket Pipelines and server-deploy experiments |
| 2019-05-13 to 2019-05-21 | `#87` commits | Dashboard table styling; tip is "Lines to all dashboard tables" |
| 2019-08-07 | `development` `ba5f6c5` | "Update from latest for version 2" — not inspected |

## Implementation plan

No forward implementation plan is in the repository. Current status is a **frozen 2019 snapshot**. Later work, if any, is **Unknown / Requires Confirmation**. The `development` branch is newer than `master` and was not reviewed line by line.

## Known dependencies

- PHP (pipeline image `php:5.4.45`; a commented changelog line claims PHP 7 compatibility). Supported runtime version: **Unknown / Requires Confirmation**.
- MySQL (`db_type` `mysql`, port `3306`) for both eGroupWare (`demo`) and Quantivia (`demoppr`).
- eGroupWare session cookies.
- Apache httpd, in the CodeDeploy hooks (`yum install httpd`). IIS is also implied by root `web.config`.
- PHPMailer for notification email.
- jpGraph, SmartAdmin, DataTables Editor, PHPExcel, and TCPDF shipped under `quantivia/`.
- Optional: AWS CodeDeploy and S3, via the Python deploy scripts (environment variables, not hard-coded names).
- Optional: Primavera P6 `.xer`, zip, and XML import (`quantivia/forms/p6import.php`).

## Current project status

**Implemented** as of `master` `c567977` (2019-05-21). No commits after that date on `master`. `development` moved again on 2019-08-07. Whether any host still runs this tree is **Unknown / Requires Confirmation**.

Committed runtime config points at localhost MySQL databases `demo` and `demoppr`, Windows file paths under `C:\wamp64\www\html`, and an offload URL of `https://online.quantivia.com/quantivia/inc/ofload.php`. The CodeDeploy spec targets Linux `/var/www/html`. Those two deployment pictures disagree. See technical documentation.

## Human confirmation

- Which branch, if either, is the production baseline (`master` vs `development`).
- Which host this tree is meant to serve (WAMP demo, `quantivia.local.com`, `online.quantivia.com`, or a CodeDeploy Linux host).
- Whether the active `bitbucket-pipelines.yml` (PHPUnit sample) replaced the CodeDeploy pipeline on purpose.
- Whether empty database passwords and the committed setup-admin hash in `header.inc.php` are historical demo values or a live risk.
- Whether `development` at `ba5f6c5` should be documented as a separate baseline.
