# Project plan — prsa_cio

Evidence date: 2026-10-06.

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

Inspected revision: `master` at `2832986` (2023-09-20, "bitbucket-pipelines.yml edited online with Bitbucket").

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

## Product

The repository and solution are named **prsa_cio**. The login page title is **PRSA - CIO**. The reporting page heading is **Reporting System**. Swagger titles the API **PRSA.API**.

What the letters PRSA and CIO expand to is **Unknown / Requires Confirmation**. No expansion was found in code, comments, or committed documents. There is no `README`.

The only product behaviour that is both written and wired to a database is an API that reads an Excel workbook from a filesystem path and inserts rows into SQL Server table `Imports.tracker`, plus an API that returns those rows. The Razor page that looks like the user interface does not call that API.

Provenance: names are **Implemented** in `prsa_cio.sln`, `src/app/PRSA.App/Pages/Account/Login.cshtml`, `src/app/PRSA.App/Pages/Index.cshtml`, and `src/api/PRSA.API/Program.cs`. The disconnect between the page and the API is **Implemented**.

## Branch reality

Default branch is `master`. `origin/HEAD` points at `master`. No other remote branches were present at inspection.

| Commit | Date | Author (as recorded by Git) | Subject |
|---|---|---|---|
| `9fd87b3` | 2023-08-23 | Jaco Brits | Initial commit (`.gitignore` only) |
| `ea57f0d` | 2023-08-24 | Dewald Stander | Initial Commit (solution, four projects, EF models, AdminLTE pages) |
| `3a4de40` | 2023-08-24 | silmaanie (`maanie@overdrive.co.za`) | added landing page with tabs + file upload |
| `20da76a` | 2023-08-24 | Dewald Stander | adding API and BL functionality to upload Tracker sheet from excel |
| `6d47763` | 2023-09-01 | Jaco Brits | bitbucket-pipelines.yml created online with Bitbucket |
| `2832986` | 2023-09-20 | Jaco Brits | bitbucket-pipelines.yml edited online with Bitbucket |

Six commits. No commit after 2023-09-20 was on `origin/master` at inspection. A `development` branch is named in `bitbucket-pipelines.yml` and was not present on the remote.

## Scope in the repository

In scope of what is present on `master`:

- A Visual Studio 2022 solution with four .NET 6 projects: Razor Pages web app, Web API, class library, and EF Core data project.
- SQL Server model generated by EF Core Power Tools for schemas `Core` and `Imports`.
- A tracker Excel import in `PRSA.Services` that uses Excel COM interop and inserts into `Imports.tracker`.
- HTTP endpoints `GET api/FileUpload/getTrackerData` and `POST api/FileUpload/uploadFile`.
- A Razor page at `/` titled Reporting System, with four hard-coded tabs and a file input that does not save or parse the file.
- A login page at `/Login` whose fields are not bound and whose sign-in button posts to `/Index`.
- SonarQube analysis on Bitbucket Pipelines for branches `master` and `development`.

Out of scope of the code that was found:

- Any screen or service that reads or writes `le3`, `mapping`, `master_data`, `open_orders`, `qlikview_sales`, `sales_forecast`, `stock_balance`, `settings`, or `users`. Those types exist only as EF models.
- Authentication, Active Directory, roles, or session users. `Core.users` has `ad_token` and `role_id`. Nothing in the app or API reads that table.
- A call from the web page to the API.
- Tests, migrations, Docker, deployment manifests, queues, or background workers.
- `README`, `appsettings.json`, and connection-string values. `appsettings.json` is gitignored.
- `sonar-project.properties` and `sonarqube_scan.bat`. The onboarding issue listed them as top-level files on the scan host on 2026-09-28. They are not in Git history of `origin/master`.

## System architecture

