# Project plan — scoringApp

Evidence date: 2026-10-04. Source: `git@bitbucket.org:overdrive/scoringapp.git`, `master` at `04b1a38` (2022-12-22, "Deploy V1.0.3 BEta").

Provenance labels: **Documented**, **Implemented**, **Inferred**, **Planned**, **Unknown**.

No project plan, README, or product specification was in the repository or in `silicon_ark/scoringApp/` before this file. The statements below are taken from the tree at that commit. They are not a decision about what the product should become.

## Objectives

**Implemented product name:** the window title and the installer product name are **Sideline Manager**. The Visual Studio assembly title remains `Live_Scoring_V1`. The Bitbucket slug is `scoringapp`.

**Inferred objective:** a Windows desktop application that lets a logged-in user download their Footprint fixtures, record live rugby match events on the sideline, keep a local score and commentary, and upload that commentary to Footprint.

Nothing in the repository states a business objective, success metric, or owner beyond the installer manufacturer string `Evolve`.

## Scope

In scope of the code on `master`:

- Login against the Footprint QA login API and a local "already logged in" flag.
- Download of fixtures, lineups, match officials, scoring point values, and an event catalogue into a local SQLite database.
- A fixture list and a match screen with commentary, scores, movements, stoppages, and lineup tabs.
- Match clock, half and extra-time session changes, time off / time on, yellow-card and injury timers.
- Substitutions, injury handling, cards, and score events written to local commentary.
- Upload of the local commentary list for one fixture.
- An MSI setup project named Sideline Manager, product version 1.0.3.

Out of scope of this repository, as far as the tree shows:

- The Footprint API implementation (`qa.footprintapp.net` / `footprintapp.net`). This app only calls it.
- A web or mobile client.
- Automated tests, CI, or a SonarQube project file on `master`.

`FP LiveScoring V1` is a separate WPF project in the tree. It is not a project in `Live_Scoring_V1.sln`, and its download, upload, and navigation handlers are empty. Treat it as an abandoned shell, not as the shipping app.

## System architecture

**Implemented:** a single-user Windows desktop app.

```text
Sideline Manager (WPF, .NET Framework 4.8)
        |
        |  HTTPS form posts and GET (WebClient)
        v
qa.footprintapp.net  (production host is present only as commented URLs)
        |
        |  local read/write
        v
%AppData%\Sideline Manager\Footprint.db   (SQLite, Finisar SQLite.NET)
```

The installer project also packages `Database\Footprint.db` into the per-user AppData folder `Sideline Manager`, and packages `Windows_System32\sqlite3.dll` into a `System32` folder under the Windows directory.

There is no service, queue, or background worker. Timers are in-process `DispatcherTimer` and `Stopwatch` objects on the scoring page.

## Major components

| Component | Path | Role |
|---|---|---|
| Solution | `Live_Scoring_V1.sln` | `Live_Scoring_V1` plus `SidelineApp-Setup` |
| Shell | `Live_Scoring_V1\MainWindow.xaml` | Borderless maximized window titled Sideline Manager. Routes to login or the fixture list |
| Login | `Live_Scoring_V1\Login.xaml`, `Classes\Loginn.cs` | Online login, then fixture download |
| Fixture list | `Live_Scoring_V1\Listfixturs.xaml.cs` | Dates, kickoff, teams, scores, venue |
| Offline fixture form | `Live_Scoring_V1\Detailfixture.xaml.cs` | Collects a local match and calls `Fixtures.SetOfflineFixture` |
| Match screen | `Live_Scoring_V1\Scoring.xaml.cs` | Clock, events, lineup, commentary, upload |
| Local database | `Classes\SqlDatabase.cs` | Creates the SQLite schema if open fails |
| Footprint client | `Classes\Webservices.cs` | Download fixtures and post commentary |
| Score rollup | `Classes\Score.cs` | Recounts commentary into the `Scores` row |
| Installer | `SidelineApp-Setup\SidelineApp-Setup.vdproj` | MSI, product version 1.0.3, manufacturer Evolve |

`Live Scoring\Live Scoring.vdproj` is an older setup project and is not in the solution.

