The ORCSGirls Play Lab is a collection of interactive educational tools for students. It runs across two servers:
| Server | Domain | Contents |
|---|---|---|
| Play server | play.orcsgirls.org | All HTML/CSS/JS — the full student-facing site |
| Data server | data.orcsgirls.org | PHP API + teacher admin UI (/showcase/) |
Deployment is done by uploading two zip files produced at the end of each work session:
play-server.zip — extract to the play server web rootdata-server.zip — extract to the data server web root (contains showcase/ subfolder and setup.sql)⚠️ Always rm -f the old zip before rebuilding — zip -r updates rather than replaces, which can leave stale files from earlier sessions.
| Endpoint | Method | Auth | Purpose |
|---|---|---|---|
/showcase/api/submit.php | POST | none | Save submission; auto-hides bad content |
/showcase/api/submissions.php?date= | GET | none | List approved rows for a date |
/showcase/api/dates.php | GET | none | Distinct session dates with counts |
/showcase/api/submission.php?id= | GET | none | Full HTML for one submission |
/showcase/api/status.php | GET | none | Submissions open/closed state |
/showcase/api/verify.php | POST | none | Validate a class code |
/showcase/api/admin.php | GET/POST | Basic Auth | List all / toggle / delete; manage codes & submissions state |
web_submissions (id, student_name, title, html, approved, submitted_at, ip)
site_settings (setting_key PK, setting_val) -- e.g. submissions_open=1
class_codes (code PK, label, active, created_at)
https://play.orcsgirls.org, http://localhost, http://localhost:80, http://localhost:8000, http://127.0.0.1
access.js)All pages load access.js in <head>. Hides page immediately, then:
sessionStorage: orcs_code_ok) → show instantlyverify.php async → show or show gate if revokedDOMContentLoadedGate: purple card, ORCSGirls logo, monospace input (auto-uppercase), shake on wrong, locks after 5 attempts. Includes contact hint: "Forgot your code? Contact contact@orcsgirls.org". On success: code → localStorage, flag → sessionStorage.
Teacher opens/closes submissions from admin page. State in site_settings. submit.php returns HTTP 423 when closed. Editor fetches status.php on load and shows "🔒 Submissions Closed" when disabled.
containsBadContent() in _db.php — strips tags, lowercases, checks first 5000 chars against a wordlist (profanity, slurs, explicit terms, self-harm). Called at insert time (submit.php) and by admin.php for the Flags column.
<head>: theme-init.js → standalone.js → access.jshtml[data-theme="dark"] selectors; persisted in localStorage as orcs_theme?mode=standalone hides the nav bar — used for embedding tools in class© YEAR ORCSGirls — contact@orcsgirls.org on every page<link rel="icon" href="[../]images/LogoRound-Purple.png">body > main.container { flex: 1 } fills height; footer always pinnedstyle.css)--primary-purple: #4a148c --accent-teal: #0097a7
--accent-green: #00873c --accent-magenta: #c2185b
--text-dark: #1a1a2e --text-muted: #6b5f7a
--bg-light: #f5f3f8 --radius: 10px
.tool-split (flex row, align-items:stretch) contains .tool-side-controls (flex column, fixed width) and .tool-side-visual (flex:1). Inner .panel gets flex:1; overflow-y:auto so it matches the visual panel height.
DrawingPad.js uses getImageData/putImageData for per-pixel channel manipulation (R = left-eye, G+B = right-eye offset by depth slider). Cursor overlay is a separate <canvas id="dp-cursor-canvas"> with pointer-events:none. Critical: clear() resets globalCompositeOperation to source-over before filling — otherwise subsequent strokes are transparent.
Challenge mode: starts 1–15 (4-bit), expands every 3 correct answers through 1–31, 1–63, 1–127, 1–255. LEVEL_MAXES = [0, 15, 31, 63, 127, 255]. Practice mode always uses full range.
Fully self-contained — all CSS inlined, no dependency on play server. Theme toggle wired via DOMContentLoaded listener. Flags column: ⚠ Content (PHP scan, immediate) and ⚠ JS Error (hidden iframe + postMessage, ~6s delay). Class Codes panel shows active codes as large monospace chips.
| Feature | Files |
|---|---|
| Drawing Pad: upload image with placement mode, scroll-to-resize, correct anaglyph rendering | fun/js/DrawingPad.js, drawing-pad.html, fun.css |
| Drawing Pad: brush/eraser cursor overlay canvas | DrawingPad.js, fun.css |
| Password Strength Checker with passphrase detection | cyber/password.html |
| Binary Numbers Game with progressive difficulty | cyber/binary.html |
| Student Web Showcase with date-filter pills | web/showcase.html, data server API |
| Teacher Admin page (self-contained, Basic Auth, content + JS error flags) | showcase/admin/index.html, admin.php |
| Content scanner — auto-hides inappropriate submissions | _db.php, submit.php |
| Submissions open/close gate | status.php, admin.php, editor.html, admin/index.html |
| Class code access gate — all pages protected | access.js, verify.php, setup.sql |
| Skid Steer Configurator card (external link) | fun/index.html |
| Site-wide: standalone mode, compact footer, panel heights, full-height layout | style.css, standalone.js, all pages |
| Monaco editor height fix (flex instead of hardcoded calc) | web/web.css, web/editor.html |
Fourier Camera 1:1 aspect ratio via CSS aspect-ratio | fourier-camera.html, science.css |
| Two-server CORS setup (play → data) | _db.php |
| Logic Gate Simulator — full canvas circuit editor with AND/OR/XOR/NOT gates, drag-place, wire drawing, DAG evaluation, challenge mode (OR gate / half-adder / XOR from ANDs+NOTs) | cyber/logic-gates.html, cyber/index.html |
| Logic Gate Simulator — polished IEEE gate symbols with wire stubs; toggle-switch INPUT; LED-in-box OUTPUT; no labels; panel layout; localStorage persistence; single-placement mode; help bar at top of canvas | cyber/logic-gates.html |
| Logic Gate Simulator — Challenge 4 Full Adder (3 inputs, 8 rows); INPUT/OUTPUT disabled in challenge mode; animated truth-table step-through with per-row pass/fail colouring; canvas top help bar | cyber/logic-gates.html |
⭐ Binary — Logic Gate Simulator
✓ DoneCompleted April 2026. Full canvas circuit editor at cyber/logic-gates.html, card on cyber/index.html.
localStorage and restored on reload; challenge circuits never savedLogic Gate Simulator — Future Extensions
IdeasLet students select several gates at once and move or delete the whole group — essential for tidying up large circuits without rebuilding them from scratch.
iState = 'selecting' to the FSM; on mouseup commit the set selectedIds.iState = 'dragging-group'; on mousemove apply the same delta to every gate in selectedIds. Wires follow automatically since they reference gate IDs.selectedIds in one snapshot (single undo step).snap() / undo system — no structural changes needed; selectedIds is transient UI state and does not need to be snapshotted or persisted.An optional snap-to-grid makes circuits look neat without students needing to align gates manually — especially helpful on touchscreens.
localStorage.function snap(v){ return Math.round(v / GRID) * GRID; } — apply to x and y in addGate() and during drag (mouseup, not mousemove, so dragging still feels smooth).opacity: 0.22 → 0.32) to make the grid more prominent as a visual affordance.Internet of Things — Particle IoT Tools
Low Priorityiot/ section with hub page + new nav item on all pagesCyber — Password Crack Time Visual Simulator
PendingStandalone deeper companion to the existing Password Strength Checker.
cyber/password.htmlFun Tools — Skid Steer Configurator
✓ DoneCard added to fun/index.html — opens https://play.orcsgirls.org/SkidSteerConfigurator/ in a new tab. Students pick colours for their 3D printed skid steer robot for maker camp.
Fun Tools — Additional Ideas
IdeasScience — Fourier Camera Improvements
PendingsnapImageiOS) on current SafariDrawing Pad — Stamps
Pendingfun/stamps/ folder with paired red/cyan PNG files per stampstamps/manifest.json — loadStamps() in DrawingPad.js fetches and populates dropdownDrawing Pad — Mobile Touch
PendingWeb Showcase — Future Improvements
Ideas| Item | File | Status | Notes |
|---|---|---|---|
Anaglyphs.js in fun/ |
fun/js/Anaglyphs.js |
⚠️ Unused | Kept as scaffold for stamp work; remove once stamps are re-implemented |
Fourdem.js |
science/js/Fourdem.js |
⚠️ Unknown | Audit and remove if unused |
science.css consolidation |
science/science.css |
⚠️ Pending | Some Fourier Camera styles still in inline <style> in fourier-camera.html |
| Cookie-based camera preference | science/js/FourierCamera.js |
⚠️ Pending | Uses setCookie/getCookie from Anaglyphs.js — replace with localStorage |
| Admin modal dark mode | showcase/admin/index.html |
Minor | .admin-modal background doesn't switch in dark mode |