```text
Browser
  → PRSA.App (Razor Pages, net6.0)
      → GET /           Index page, hard-coded tabs, file input
      → POST /          OnPostAsync sets a success flag and does not store the file
      → GET /Login      AdminLTE login markup
      → GET /Privacy    template privacy text
      → GET /Error      used when the app is not in Development
      → PRSAContext is registered
      → no page queries it

Caller with a filesystem path (no UI in this repo)
  → PRSA.API (net6.0, Swagger in Development)
      → FileUploadController
          → FileUploadService
              → Excel COM (Microsoft.Office.Interop.Excel), first worksheet
              → SQL Server via PRSAContext
                  → Imports.tracker

Bitbucket Pipelines (master, and development if that branch exists)
  → dotnet SDK 7.0 image
      → dotnet-sonarscanner
      → dotnet build
```

The web app project references only `PRSA.DAL`. It does not reference `PRSA.Services` or `PRSA.API`. Provenance: **Implemented** in the `.csproj` files and `Program.cs` of each host.

## Major components

| Component | Path | Role |
|---|---|---|
| Solution | `prsa_cio.sln` | Folders "01. Web App", "02. API", "03. BL", "04. DAL" |
| Web app | `src/app/PRSA.App` | Razor Pages host |
| API | `src/api/PRSA.API` | Controller host and Swagger |
| Business layer | `src/bl/PRSA.Services` | Tracker read and Excel upload |
| Data layer | `src/dal/PRSA.DAL` | EF Core context and table classes |
| Pipeline | `bitbucket-pipelines.yml` | SonarQube begin, build, SonarQube end |

## Milestones visible in Git

There is no project plan, ticket list, or milestone document in the repository. The only sequence is the commit list above:

1. Empty ignore file.
2. Solution scaffold, EF models for ten tables, AdminLTE layout and login.
3. Reporting page with tabs and a non-processing upload.
4. API and service that import the first Excel sheet into `tracker`.
5. Pipeline added, then the `development` branch step added.

Whether a later milestone was agreed outside Git is **Unknown / Requires Confirmation**.

## Known dependencies

- .NET 6 target framework for all four projects (`net6.0`).
- Pipeline image `mcr.microsoft.com/dotnet/sdk:7.0`.
- EF Core SQL Server 7.0.10 (`PRSA.DAL`).
- Swashbuckle.AspNetCore 6.5.0 (`PRSA.API`).
- Razor runtime compilation 6.0.21 (`PRSA.App`).
- Excel COM interop (`Microsoft.Office.Interop.Excel`, type library guid `00020813-0000-0000-c000-000000000046`) embedded in `PRSA.Services`.
- SQL Server database. Design-time EF Power Tools hint in `efpt.config.json` is `nb-dewald.prsa_cio.dbo`. That hint is not a committed connection string.
- Browser libraries loaded from CDNs on the reporting page: jQuery 3.6.0, DataTables 1.11.5, Bootstrap 4.5.2.
- Vendored AdminLTE, Bootstrap, jQuery, and jquery-validation under `src/app/PRSA.App/wwwroot`. The reporting page does not use `_Layout.cshtml`. `_ViewStart.cshtml` sets `Layout = null`.
- SonarQube, using pipeline variables `SONAR_TOKEN` and `SONAR_HOST_URL`, project key `overdrive_prsa_cio_AYpSpeQrQY-eSvjrqMo7`.
- OpenJDK 17 JRE, installed in the pipeline step for the scanner.

## Implementation plan

No implementation plan is documented in the repository.

**Inferred** from the unfinished page comments in `Index.cshtml.cs` ("replace with your logic", "You would implement the actual file processing logic here") and from the commented DataTables block in `Index.cshtml`: the landing page was left as a shell, and the tracker import was built on the API instead. Whether that split was the intended design is **Unknown / Requires Confirmation**.

## Current project status

`origin/master` has not moved since 2023-09-20. The tracker import API is the only completed data path. The reporting page does not load tracker rows. The other nine tables are modelled and unused by application code. Login does not authenticate. There is no deployment definition.

Status label **Inferred**: dormant incomplete build, not an operated product description. Confirm with the people who committed it (Git authors: Dewald Stander for the solution and API, silmaanie for the landing page, Jaco Brits for the pipeline).
