# Project plan — quantivia-svn

Evidence date: 2026-10-05.

Source repository: `git@bitbucket.org:overdrive/quantivia-svn.git`.

Inspected revision: `master` at `ca64fae` (2019-06-12, message: "svn update"). The scan-host path `~/projects/sonar_scan/repos/quantivia-svn` was not on this machine. The tree was read from that git revision after a clone that required `core.longpaths=true` on Windows (long paths 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: none. Source product documentation that was incorporated: app headers / `setup.inc.php` descriptions, Quantivia template `user_guide.php` files (client branding guides), and eGroupware platform docs under `doc/` and `phpgwapi/doc/`. No root product README exists.

## Product

The repository is a **full eGroupware 1.8.x PHP groupware tree** plus a commercial Procon8 application named **Quantivia**, described in `quantivia/setup/setup.inc.php` as:

> Deliverable Progress and Performance Reporting tool

Quantivia is eGroupware-friendly: it uses eGroupware sessions and accounts, but stores project/deliverable data in a separate Quantivia database and presents a SmartAdmin UI shell (`quantivia/main.php`) rather than classic eGroupware eTemplates for its main UX.

The same tree also ships many standard eGroupware apps (calendar, addressbook, FelamiMail, filemanager, projectmanager, tracker, wiki, …) and several ATE / Overdrive custom apps (NCR, permit, risk, SMT, WOMT, actions).

Provenance: **Documented** (setup descriptions, package headers) and **Implemented**.

## Branch reality

| Line | Tip | Date | What it is |
|---|---|---|---|
| `master` (default; `origin/HEAD`) | `ca64fae` | 2019-06-12 | Only remote branch observed |

A clone of `master` showed a **single commit** titled "svn update". Full prior SVN history is not present in this Git import. Inline `$Id` tags and copyright years in Quantivia files run from about 2012–2017 (Jean Thirion / Procon8); eGroupware API files carry SourceForge-era `$Id` tags through ~2012.

**Discrepancy with the 2026-09-28 onboarding scan:** last commit metadata matches. The scan listed a truncated root; the git tree also contains large vendor/theme trees (`quantivia/smartadmin/`, `quantivia/jpgraph/`, `quantivia/quantiviasqladmin/`, `phalanger/`, `projectmanager/` cache artefacts).

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

- Capture and report **deliverable progress and performance** (earned-value style metrics: SPI/CPI/EAC, RAMP/STEP reporting) for engineering/construction programmes.
- Structure work with **PBS / WBS / LBS / OBS** dimensions, deliverables, control-point chains, resources, and commitments.
- Brand and scope access per **client programme** via `templates_*` folders tied to eGroupware groups.
- Enforce **MAC + domain license** limits on project count and feature tiers.
- Run heavy import/publish work asynchronously via **offload_tasks** workers.
- Optionally use the surrounding eGroupware suite for mail, calendar, address book, and ATE trackers (NCR, risk, permits, shipments, works orders).

## Scope

### In scope of `master`

1. eGroupware API and core apps (`phpgwapi` 1.8.004 and dependent apps).
2. Quantivia application under `quantivia/` (version strings: setup `1.3.000`, settings `2.0.000`, `bo_version` 276).
3. Quantivia Framework Daemon / license installer under `QFD/`.
4. Client template packs under `quantivia/templates_*`.
5. Custom ATE apps: `ncr`, `permit`, `risk`, `smt`, `womt`, `actions`.
6. Supporting entry points: `login.php`, `loginextra.php` (TOTP), `auto_login.php` (demo), GroupDAV/WebDAV, JSON/SOAP/XML-RPC transports.
7. Background workers: `quantivia/inc/worker.php`, `TaskMaster.php`, Windows `.bat` / `.vbs` loops under Quantivia and QFD.

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

- A modern SPA or separate API microservice for Quantivia (UI is server-rendered SmartAdmin + AJAX form endpoints).
- Continuous deployment config for Quantivia itself (no Dockerfile / Bitbucket Pipelines file found at repository root).
- Complete Git history of the pre-import SVN line.

## System architecture

```text
Browser
  │
  ├─ login.php / loginextra.php / auto_login.php
  │     └─ eGroupware session (cookie sessionid)
  │
  ├─ index.php  (eGroupware menuaction router)
  │     └─ standard EGW apps (calendar, mail, admin, …)
  │
  ├─ quantivia/main.php  (SmartAdmin shell)
  │     ├─ forms/*.php          AJAX UI endpoints
  │     ├─ services/*.php       JSON feeds / charts
  │     ├─ dashboard/*.php      widgets
  │     └─ templates_*          client branding
  │
  ├─ QFD/                       license / worker bootstrap
  │
  └─ groupdav.php / webdav.php / soap.php / xmlrpc.php / json.php

Data:
  eGroupware MySQL  (accounts, ACL, config, EGW apps)
  Quantivia DB      (projects, p_{id}_* tables; PDO mysql/sqlite/…)
```

## Major components

| Component | Path | Role |
|---|---|---|
| eGroupware API | `phpgwapi/` | Auth, accounts, ACL, VFS, sessions, GroupDAV |
| Quantivia BO/SO | `quantivia/inc/class.quantivia_bo.inc.php`, `class.quantivia_so.inc.php` | Domain logic and PDO data access |
| Quantivia UI | `quantivia/main.php`, `forms/`, `smartadmin/` | Primary product UX |
| Settings | `quantivia/setup/quantivia_setings.php` (+ host variants) | Dual-DB connection and runtime knobs |
| Licensing | `common_functions.inc.php`, `QFD/`, `license.lic` pattern | MAC/domain license gate |
| Workers | `inc/worker.php`, `TaskMaster.php`, QFD VBS | Async import / publish / maintenance |
| Client templates | `quantivia/templates_*` | Per-programme branding and guides |
| ATE trackers | `ncr/`, `permit/`, `risk/`, `smt/`, `womt/`, `actions/` | Adjacent groupware apps in the same install |

## Dependencies (known from tree)

- PHP with PDO; MySQL is the configured default (`PDO_type` = `mysql`). SQLite / MSSQL / Oracle / Sybase are named as options in settings comments.
- eGroupware 1.8-compatible stack (`phpgwapi` 1.8.004).
- Bundled libraries: JPGraph, PHPExcel, PHPMailer (via notifier), SmartAdmin theme assets, phpMyAdmin-style and phpLiteAdmin admin UIs, HTMLPurifier/ADOdb inside `phpgwapi`.
- Optional IMAP extension (declared for `risk` install checks).
- Windows-oriented worker scripts (`.bat`, `.vbs`) alongside PHP workers.

## Milestones / project status

| Observation | Provenance |
|---|---|
| Product copyright and bo class dated through 2016–2017 | **Implemented** file headers |
| Git tip frozen at 2019-06-12 single "svn update" commit | **Implemented** git history |
| Setup registers Quantivia `1.3.000`; runtime settings declare `2.0.000` | **Implemented** — version strings **conflict**; which is authoritative is **Unknown / Requires Confirmation** |
| Multiple client templates present (Aurecon, Bechtel, Bombardier, Parsons, Sungard, …) | **Implemented** |
| Active production use vs archive-only | **Unknown / Requires Confirmation** |

## Known risks for documentation consumers

1. Committed configuration files contain database and related secrets — treat the repo as sensitive; do not copy values into other systems without rotation.
2. `auto_login.php` implements a demo auto-login path that sets password equal to username for idle `webdemo*` accounts.
3. Long Windows paths under `projectmanager/` can break naive checkouts without `core.longpaths`.

## Open questions for humans

1. Is this repository still the production source for any Quantivia deployment, or an archive of the 2019 SVN import?
2. Which settings file variant (`quantivia_setings.php` vs `*_CENTOS.php` vs `dppr_setings-*`) is authoritative per environment?
3. Should the ATE tracker apps (NCR, SMT, WOMT, …) be documented as part of the Quantivia product or as separate Silicon Ark projects?
4. Clarify the Quantivia version line (1.3.000 vs 2.0.000 vs `bo_version` 276).
