# Project plan — magusEvents

Evidence date: 2026-10-09.

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

Inspected revision: `master` at `bb6e583` (2019-08-16, author `maanie`, subject "2nd Stable Version"). That commit is also `origin/master` and `origin/HEAD`. The only remote branch is `master`.

The task metadata named `~/projects/sonar_scan/repos/magusEvents`. That path was not present on this host. The tree was read from a clone of the origin above. The clone tip matches the commit recorded when the onboarding issue was created (`bb6e583`, 2019-08-16).

No `silicon_ark/magusEvents/` directory existed before this document set. The source repository has no README at tip. The initial commit (`0c4d14f`, 2019-08-08, Jaco Brits) contained only the Bitbucket getting-started README. That file was removed in `43bc412` ("1st Stable version"). It did not describe the product.

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

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

## Product

The window title is `MainWindow`. The assembly title, product name, and root namespace are **MagusEvents**. `AssemblyCopyright` is "Copyright ©  2019". `AssemblyVersion` and `AssemblyFileVersion` are `1.0.0.0`. The ClickOnce revision stored in the project file is `12`, and `ApplicationVersion` is `1.0.0.*`.

The running application is a Windows desktop client (WPF, .NET Framework 4.6) for scanning accreditation barcodes at one event. It stores the event, people, zones, and meal rows in a local SQLite file under `c:\temp_acc\`, and it calls the Footprint accreditation HTTP API on `https://footprintapp.net/`.

The settings screen has a **MEAL ZONE** checkbox. When the saved event has `IsMealZone = 1`, the next process start opens the meal scanner instead of the zone scanner. The letters in field names (`AASID`, `AAID`, `AC`, `AID`) are not expanded in the repository. Comments in `Setup.xaml.cs` gloss `AAID` as "Accreditation Application ID" and `AASID` as "Accreditation Application Services ID". Treating the product as an on-site accreditation and meal-check scanner is **Inferred** from those screens and API paths.

Provenance of the assembly name: **Implemented**. Provenance of the product purpose: **Inferred**. No written objective exists in the repository.

A later repository, `maguseventsxamarin`, is a Xamarin.Forms client of the same Footprint accreditation API, with the same zone-id `312` and zone-type id `24` checks, the same `ok.wav` / `Bazz.wav` filenames, and commits by `maanie`. Whether the desktop app was replaced by that mobile app is **Unknown / Requires Confirmation**. They are separate Git repositories.

## Branch reality

| Line | Tip | Date | What it is |
|---|---|---|---|
| `master` (default; `origin/HEAD`) | `bb6e583` | 2019-08-16 | The only branch. WPF zone scanner and meal scanner, local SQLite, Footprint API client |

History is 3 commits:

| Commit | Date | Author | Subject |
|---|---|---|---|
| `0c4d14f` | 2019-08-08 | Jaco Brits | Initial commit (Bitbucket README only) |
| `43bc412` | 2019-08-08 | siliconoverdrive | 1st Stable version (application source, plus a ClickOnce `Build App/` tree for version `1.0.0.12`) |
| `bb6e583` | 2019-08-16 | maanie | 2nd Stable Version (removed `Build App/`; image refresh 120s and applicant refresh 240s; applicant refresh moved onto a background thread) |

40 tracked files at tip. No commits after 2019-08-16. Whether any workstation still runs a build of this tree is **Unknown / Requires Confirmation**.

## Objectives (inferred from the screens and the API calls, not from a written plan)

