# Project plan — magusEventsXamarin

Evidence date: 2026-10-09.

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

Inspected revision: `master` at `607005b` (2020-08-17, author `maanie`, subject "API ScanLog and Cosmetic changes"). That commit is also `origin/master` and `origin/HEAD`. The only remote branch is `master`.

The task metadata named `~/projects/sonar_scan/repos/magusEventsXamarin`. 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.

No `silicon_ark/magusEventsXamarin/` directory existed before this document set. The source repository has no README and no product requirements document.

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 Android launcher label is **MagusEvents** (`MagusEvents.Android/MainActivity.cs`). The shared header label is **MAGUS | 1.6.0** (`HeaderBar.xaml`). The Android manifest `android:versionName` is `1.0` and the iOS `CFBundleVersion` is `1.0`. The package id is `com.companyname.magusevents`. The iOS bundle id is `com.companyname.MagusEvents`.

The running application is a Xamarin.Forms client for scanning accreditation applications and vehicle permits at an event. It stores the event, people, permits, zones, and scan rows in a local SQLite file, and it calls the Footprint accreditation HTTP API on `https://footprintapp.net/`.

The UI names two modes: **APPLICATION MODE** and **VAP MODE** (`EventSettings.xaml`). VAP screens talk about permits, vehicles, drivers, and gates. The letters VAP are not expanded anywhere in the repository. Reading them as a vehicle access permit is **Inferred** from those screens. Confirmation is required before treating that expansion as a product name.

Provenance of the labels: **Implemented**. Provenance of the product purpose: **Inferred** from the screens and API paths. No written objective exists in the repository.

## Branch reality

| Line | Tip | Date | What it is |
|---|---|---|---|
| `master` (default; `origin/HEAD`) | `607005b` | 2020-08-17 | The only branch. Xamarin.Forms app, Android project with audio and database copy, iOS project shell, local SQLite, Footprint API client |

History is 60 commits from 2019-08-13 (`5c0f6b3`, "initial commit", Sergei Pringiers) through 2020-08-17. Authors in the log: `maanie` (26), `Sergei Pringiers` (17), `siliconoverdrive` (17). 261 tracked files. No commits after 2020-08-17. Whether any device 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 active event on the device.
- Let an operator choose application scanning or VAP scanning, and reopen in that mode next launch.
- Download applicants (and an accreditation import file) into SQLite and scan a barcode to grant or deny zone access.
- Download vehicle permits and applicants, pick a gate and loading zones, and scan a vehicle barcode (and, when required, a driver barcode).
- Keep a local scan log for application scans and push unsynced rows to Footprint when the operator taps SYNC SCANS.
- Gate settings and mode changes behind a fixed numeric code compiled into the app.

## Scope

### In this repository

- Visual Studio 2019 solution `MagusEvents/MagusEvents.sln` with three projects: shared `netstandard2.0` library `MagusEvents`, `MagusEvents.Android` (target framework v9.0, min SDK 21, target SDK 28), and `MagusEvents.iOS` (minimum OS 8.0).
- Screens: event placeholder, event settings, mode picker, application scan, application zone settings, VAP scan, VAP gate and loading-zone settings, and a four-digit code dialog.
- Local SQLite (`sqlite-net-pcl`) seeded on Android from `Assets/database.sqlite3`.
- HTTP calls to Footprint accreditation endpoints. One FTP upload of a text log that the current scan path no longer writes.
- Android granted/denied sounds (`ok.wav`, `Bazz.wav`).
- Eight UI screenshots under `Screenshots/`.
- A second SQLite asset, `Assets/database - Copy.sqlite3`, same byte length as `database.sqlite3` and a different SHA-256. `FileAccessHelper` copies only `database.sqlite3`.

### 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 `607005b`. `Screenshots/` is tracked. Whether the two Sonar files exist only as untracked files on the scan host is **Unknown / Requires Confirmation**.
- An iOS implementation of keyboard hiding, scan sounds, or the SQLite asset copy. Those types exist only in the Android project.
- A camera barcode view. ZXing is initialised on Android and referenced by the projects. Every scan screen reads a hidden `Entry`.

## System shape

