# Pratt Carlisle Manning Chart - Deployment Notes

This folder is the publish-ready static website.

Current site views:
- Hierarchy
- Hourly
- Original
- Leadership
- Open Roles
- Files

Viewer password for the in-page access screen:
- Password: PrattCarlisle2026

For real hosting-level password protection:
- Netlify Pro/Enterprise: upload this folder. The `_headers` file applies Basic Auth with username `viewer` and password `PrattCarlisle2026`.
- SharePoint / Microsoft 365: upload the files to a site or document library and give viewers Read access only. Use the Visitors group or explicit Read permissions so users can view but cannot edit.

Important security note: the in-page password screen is a visual access gate for the static file. Real protection must be enforced by the hosting platform. Because this site contains employee names and roles, SharePoint or another company-controlled access system is safest.

For a temporary live public URL from this computer, run `node secure_static_server.js` and expose port 8877 with a secure tunnel. This requires the computer and tunnel process to stay running.

Current Cloudflare Pages deployment:
- Project: `pratt-industries-manning-chart`
- URL: `https://pratt-industries-manning-chart.pages.dev`
- Viewer access target: Pratt Industries work email addresses ending in `@prattindustries.com`

Cloudflare Access setup needed for work-email login:
1. Open Cloudflare Zero Trust > Access > Applications.
2. Add a Self-hosted application for `pratt-industries-manning-chart.pages.dev`.
3. Create an Allow policy with Include > Emails ending in > `@prattindustries.com`.
4. Use One-time PIN for the free email-code flow, or connect Google Workspace as the identity provider if a Google Workspace admin can authorize it.

API note: programmatic setup requires a Cloudflare API token with `Access: Apps and Policies Write`.

Free daily open-position email:
1. Open `https://script.google.com` while signed in with the work Google account that should send the email.
2. Create a new Apps Script project.
3. Paste the contents of `Open_Positions_Daily_Email.gs`.
4. Replace `RECIPIENTS` with one or more comma-separated email addresses.
5. Run `sendTestOpenPositionsEmail` once and approve the Google permission prompts.
6. Run `installDailyOpenPositionsTrigger` once. It creates a daily trigger using the script project's time zone.

The email script reads `https://pratt-industries-manning-chart.pages.dev/Open_Positions.json`, so it sends the same open-position snapshot that was generated from `Org Chart.xlsx`.

Required files:
- index.html
- Org_Chart_Background.png
- Org_Chart_Full_Detail.svg
- Org_Chart_Executive_Overview.png
- Org_Chart_Metadata.json
- Open_Positions.json
- Open_Positions.csv
- Open_Positions_Daily_Email.gs
- _headers if using Netlify Basic Auth
