Session log — Study guide system rebuild without Make
Session log — Study guide system rebuild without Make
Summary
The Make.com webhook was replaced with a same-origin /submit endpoint on the VPS, so quiz results from the staff handbooks at handbook.s2l.online now post directly to the Monday.com board "Study Guide Completions" (18416710291). A second handbook, the H2R Graphics Operator Guide (14 lessons, 28 questions), was authored from the official H2R docs using the ZoomISO template shell, the root URL became a listing page with ZoomISO moved to /zoomiso.html, back-links were added to both guides, and a stale-browser-cache bug was fixed with a no-cache header. Work began on the evening of 8 June and wrapped at 15:23 on 9 June with a written handoff; everything was deployed, tested end to end and verified live. Catch-up note reconstructed on 12 June 2026 from the saved conversation.
Decisions
- Runtime: PHP-FPM 8.3 on the default www-data pool, preferred over a Node service; no new pool created.
- Endpoint source kept outside the web root at /var/www/handbook-submit/submit.php, reached only via the web server's own /submit route, so it can never be served as a file.
- Monday API token stored only in /etc/study-guide-submit.env (locked down, owner www-data); Hasmukh wrote it himself at a hidden terminal prompt so it never passed through Claude.
- Reused the existing Monday board 18416710291 after verifying all nine column IDs against the spec; no recreation.
- The live index.html was found to be a stale, unwired draft (email field, 80% pass mark, empty webhook); the documented template was deployed instead (reviewer dropdown of Monday user IDs, 100% pass mark).
- New guide scoped as comprehensive, named "H2R Graphics Operator Guide", slug h2r-graphics.html, with unique saved-progress keys so the two guides do not clobber each other.
- Root URL turned into a listing page; ZoomISO copied to /zoomiso.html before the root was replaced.
- Git kept local-only this session; .gitignore excludes *.env and .htpasswd*.
Changes made
- Wrote submit.php (validates nine fields, maps to verified column IDs, calls Monday create_item) and deployed it to /var/www/handbook-submit/submit.php on the VPS.
- Added the /submit route to the handbook.s2l.online web server setup, with a timestamped backup, a configuration check and a graceful reload.
- Verified the token file /etc/study-guide-submit.env (permissions and presence only; value never displayed).
- Tested end to end: locally as the web user, then through the live public URL (correct refusals for unauthenticated and wrong-method calls, success on a proper submission with a row created). Test rows, including a Fail at 75%, were column-verified then deleted; board left at 0 items.
- Deployed the Make-free ZoomISO template as the live page: submissions go to "/submit", pass mark 100%, staff dropdown of 8 Monday user IDs (old page backed up).
- Authored and deployed the H2R Graphics Operator Guide (14 lessons, 28 self-scoring questions) at https://handbook.s2l.online/h2r-graphics.html, cloning the ZoomISO styling and quiz engine byte-identically; quiz engine verified in a local preview, live test row verified then deleted.
- Built and deployed the root listing page "mobilearn · Study Guides" with a GUIDES list for one-line additions; ZoomISO preserved at /zoomiso.html first, with backups.
- Added "← All guides" back-links to both guides, in the desktop sidebar and the mobile top bar, and redeployed both.
- Fixed stale caching by adding a no-cache instruction at the web server level; verified on all four URLs plus a revalidation check.
- Wrote DEPLOY-NEW-GUIDE.md (runbook for adding future guides), later updated for the listing-page step.
- Generated the session handoff at .claude/handoff-2026-06-09-1520.md and .claude/handoff-index.md in the Guides workspace.
- Local artefacts updated in the Guides workspace: submit.php, .gitignore, h2r-graphics.html, index.html, ZoomISO-v3-Field-Manual.html, DEPLOY-NEW-GUIDE.md.
Follow-ups
- Hasmukh to hard-refresh Safari once (Reload From Origin) to clear the pre-fix cached copy of the root page.
- Retire the Make.com scenario manually in the Make UI; nothing on the site references it any more.
- Decide whether to add Jayant Gajjar (70979059) and Matthew (104918491) to the staff dropdowns.
- Optional: initialise a git repo and push the template, endpoint and docs to the mobilearnafrica GitHub organisation (kept local-only this session).
- Optional hardening: move /submit to its own dedicated web-user pool instead of the shared one.
- Next guide on request: follow DEPLOY-NEW-GUIDE.md (build the page, add one entry to the GUIDES list, redeploy the listing page).