```text
Operator (hardware barcode wedge, inferred)
        │  keystrokes into a hidden Entry
        ▼
Xamarin.Forms pages (MagusEvents)
        │  sqlite-net-pcl
        ▼
database.sqlite3 in the app personal folder
        │  first launch on Android copies Assets/database.sqlite3
        │
        │  WebClient GET, no Authorization header
        ▼
https://footprintapp.net/api/accreditation/...
https://footprintapp.net/api/Accreditation/getevents
https://footprintapp.net/local_data/accreditations/{AC}.json
        │
        │  every 30 min on the application scan screen, file often absent
        ▼
FTP footprintapp.net  public_html/public/local_data/logs/scan_{AC}.txt
```

`AppState.Server` is the live host. A QA host (`https://qa.footprintapp.net/`) is present only as a comment. The accreditation JSON download URL is hardcoded to the live host and does not use `AppState.Server`.

## Observable milestones

These are commit subjects, not a written plan.

| Commit | Date | Author | Subject |
|---|---|---|---|
| `5c0f6b3` | 2019-08-13 | Sergei Pringiers | initial commit |
| `5f66991` | 2019-08-15 | Sergei Pringiers | built scan screen |
| `e51ca58` | 2019-10-17 | Sergei Pringiers | Event Scan, Event Settings, Application Scan screens |
| `4bfb86d` | 2019-10-23 | Sergei Pringiers | OTP and page navigation |
| `84a8158` | 2019-10-24 | Sergei Pringiers | HeaderBar, AppState, zone loading |
| `b8d4f73` | 2019-10-25 | Sergei Pringiers | zone saving and loading |
| `30a6b8e` / `1bcfc1f` | 2019-11-04 to 2019-11-08 | maanie | API on VAP and application screens |
| `ba1376a` | 2019-11-20 | maanie | Added sound and removed updating |
| `ddc2db7` | 2019-12-09 | maanie | VAP screen changes |
| `6220cd7` | 2020-03-02 | maanie | Timers and cosmetic changes |
| `607005b` | 2020-08-17 | maanie | API ScanLog and cosmetic changes |

## Dependencies known from the project files

- Xamarin.Forms 4.2.0.848062, Xamarin.Essentials 1.1.0, Xamarin.KeyboardHelper 2.0.7.
- sqlite-net-pcl 1.6.292.
- ZXing.Net.Mobile.Forms 2.4.1 (shared project). Android also references ZXing.Net and ZXing.Net.Mobile.
- Newtonsoft.Json (hint path into the vendored `packages/Newtonsoft.Json.12.0.1` tree).
- Android support libraries 28.0.0.1, Plugin.CurrentActivity 2.1.0.4.
- Shared project also references EcoCore 7.0.0.11642, Mono.Android, NFCSharp, System.Data.SQLite, System.Data.SQLite.EF6, System.Data.SQLite.Linq, and System.Drawing.Common via a Visual Studio 2019 Professional hint path. No application call site for EcoCore or NFCSharp was found. `GetByNFC` exists and no page passes `nfc = 1`.
- Vendored `packages/` also contains NAudio 1.8.5 and Entity Framework 6.2.0. Scan sounds use `Android.Media.MediaPlayer`, not NAudio. SQLite access that runs uses `SQLiteConnection` from sqlite-net. The `System.Data.SQLite` blocks in `Database.cs` are commented out.

## Current status

The tree is dormant. Last change is 2020-08-17. The Android project is the one that copies the database, plays sounds, and requests storage permission. The iOS project loads the shared `App` and does not register those platform services.

Background applicant and VAP update timers are commented out (`ba1376a` "removed updating", and the same pattern in `VAPScan`). Application download and permit download run only from settings buttons. Application scans are written to `ScanLog`. VAP scans are not. SYNC SCANS posts batches to the API and marks rows sent before the response is handled.

## Human confirmation

1. Whether any device still runs this build, and whether iOS was ever shipped.
2. The expansion of VAP, and the meaning of zone number `312` and zone type id `24`.
3. The meaning of `ScanType` values `1` and `3`.
4. Whether `https://footprintapp.net/` is still the correct host. The QA host is only a comment.
5. The Sonar files named in the 2026-09-28 scan-host snapshot are not in git at `607005b`.
6. A fixed numeric code and FTP credentials are compiled into source. Values are omitted here. They should be treated as exposed and rotated if they are still valid.
7. `Assets/database.sqlite3` contains two `ScanLog` rows. One stores a person's name. That name is omitted here.
8. Header text says 1.6.0. Android and iOS version fields say 1.0.
