# Project plan — clientSalesTracking

Evidence date: 2026-10-18.

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

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

## Product

**clientSalesTracking** is a small local web prototype that lists client contact rows and lets someone edit a subset of those fields. The browser app is a Create React App project. It calls PHP scripts that read and update a MySQL table named `tblClient` in a database named `unity`.

Provenance: **Inferred** from the screens and scripts. The repository has no README, no product brief, and no comment that states a purpose. The only product name in Git is the repository name. `package.json` names the npm package `unity`, version `0.1.0`. The HTML title is still the Create React App default, "React App".

Nothing in the tree implements a sales pipeline, opportunities, quotes, or activity tracking. Whether "sales tracking" was the intended product is **Unknown / Requires Confirmation**.

Both commits are by Uriel Balela (`uriel@overdrive.co.za`) on the morning of 2020-06-24. There is no later history.

## Branch reality

Default branch is `master`. `origin/HEAD` points at `master`. No other local or remote branch exists.

| Line | Tip | Date | What it is |
|---|---|---|---|
| `master` | `5d5d307` | 2020-06-24 09:54 +0200 | "react components". Adds the Create React App tree on top of the PHP scripts |
| parent | `422690e` | 2020-06-24 07:23 +0200 | "Client profile". Adds the seven PHP scripts only |

This documentation set is based on `master` at `5d5d307`.

The task-creation scan (2026-09-28) listed `sonar-project.properties` and `sonarqube_scan.bat` at the repository root. Neither file is in `master`. Provenance: **Unknown** — they may have been untracked files on the scan host.

## Scope in the repository

In scope of what is implemented on `master`:

- A React 16 list of clients (`/ClientDetails`) with client-side pagination and an Edit action.
- A React profile form (`/edit/:id`) that loads one client and posts an update.
- PHP JSON endpoints: list clients, get one client, update selected client fields, and list rows from `sysuser`.
- Two MySQL connection scripts aimed at database `unity` on `localhost`.

Out of scope of the code that was found:

- Creating or deleting a client.
- Editing payment type, client job, last-edit timestamp, or any field on `sysuser`.
- Login, roles, or session handling.
- A sales workflow (stages, deals, owners, forecasts).
- Deployment, CI, Docker, queues, or background jobs.
- A database schema or seed file. The table shapes are only visible through the columns the PHP scripts read.

## System architecture

```text
Browser (Create React App, react-scripts 3.4.1)
  → http://localhost/unity_/contactDetails.php   list tblClient
  → http://localhost/unity_/getClient.php?id=    one tblClient row
  → http://localhost/unity_/update.php           update selected columns
  → userDetails.php                              list sysuser (no UI caller)

PHP (repo root) → MySQL database "unity" on localhost
                    tblClient
                    sysuser
```

The React source hardcodes the `http://localhost/unity_/` prefix. The PHP files sit at the repository root, not inside a `unity_` directory. How a local web server maps that URL onto these files is **Unknown / Requires Confirmation**.

## Major components

| Component | Path | Role |
|---|---|---|
| App shell and routes | `src/App.js` | Navbar link "View", routes `/ClientDetails` and `/edit/:id` |
| Client list | `src/components/ListView.js` | Table of clients, Edit button |
| Client profile | `src/components/Card.js` | Load and submit account details. Exported as `Profile` |
| List clients | `contactDetails.php` | `SELECT * FROM tblClient`, JSON array of selected columns |
| Get client | `getClient.php` | One row by `ClientID` |
| Update client | `update.php` | `UPDATE tblClient` for name, email, address, telephone, fax |
| List users | `userDetails.php` | `SELECT * FROM sysuser`. Not called by the React app |
| CORS and JSON headers | `header.php` | `Access-Control-Allow-Origin: *` |
| DB connections | `dbconnect.php`, `dbconnect2.php` | Same database, procedural mysqli vs object mysqli |

## History

| When | Evidence |
|---|---|
| 2020-06-24 07:23 | `422690e` — PHP client profile endpoints (173 lines) |
| 2020-06-24 09:54 | `5d5d307` — React UI, `package.json`, Create React App public files |

No commits after that morning. No tags. No pull-request history was inspected beyond the two commits on `master`.

## Implementation plan

There is no written plan, milestone list, or README install sequence in the repository.

What the code itself implies for a local run (provenance **Inferred**):

1. A MySQL server on `localhost` with a database named `unity`, tables `tblClient` and `sysuser`, and the columns the PHP scripts read. No `CREATE TABLE` is in the repo, so the schema has to already exist.
2. PHP scripts reachable at `http://localhost/unity_/` (the URL the React code calls).
3. From the repo root, `npm install` and `npm start` (`react-scripts start`). The repo does not set `PORT`.

There is no plan in the tree for work after 2020-06-24.

## Known dependencies

- PHP with mysqli. The required PHP version is **Unknown / Requires Confirmation**. There is no `composer.json`.
- MySQL (or a compatible server) with database `unity`. The server version is **Unknown**.
- Node and npm for the React app. `package.json` has no `engines` field and there is no `.nvmrc`. The lockfile is `package-lock.json` (npm).
- Runtime libraries declared and used by `src/`: React 16.13.1, React DOM 16.13.1, react-scripts 3.4.1, react-router-dom 5.2.0, axios 0.19.2, bootstrap 4.5.0, react-bootstrap 1.0.1, react-bootstrap-table-next 4.0.3, react-bootstrap-table2-paginator 2.1.2.
- Declared in `package.json` and not imported by `src/`: jquery 3.5.1, datatables.net 1.10.21, react-bootstrap-table 4.3.1. Provenance: **Inferred** unused.

## Current project status

`master` has had no commit since 2020-06-24. The repository reads as a same-day prototype: PHP endpoints in the morning, a React list and edit form about two and a half hours later. It is not an active codebase.

Silicon Ark had no `clientSalesTracking/` directory before this onboarding.

A similarly named Silicon Ark directory, `unity-salestracker`, documents an empty Bitbucket repository. Nothing in this tree refers to that repository. Any relationship is **Unknown / Requires Confirmation**.

## Human confirmation

- Whether the intended product was sales tracking, or only this client contact list and edit form.
- Whether database `unity` is shared with another Overdrive application, and whether any environment other than a developer laptop was used.
- How `http://localhost/unity_/` is mapped to the PHP files at the repo root, and whether any host other than localhost was ever used.
- Whether `dtLastEdit` and `refPaymentType` are maintained outside this application (database trigger, another system).
- Whether `userDetails.php` was meant to have a screen.
- Whether `sonar-project.properties` and `sonarqube_scan.bat` from the 2026-09-28 scan should be treated as part of the project. They are not in Git.
- Whether the prototype is abandoned.
