# Oppl Static ETF Assessment Viewer — Simple v2.0

This replaces the earlier exporter/importer package.

There is now:

- one server;
- one uploaded folder;
- one administrator password;
- one administrator page;
- no database;
- no API keys;
- no package signing secret;
- no ZIP movement between servers;
- no changes to the current/live complex assessment viewer.

## 1. Remove or ignore the previous static publisher

The earlier folder can be removed or left unused:

```text
/home/opplxvqc/public_html/llms/static_complex_publisher/
```

Do not change the current live folders or live bridge.

## 2. Upload the new folder

Upload the included `static-complex` folder to:

```text
/home/opplxvqc/public_html/llms/static-complex/
```

The application will then be available at:

```text
https://oppl.ai/llms/static-complex/
```

## 3. Usually no configuration change is needed

The default `config.php` reads assessment runs from:

```text
/home/opplxvqc/public_html/llms/runs/etf
```

That is the expected Oppl run folder.

Only edit this line in `config.php` if the real run folder differs:

```php
'runs_root' => '/home/opplxvqc/public_html/llms/runs/etf',
```

Source URLs beginning `/llms/` are automatically mapped to:

```text
/home/opplxvqc/public_html/llms/
```

## 4. Open setup

Visit:

```text
https://oppl.ai/llms/static-complex/setup.php
```

The page checks:

- the ETF run folder is readable;
- the local static data folder is writable.

Choose one administrator password. This is the only manually chosen system password.

No default password is included in the code.

If the data folder is not writable, apply:

```bash
chmod -R 750 /home/opplxvqc/public_html/llms/static-complex/data
```

If required by the hosting account, use `770` instead.

## 5. Create a client portal

Open:

```text
https://oppl.ai/llms/static-complex/admin.php
```

Enter:

- client name;
- client username;
- client password, or leave blank to generate one;
- the selected ISINs;
- Balanced, Strict and/or UCITS Default modes.

Click **Create frozen portal**.

The page immediately displays:

- the long secret client URL;
- the username;
- the client password;
- any ISIN/mode run that could not be found.

Copy the password at that point. Only its secure hash is stored.

## 6. What is frozen

At the moment **Create frozen portal** is clicked, the application:

1. finds the newest stored run for each requested ISIN and mode;
2. copies that exact JSON into the client vault;
3. copies the source text used by that run where available;
4. records SHA-256 hashes;
5. creates the fixed universe manifest;
6. creates the secret 48-character client URL;
7. creates the local client login.

The client portal never searches the live run folder again.

A later `_latest.json`, methodology change or new assessment cannot alter the existing client portal.

## 7. Client URL format

A client receives a URL similar to:

```text
https://oppl.ai/llms/static-complex/client/8f1d779629ffe92110633f802f844c8c90e963ca0e6b1c7d/
```

After login they receive:

- the full static ISIN universe table;
- All, Disagree, Complex and Non-complex views;
- Balanced, Strict and UCITS report links;
- the current-style full HTML report;
- supporting evidence excerpts;
- frozen source-text viewing;
- client-safe JSON output from `report.php?raw=1`;
- the explanatory page.

## 8. Existing-client controls

The administrator page lists all portals and supports:

- open portal;
- reset client password;
- disable portal;
- re-enable portal.

There is intentionally no **update** button. To provide a refreshed assessment, create a new frozen portal.

## File map

```text
static-complex/
├── index.php                  redirects to setup or admin
├── setup.php                  one-time administrator-password setup
├── admin.php                  creates and manages frozen client portals
├── config.php                 normally requires no edit
├── builder_lib.php            selects and copies exact runs and sources
├── app_lib.php                setup and administrator functions
├── client_bootstrap.php       resolves the secret client vault
├── portal.php                 client universe table
├── report.php                 full frozen assessment report
├── source_text_viewer.php     frozen local source viewer
├── explainer.php              assessment explainer
├── static_lib.php             local client login and vault reader
├── .htaccess                  secret URL routing and file protection
└── data/                      protected settings and frozen client vaults
```

## Password summary

| Password | How it is created | Where used |
|---|---|---|
| Administrator password | Chosen once in `setup.php` | Opens `admin.php` |
| Client password | Entered or automatically generated in `admin.php` | Opens that client's secret portal |

There are no other passwords, secrets or API keys to configure.