## Milestones visible in Git

`master` has 63 commits. The first is `4482327` (2019-09-05, maanie, "Initial working version"). The tip is `04b1a38` (2022-12-22).

Authors on all branches (shortlog, not only `master`): RDvanRooyen, heinrichoverdrive, Lloyd, maanie, silmaanie.

Late `master` history is a December 2022 QA cycle: substitution workflow, injury workflow, commentary edit and delete, lineup tab, venue on the fixture list, icons, and a deploy commit labelled V1.0.3 Beta. Remote branches that were not merged into the inspected tip include `Dev`, `Code_Rework`, `qa`, `NewSubsWorkflow`, and several `qa-*-2022` and `hdp-test` branches. Their contents were not reviewed. **Unknown** whether any of them is newer product intent than `master`.

## Implementation plan

No roadmap, issue tracker export, or TODO list is in the repository. The plan below is the state of the code, not a forward plan.

| Area | State on `master` |
|---|---|
| Login, fixture download, match scoring, commentary, upload | **Implemented** against the QA host |
| Production host `https://footprintapp.net` | Present only as commented URLs |
| Offline fixture save | UI **implemented**. The INSERT names columns that `CreateDataBase` does not create, and the column list is missing a comma. See business rules |
| Clock edit (`Update_clock_time`, `Add_Process`, `Minus_Process`) | Methods are empty |
| `FP LiveScoring V1` | Stub, not in the solution |
| Tests and CI | Not present |

## Known dependencies

| Dependency | Evidence |
|---|---|
| .NET Framework 4.8 | `Live_Scoring_V1.csproj` `TargetFrameworkVersion`. Installer debug bootstrapper also lists 4.8; the release bootstrapper lists 4.7.2 |
| WPF | `UseWPF` via PresentationFramework references and `OutputType` WinExe |
| Newtonsoft.Json 6.0.0.0 | Project reference |
| Finisar SQLite.NET 0.21.1869.3794 | Hint path points at `..\..\Accredit\Accredit\bin\Debug\SQLite.NET.dll`, which is outside this repository |
| `sqlite3.dll` | `Windows_System32\sqlite3.dll`, copied by the installer |
| Footprint QA API | Hard-coded in `Loginn.cs` and `Webservices.cs` |
| Visual Studio setup projects | `SidelineApp-Setup.vdproj` (`VSVersion` 3:800). Solution file says Visual Studio 17 |

## Current project status

**Implemented:** last commit on `master` is a December 2022 deploy labelled V1.0.3 Beta. No commit after that date is on `master`.

Version strings disagree:

| Source | Version |
|---|---|
| Installer `ProductVersion` | 1.0.3 |
| Deploy commit message | V1.0.3 Beta |
| `AssemblyVersion` / `AssemblyFileVersion` | 1.0.0.0 |
| ClickOnce `ApplicationVersion` in the csproj | 1.0.0.%2a, revision 19 |
| Assembly copyright | 2017 |

Which of those is the version users see is **Unknown / Requires Confirmation**. The window title does not include a version.

`sonar-project.properties` and `sonarqube_scan.bat` were named in the onboarding issue from a scan-host listing. They are not in the `master` tree that was cloned. **Unknown** whether they exist only on that scan host.

## Human confirmation

1. Confirm that `master` at `04b1a38` is the release to document, rather than `Dev`, `qa`, or `Code_Rework`.
2. Confirm whether QA (`qa.footprintapp.net`) is still the intended host. Production URLs are commented out.
3. Confirm the product owner. The installer says manufacturer Evolve. The git remote is the Overdrive Bitbucket workspace.
4. Confirm whether the offline fixture form is supposed to work. Its SQL does not match the schema `SqlDatabase.CreateDataBase` creates.
5. Confirm the meaning of event id 53 (score engine treats it as `Portry`; a click-handler comment says drop goal) and of event id 33 (used both as extra-time second-half start and as extra-time second-half end).
6. Confirm whether a second yellow card for the same player is specified to become a red card. The code does that when any prior yellow commentary row exists for the player.
