# OI Documentation Dashboard

Created: 2026-06-25

## Purpose

This dashboard lists documents in the Outsourcing Initiative repository with:
- brief description
- file size and modified time
- download button
- archive button for live documents
- separate view of archived documents

## Live URL / route

Local VPS service route:

`http://127.0.0.1:8788/oi`

Tailnet route shown by Tailscale Serve status:

`https://hermes-sotgee-vps.tail019015.ts.net:8788/oi`

The main HomeNet dashboard now includes an "OI repository" section linking to `/oi`.

## Repository paths

Live repository:

`/data/workspace/outsourcing-initiative`

Archive repository:

`/data/workspace/outsourcing-initiative/99-archive`

Archive manifest:

`/data/workspace/outsourcing-initiative/99-archive/archive_manifest.jsonl`

## Behaviour

- Download endpoint: `/oi/download?path=<relative-repository-path>`
- Archive endpoint: `POST /oi/archive` with form field `path=<relative-repository-path>`
- Archive action moves a file from the live repository to `99-archive/<same-relative-path>`.
- If an archived file with the same name already exists, a UTC timestamp suffix is added.
- The archive manifest records archived timestamp, source path, archive path and byte size.
- Archived files remain downloadable from the dashboard.

## Safety controls

- The server resolves paths under `/data/workspace/outsourcing-initiative` only.
- Archive buttons are not shown for files already under `99-archive`.
- Browser confirmation is required before archive action is submitted.
- The archive action moves files; it does not delete them.

## Verification performed

- Python syntax check passed for:
  - `/data/scripts/dashboard_http_server.py`
  - `/data/scripts/generate_cron_disk_dashboard.py`
- Main dashboard was regenerated with an OI repository link.
- Local health endpoint returned `ok`.
- `/oi` returned HTTP 200 and rendered a 24 KB dashboard page.
- Download test for `03-analysis/repository-document-inventory.md` returned HTTP 200 and 6,101 bytes.
- Archive endpoint was tested with a temporary file, confirmed moved into `99-archive`, then the temporary test artifact was removed.