- Let an operator pick one accreditation event from Footprint and keep it as the only active event on the PC.
- Download applicants and profile images into the local SQLite file and `c:\temp_acc\`.
- Scan a barcode (keyboard wedge ending in Tab or Enter) and grant or deny zone access for the current time.
- When the event is marked as a meal zone, scan the same barcode to grant one meal for the selected day and session, or deny a repeat.
- Let the operator switch the process between online refresh and offline scanning.
- Accept a local CSV at `c:\temp_acc\accreditations.csv` as another way to load people.

## Scope

### In this repository

- Visual Studio 2017 solution `MagusEvents.sln` (format 12.00, `VisualStudioVersion = 15.0.27130.2003`) with one WPF project, `MagusEvents\MagusEvents.csproj`, target framework v4.6, output type `WinExe`.
- A second copy of the solution file at `MagusEvents\MagusEvents.sln`. Both files are 25 lines. The nested file is not the file Visual Studio would open from the repository root.
- Screens: header, setup, zone scan (`Scan`), meal scan (`Scanmeal`).
- Local SQLite created at `c:\temp_acc\database.sqlite3` on first run (`Events`, `Zones`, `Persons`, `Food`).
- HTTP calls to Footprint accreditation endpoints. No `Authorization` header.
- Zone deny plays `images\Bazz.wav` with `System.Media.SoundPlayer`. Zone grant plays `SystemSounds.Asterisk`. `images\ok.wav` is loaded into a player whose `Play` call is commented out. NAudio 1.8.5 is referenced and unused. The meal scanner's sound calls are commented out.
- ClickOnce settings in the csproj: publish URL `C:\Users\Abdurahmaan\Desktop\Evolve\`, `SignManifests` true, key file `MagusEvents_TemporaryKey.pfx`. The pfx is not tracked (`.gitignore` ignores `*.pfx`). The published `Build App/` tree existed only in `43bc412` and is absent at tip.

### Not in this repository (at tip)

- The Footprint API implementation. This client only calls it.
- A README, test project, Bitbucket pipeline, Docker file, or hosting config.
- `sonar-project.properties` and `sonarqube_scan.bat`. The onboarding issue listed both in the scan-host top-level snapshot (2026-09-28). Neither file is tracked at `bb6e583`. Whether they exist only as untracked files on the scan host is **Unknown / Requires Confirmation**.
- The NuGet `packages\` tree. `.gitignore` ignores `**/packages/*`. Restore is required before a build. The csproj also expects `System.Data.SQLite.Core.targets` under that folder.
- `NFCSharp.dll`. The reference hint path is `..\..\..\..\NFC\trunk\TestApp\bin\Debug\NFCSharp.dll`, outside this repository. NFC startup in `Scan` and `Scanmeal` is commented out.
- `x64\` and `x86\` interop copies named in the csproj (`SQLite.Interop.dll`, `Newtonsoft.Json.dll`). `.gitignore` ignores `x64/` and `x86/`, and those paths are not tracked.
- A login, a settings PIN, or any user account.

## System shape

```text
Operator (hardware barcode wedge, inferred)
        │  keystrokes into a visible TextBox, ended by Tab or Enter
        ▼
WPF pages (MagusEvents)
        │  System.Data.SQLite, string-built SQL
        ▼
c:\temp_acc\database.sqlite3
c:\temp_acc\scan.txt
c:\temp_acc\meal.txt
c:\temp_acc\{AAID}.txt          profile image payload
c:\temp_acc\LastUpdate.txt      last applicant-update timestamp
        │
        │  WebClient GET, no Authorization header
        ▼
https://footprintapp.net/api/Accreditation/getevents
https://footprintapp.net/api/accreditation/getapplicants/ac/{AID}/id/{AASID}
https://footprintapp.net/api/accreditation/getapplicantsupdates/ac/{AID}/date/{lastUpdated}
https://footprintapp.net/api/accreditation/getimages/ac/{AID}/id/{AAID}
https://www.footprintapp.net/api/tourn/     connectivity probe only
```

NFC (`NFCSharp`) can look up `Persons.SCANID` when a tag UID is 11 characters. The constructors do not call `NFCHandler.Init()`. That path is present and inactive at tip.

## Major components

| Component | Role | Evidence |
|---|---|---|
| `MainWindow` | Borderless 1920×1080 maximized window. Chooses Setup, Scan, or Scanmeal. Sets `WorkMode` to `ON`. | `MainWindow.xaml`, `MainWindow.xaml.cs` |
| `header` | Event name, venue, date, clock, logo, connectivity dot, exit. | `header.xaml.cs` |
| `Setup` | Load events, edit zone from/to/lock/active, meal day and session, meal-zone flag, download, CSV import, online toggle. | `Setup.xaml`, `Setup.xaml.cs` |
| `Scan` | Zone grant/deny, sounds, 10-second reset, online image and applicant refresh. | `Scan.xaml.cs` |
| `Scanmeal` | Meal grant/deny and `UNDO` barcode. | `Scanmeal.xaml.cs` |
| `Database` | SQLite file and table creation. | `classes\Database.cs` |
| `Webservices` | Applicant update download and the connectivity probe. Several methods have no caller. | `classes\Webservices.cs` |
| `Person`, `Zones`, `Meals`, `Events`, `Checkin` | Row shapes and queries. | `classes\` |

## Milestones visible in Git

There is no project plan, issue tracker, or roadmap in the repository.

| When | What landed | Status |
|---|---|---|
| 2019-08-08 | Empty Bitbucket repository | Completed |
| 2019-08-08 | First stable application, including a ClickOnce `Build App` for `1.0.0.12` | Completed, then the publish tree was removed |
| 2019-08-16 | Second stable: publish tree removed; refresh intervals set to 120s and 240s; update call moved to a background thread | Completed. This is the tip |

Nothing in the repository describes work after 2019-08-16. **Planned** work: none found.

## Implementation plan

There is no forward plan in the repository. The tip is the whole implementation.

A machine that builds this project needs Visual Studio capable of the v4.6 WPF project (the solution file records Visual Studio 2017), NuGet restore for the packages in `packages.config`, and a copy of `NFCSharp.dll` at the hint path if the NFC reference is left in the csproj. `SignManifests` is true and the temporary pfx is not in Git, so a signed ClickOnce build fails until that key is supplied. Whether anyone still builds or publishes it is **Unknown / Requires Confirmation**.

## Known dependencies

| Dependency | Version in repo | Used for |
|---|---|---|
| .NET Framework | v4.6 | WPF application |
| EntityFramework | 6.2.0 | Referenced and configured in `App.config`. No `DbContext` type exists in the project. Runtime data access uses `System.Data.SQLite` directly. |
| System.Data.SQLite (Core, EF6, Linq) | 1.0.109.2 / 1.0.109.0 | Local database |
| Newtonsoft.Json | 12.0.1 | Footprint JSON |
| NAudio | 1.8.5 | Referenced. Zone sounds use `System.Media.SoundPlayer`, not NAudio types. |
| NFCSharp | not versioned in-repo | Hint path outside the repo. Init calls are commented out. |
| Microsoft.VisualBasic | framework reference | `TextFieldParser` for CSV import |
| Footprint HTTP API | host `footprintapp.net` | Events, applicants, updates, images, connectivity probe |

## Current project status

**Implemented** and last changed on 2019-08-16. Dormant in Git since that date. No open branch, no pipeline, no tests, no product document.

Items that block a confident reading of "done":

- Whether the desktop app is still operated, retired, or replaced by `maguseventsxamarin`.
- Whether `sonar-project.properties` and `sonarqube_scan.bat` on the 2026-09-28 scan host are untracked local files.
- Whether new applicants are actually inserted. Both `Person.save_to_db` overloads build an INSERT whose FirstName literal is not closed before the Surname literal. Failures are swallowed. See the technical document.
- The meaning of zone id `312` and zone type id `24`. The code treats both as full access. The names are not written down.
