Repository navigation
feat: add public course and instructor catalog pages - #42
jaspermayone wants to merge 3 commits into
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
calendar-home | ba0fa6c | Commit Preview URL Branch Preview URL |
Nov 10 2026, 08:09 PM |
|
I don't think we should put this in the topbar, it's getting a bit cluttered 😭 and is cooked on mobile. I'll think of an alternative |
k, lmk |
|
We have a whole section on the course catalog at the bottom of the homepage lol, why not just use that?
Like add a link to @Cattn thoughts? |
|
That would be better, although we still need to clean up the top bar anyway |
4358fce to
ba0fa6c
Compare
|
@jaspermayone can you move the link to this where daniel showed above, and out of the topbar (which should fix your merge conflicts) |

Part of WITCodingClub/calendar-backend#797. This PR adds public, read-only catalog pages. Nobody needs to sign in.
/catalog/catalog/courses/catalog/courses/[code]/catalog/instructors/catalog/instructors/[id]The top bar gets a "Catalog" item.
Data
src/lib/server/catalog.tsreadshttps://calendar.witcc.dev/api/v1/catalog. That API needs no token, and a zone cache rule keeps it at the edge.src/lib/catalog.tshas the types and the formatting rules. Its tests run withnpm test./catalogroute, so these pages hide nothing.Review fixes (commit 4358fce)
store.svelte.tscalledgoto(pathname)on every navigation, which dropped the query string. A shared?q=link or the Back button lost the search. It now callsgotoonly for another path. I checked this in a browser: a search survives a reload and the Back button, and the top bar still navigates.term_uidfalls back to the default term, not a 404.Known limits
/docspages work the same way.CF-Connecting-IPof the Worker). If a crawler fills it, the pages fail for everyone until the window resets. The edge cache makes this less likely. Check the production logs foruser-agent: calendar.witcc.devbefore you depend on it.Checks
node --test src/lib/catalog.test.ts: 12 pass.npx eslint src/lib src/routes/catalog: no problems.npm run check: no errors or warnings in the new files. The 19 errors insrc/routes/tosandsrc/routes/privacy, and the warnings insrc/routes/guides, were already onmain.npm test: 3 failures inguides.test.tsandpages.test.ts(the MCP guide is commented out ofGUIDES). They were already onmain.npm run build: passes.vite devagainst the live API.Finals and university events pages come next. They need public endpoints in the backend first.