CLAUDE.md
CLAUDE.md
Website for UCLID (University of Cincinnati Lab for Interfacial Dynamics, PI Kishan Bellur): https://kishanbellur.github.io. It’s a Jekyll site on the academicpages / Minimal Mistakes theme, plus two custom classroom apps (LecturePulse and SAM). Contributor how-tos (talks, publications, people, posts) are in README.md. Read it first and keep it in sync when workflows change.
Build & deploy
- GitHub Pages builds
masterautomatically on push. There is no CI and no test suite. Pushing tomasterpublishes to the live site, so confirm before you push. - Local preview:
bundle exec jekyll serve --config _config.yml,_config.dev.yml→ http://localhost:4000. Restart after editing_config.yml. Gemfileuses thegithub-pagesgem, so GitHub builds in safe mode. Custom_plugins/do not run on GitHub. _plugins/ruby_compat.rb exists only so local builds work on newer Ruby (it restoresObject#tainted?).Gemfile.lockis gitignored. Ifbundle installbreaks, delete it and try again.assets/js/main.min.jsis the theme bundle (built withnpm run build:jsfrom the rootpackage.json). The classroom-app JS files inassets/js/are loaded directly and are not part of that bundle.
Content model
- Collections (
_config.yml):teaching,publications,research,talks,people. Standalone pages are in_pages/, and each sets its ownpermalink. _talks/and_publications/are generated. Editmarkdown_generator/talks.tsv/pubs.bib, then runpython3 talks.py/python3 pubsFromBib.pyfrommarkdown_generator/. After changing talks, also runpython3 talkmap.pyfrom the repo root. Needspandas,pybtex(andgetorg+geopyfor the talkmap).- People: _pages/people.md groups members with
where: "position", "..."on these exact strings:Principal Investigator,PhD Student,MS Student,BS Student,PhD Alum,MS Alum,BS Alum. Any otherpositionvalue leaves the person off the page. Within each group, people are sorted by theorderfront-matter field; anyone withoutordergoes last. - Top nav: _data/navigation.yml.
- Posts dated in the future don’t render (
future: false)._posts/2199-01-01-future-post.mdis a theme placeholder.
Classroom apps
Each app’s markup and page-specific CSS are inline in a _pages/*.md file, with logic in assets/js/. Firebase config is inline in the pages. All of them use Firebase project lecture-feedback-e758b.
| App | Page (permalink) | JS | Backend |
|---|---|---|---|
| LecturePulse (student) | _pages/student-check-in.md (/lecturepulse/) | student-check-in.js | Firebase Realtime DB |
| LecturePulse (instructor) | _pages/lecture-pulse.md (/lecturepulse-admin/) | lecture-pulse.js | Firebase Realtime DB, client-side access code |
| SAM (student) | _pages/sam.md (/sam/) | sam.js | Cloudflare Worker, gated by class code |
| SAM (instructor) | _pages/sam-admin.md (/sam-admin/) | sam-admin.js (ES module) | Worker, gated by Firebase Google sign-in |
The file names don’t match the permalinks, because the apps were renamed (student check-in → LecturePulse, Study Buddy → SAM). Links on _pages/teaching.html use the permalinks. lecture-pulse-test.html at the root is a standalone prototype.
SAM backend: study-buddy-worker/
- Cloudflare Worker + D1 (
study-buddy-db, onelecturestable, seeschema.sql), which calls the Gemini API. It’s excluded from the Jekyll build. - Routes (
src/index.js):POST /api/ask(class code),POST /api/ingest,GET /api/lectures, andDELETE /api/lectures/:id. The last three are admin-only (src/auth.jsverifies the Firebase ID token against theADMIN_EMAILsecret). src/relevance.jsdoes keyword-overlap filtering of lectures. There are no embeddings.wrangler.tomlholds non-secret vars (GEMINI_MODEL,FIREBASE_PROJECT_ID,ALLOWED_ORIGIN). The secretsGEMINI_API_KEY,ADMIN_EMAIL, andCLASS_ACCESS_CODEare set withwrangler secret put. Never commit them.- Dev/deploy:
npm install,npx wrangler dev,npx wrangler deploy(run fromstudy-buddy-worker/). Deploying is a separate step from pushing the site. - The Worker URL is hardcoded as
window.SAM_API_BASEin bothsam.mdandsam-admin.md. - CORS only allows
https://kishanbellur.github.io, so SAM won’t work from a local Jekyll preview. - The directory, Worker, and D1 database keep the old “study-buddy” names so the deployed URL doesn’t change. Everything user-facing is called SAM. Full setup steps are in
study-buddy-worker/README.md.
Conventions / gotchas
- Most files come from the upstream theme (
_layouts/,_includes/,_sass/,CHANGELOG.md,CONTRIBUTING.md, and demo pages like_pages/markdown.mdandarchive-layout-with-content.md). Avoid changing them unless the task requires it. - Contributors are lab students editing by hand. Keep changes simple and add a changelog line at the bottom of README.md for content updates.
.DS_Storeis gitignored. Don’t add it back.
