# Project plan — quantivia-clean

Evidence date: 2026-10-05.

Source repository: `git@bitbucket.org:overdrive/quantivia-clean.git` (checked out as `https://jacooverdrive@bitbucket.org/overdrive/quantivia-clean.git`).

Inspected revision: `master` at `808df0f` (2019-06-12 12:48:41 +0200, author Jaco Brits, message **"Demo site backup"**). `origin/HEAD` → `master`. The scan-host path `~/projects/sonar_scan/repos/quantivia-clean` was not on this machine; the tree was read from that git revision. Credential values that appear in source are omitted from this documentation.

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

Prior Silicon Ark sets for related Quantivia trees:

- `silicon_ark/quantiviaLive/` — live/online-oriented tree (`online.quantivia.com` / RDS config)
- `silicon_ark/quantivia-svn/` — SVN-import tree

Those sets were used only for format consistency. Requirements below come from **this** repository.

Source product documentation incorporated: Quantivia class headers, `quantivia/templates_*/user_guide.php`, eGroupWare `setup` / `phpgwapi` docs under `doc/`, and runtime config files. Root `README.md` contains only the title `# quantivia-clean`.

## 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 sessions and accounts, stores project data through its own PDO connection, and presents a SmartAdmin shell at `quantivia/main.php`. Runtime configuration in this tree points the install at Windows IIS path `C:\inetpub\wwwroot\demo.quantivia.com`, eGroupWare database `demo`, and Quantivia database `demodppr`.

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

Provenance of the demo identity: **Implemented** (`header.inc.php` `EGW_SERVER_ROOT`, commit message "Demo site backup", demo-oriented `auto_login.php`).

## Branch reality

| Line | Tip | Date | What it is |
|---|---|---|---|
| `master` (default; `origin/HEAD`) | `808df0f` | 2019-06-12 | "Demo site backup". Two commits total from `9c8b8f2` ("Initial commit") |
| `origin/development` | `0a43174` | 2019-06-12 | Three commits ahead of `master`. Subjects: "All changes to QA for alastiar, Master is main site"; "Working qa on development"; "update from qa" |

This documentation set is based on **`master` at `808df0f`**. Behaviour that exists only on `development` was not fully read. Commit subjects imply `master` was treated as the main/demo site and `development` as a QA line. Whether either branch is still deployed is **Unknown / Requires Confirmation**.

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

- Capture and report **deliverable progress and performance** (earned-value style metrics, RAMP/STEP reporting) for engineering or construction programmes.
- Structure work with deliverables, control-point chains, budgets, and progress-update workflows.
- Brand the UI per client programme via `quantivia/templates_*` folders (18 packs in this tree).
- Gate some features when the session is not fully licensed (`requireFullLicence()` / `$_SESSION['licensed']`).
- Provide a **demo-friendly login path** (`auto_login.php` with `?demo` behaviour).
- 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/` (settings version `1.2.000`, `bo_version` 276).
3. Client template packs under `quantivia/templates_*`.
4. Custom trackers: `actions`, `ncr`, `permit`, `risk`, `smt`, `womt`, plus `organogram/`.
5. Entry points: `login.php`, `auto_login.php`, `index.php`, GroupDAV/WebDAV, JSON/SOAP/XML-RPC, and `quantivia/main.php`.
6. Background/worker script: `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/AJAX endpoints.
- A Quantivia eGroupWare setup registration file (`quantivia/setup/setup.inc.php` is absent).
- A `QFD/` Quantivia Framework Daemon tree (present in related Quantivia repos; **absent** here).
- Docker / nginx deploy definitions (none found). Apache RPM packaging references exist under `doc/rpm-build/`.
- Database dumps or seed data for `demo` / `demodppr` (not in git).
- Automated product tests for Quantivia (none found).

### Unrelated / orphaned content

- `custom/` contains Untangle Captive Portal sample pages — **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 / auto_login.php (?demo demo path)
  │     └─ eGroupWare session (cookies sessionid, last_loginid)
  │
  ├─ index.php  (eGroupWare front controller)
  │     └─ standard EGW apps and custom trackers
  │
  ├─ quantivia/main.php  (SmartAdmin shell)
  │     ├─ forms/*.php, dashboard/, view/
  │     ├─ services/*.php  (Menu, graphs, tables, qvaapi, …)
  │     ├─ inc/class.quantivia_bo.inc.php  (business logic)
  │     └─ inc/class.quantivia_so.inc.php  (data access)
  │
  ├─ groupdav.php / webdav.php
  │
  MySQL localhost
     ├─ demo          (eGroupWare identity, ACL, apps)
     └─ demodppr      (Quantivia projects / deliverables / EV)
```

Provenance: **Implemented** from entry points and config files.

## Major components

| Component | Role | Evidence |
|---|---|---|
| eGroupWare 1.8 core | Auth, accounts, groups, ACL, app shell | `phpgwapi/`, `header.inc.php`, `login.php` |
| Quantivia app | Deliverable progress / performance reporting | `quantivia/` |
| FelamiMail + emailadmin | IMAP mail client / mail admin | `felamimail/`, `emailadmin/` |
| Calendar, addressbook, filemanager | Groupware | respective app directories |
| ATE trackers | Risk, NCR, permit, WOMT, SMT, actions | `risk/`, `ncr/`, `permit/`, `womt/`, `smt/`, `actions/` |
| Risk → Quantivia bridge | Risk BO includes Quantivia settings/BO | `risk/inc/class.risk_bo.inc.php` |
| Embedded DB admins | phpMyAdmin-style tools under Quantivia | `quantivia/quantiviasqladmin/`, `quantiviasqliteadmin/` |

## Dependencies

| Dependency | Evidence |
|---|---|
| PHP ≥ 5.2 (recommended 5.3+) | **Documented** — `setup/inc/class.setup.inc.php` |
| MySQL (demo config) | **Implemented** — `header.inc.php`, `quantivia/setup/quantivia_setings.php` |
| PDO drivers (mysql, optionally mssql/oracle/sybase/sqlite) | **Implemented** — `PDO_type` comment in settings |
| IIS on Windows (this backup) | **Implemented** — `EGW_SERVER_ROOT` path |
| Apache (Linux RPM packaging only) | **Documented** — `doc/rpm-build/apache.conf` |
| Client libraries in-tree | SmartAdmin, jQuery, Highcharts/JPGraph, PHPExcel, TCPDF — under `quantivia/` |

## Milestones / implementation plan

No formal milestone plan exists in the repository.

**Inferred** from git history only:

1. Application lineage developed outside this Git history (inline `$Id` / copyright years ~2010–2017).
2. 2019-06-12 — Git import ("Initial commit") then demo site backup on `master`.
3. Same day — QA commits on `development` describing `master` as main site.

## Current project status

| Aspect | Status | Provenance |
|---|---|---|
| Product in this tree | Demo/backup snapshot of Quantivia on eGroupWare 1.8 | Implemented + commit message |
| Active development in this repo | No commits after 2019-06-12 | Implemented (git history) |
| Live deployment of this exact tree | Unknown | Requires Confirmation |
| Relationship to `quantiviaLive` / `quantivia-svn` | Sibling product trees; not identical configs | Inferred from Silicon Ark sibling docs + this tree's demo paths |

## Known open questions

See `prd.md` and `technical-documentation.md` for the full list. Highest-impact items:

1. Is `master` or `development` (or neither) still a deployed demo?
2. Which eGroupWare apps were enabled at runtime (DB-driven; not in git)?
3. How is `$_SESSION['licensed']` set in this demo environment?
4. Are committed demo credentials still valid anywhere (security review)?
