# Resource Hub Administration

Open `DeveloperResources/admin.aspx` on the development server. The page accepts local-server requests or authenticated Windows users. If remote access returns HTTP 403, enable Windows Authentication for the site or administer it locally on the server.

The IIS application-pool identity needs Modify permission only on `data`, `documents`, `videos` and `downloads`. Run the bundled permission script from an elevated PowerShell prompt after confirming the application pool name:

```powershell
& '.\004 - Configure Resource Hub IIS Permissions.ps1' -ApplicationPoolName 'DefaultAppPool' -Confirm
```

Do not grant Modify permission to the whole website or to the broad `IIS_IUSRS` group. The administration page, scripts and configuration should remain read-only to the worker process.

## Add a resource

1. Select **Tool**, **Document**, **Video** or **Skill**.
2. Enter a stable lowercase resource ID, title, category, version, published date and description.
3. Add comma-separated search tags.
4. Choose the file. The page routes it to the matching folder and publishes its metadata immediately.
5. For a skill, provide the skill name, recommended model and reasoning effort. The ZIP must contain one top-level skill folder with `SKILL.md`.

## Update a resource

Select **Edit** in the catalog table, change the metadata, and save. To upload a newer file using the same filename, select **Replace a file with the same name**. A versioned filename is preferable when developers may need both releases.

## Remove or restore content

- **Remove** hides a generated entry by creating a managed tombstone. This can be restored.
- For content added only through administration, **Remove** deletes its managed catalog entry.
- Selecting **file** also permanently deletes the linked file from its managed upload folder. Leave this unchecked when you only want to retire the catalog entry.
- Hidden generated entries have a **Restore** action.

## Storage

| Resource | Folder |
|---|---|
| Skills | `downloads/skills` |
| Documents | `documents` |
| Videos | `videos` |
| Tools | `downloads/tools` |
| Managed metadata | `data/managed-resources.json` and `data/managed-resources.js` |

The generated catalog in `data/resources.json` remains the recoverable base. Administration changes are stored separately and merged in the browser, so refreshing the exported skills catalog does not overwrite manually managed content.

## Publishing safeguard

Back up the `data/managed-resources.*` files and the four upload folders before replacing the whole site directory. The normal refresh script preserves these files in place, but a clean deployment must copy them from the live site or the shared hub first.
